Posts

Showing posts with the label java-audio

Define GOOGLE_APPLICATION_CREDENTIALS for google-cloud-speech , Java Desktop Application

Image
Define GOOGLE_APPLICATION_CREDENTIALS for google-cloud-speech , Java Desktop Application I am completely new using google-cloud-java. Trying to do some Speech Recognition using the google-cloud-speech . Speech Recognition I have written the below code , but there is a problem , i don't know how to specify the credentials so i get the below error, no clue how to do it and searching the web 2 hours now : java.io.IOException: The Application Default Credentials are not available. They are available if running in Google Compute Engine. Otherwise, the environment v ariable GOOGLE_APPLICATION_CREDENTIALS must be defined pointing to a file defini ng the credentials. See https://developers.google.com/accounts/docs/application- default-credentials for more information. Send audio from Microphone to Google Servers and return Text package googleSpeech; import java.io.IOException; import java.util.Arrays; import java.util.HashMap; import javax.sound.sampled.AudioFormat; import javax.sound.sa...