I am facing trouble when I use my code to interact with google speech api. I have gone through the reference from the following link. JAVA using google speech recognition API
when I am using his flac file I am getting the text from google api but when I am using my flac file I am getting the following error Done
Exception in thread "main" java.io.IOException: Error writing to server
at sun.net.www.protocol.http.HttpURLConnection.writeRequests(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.writeRequests(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
at test.TestGoogleApiForSpeechRecognition.main(TestGoogleApiForSpeechRecognition.java:42)
I have recorded from windows recoder and convert it to flac by using a converter. The coode is given below:
and the flac file is on the following link