I understand that this questions is discussed around 4-5 times but none of the solutions posted had helped me.
I created google developer account and enabled Google speech api, also registered project and have generated API_KEY. I am using JARVIS (on Google speech v2) to synthesize and recognize speech on my Java program.
The server always responds with 403 (forbidden) when querying the URL. I understand that it is saying I am not authorized. I even enabled billing to sort it out, but no luck.
Server returned HTTP response code: 403 for URL: https://www.google.com/speech-api/v2/recognize?output=json&lang=en-us&key=MY_KEY?client=chromium&output=json&lang=en-US&maxresults=4
at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getInputStream(Unknown Source)
at com.darkprograms.speech.recognizer.Recognizer.rawRequest(Recognizer.java:455)
at com.darkprograms.speech.recognizer.Recognizer.getRecognizedDataForFlac(Recognizer.java:280)
at com.darkprograms.speech.main.ArtificialIntelligenceErrorDetection.speechToTextLogic(ArtificialIntelligenceErrorDetection.java:80)
at com.darkprograms.speech.main.ArtificialIntelligenceErrorDetection.listenAlexa(ArtificialIntelligenceErrorDetection.java:43)
at com.darkprograms.speech.main.VoiceServer$voiceHandler.handle(VoiceServer.java:60)
Please note, I am not using project ID generated by google. I think there is some missing link here. However, requesting your wise thoughts in this regards.
Thanks so much in advance.