lkuza2 / java-speech-api

The J.A.R.V.I.S. Speech API is designed to be simple and efficient, using the speech engines created by Google to provide functionality for parts of the API. Essentially, it is an API written in Java, including a recognizer, synthesizer, and a microphone capture utility. The project uses Google services for the synthesizer and recognizer. While this requires an Internet connection, it provides a complete, modern, and fully functional speech API in Java.
GNU General Public License v3.0
535 stars 301 forks source link

API connection error #88

Closed lluccardoner closed 8 years ago

lluccardoner commented 8 years ago

Hello! I am using your API and I am using the Duplex code given by you. I did all the steps for getting the API key and I put it in the YOUR_API_KEY variable.

When I run it I get the 403 error (menaing that the key is not valid?) The point is that I am not able to connect with the google api. This is my output:

Starting to write Error: 403 Error has occured java.io.IOException: Error writing request body to server at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.checkError(HttpURLConnection.java:3478)

How can I fix it? Is there any code I have to add?

Thanks.

lsweatman commented 8 years ago

I was getting the same thing and I couldn't find a workaround. However I think what's going on is that Google updated their voice API recently (in the last year or two) and the url that requests processing isn't valid anymore. I wasn't able to find the new syntax for that URL but it shouldn't be terribly hard to redo. Let me know if I can help!

Anzure commented 8 years ago

I got it to work, it isn't outdated. Join the Chromium-dev group on Google and get the private Speech API instead of Google Cloud Speech API.

http://imgur.com/a/w6doM

Skylion007 commented 8 years ago

Thanks @HydroTekZ Would you mind updating the Wiki page about this? The instructions are slightly more confusing now that there are two speech APIs and it's probably the most common question we get asked. 👍