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
534 stars 301 forks source link

Google cannot be contacted #74

Closed neutt22 closed 8 years ago

neutt22 commented 8 years ago

I don't know why, but it's always issuing me this: java.io.IOException: Server returned HTTP response code: 400 for URL: http://www.google.com/speech-api/v2/recognize?client=chromium&output=json&lang=en-US&maxresults=4

I have my key setup correctly. And my speech API is enabled.

Any help?

Thanks

Skylion007 commented 8 years ago

Update to the latest API the Duplex V2 endpoint has been discontinued.

neutt22 commented 8 years ago

Thanks for fast feedback. I believe I've downloaded the updated version here: https://github.com/lkuza2/java-speech-api/releases v2.0.1

Is there any files need to update?

Cheers

Skylion007 commented 8 years ago

What class are you using?

Skylion007 commented 8 years ago

If you were using the latest version, then you shouldn't be using the Duplex V2 endpoint. It shouldn't be generating that URL

On Mon, Jan 18, 2016 at 9:42 PM, Jim Paulo Ovejera <notifications@github.com

wrote:

Thanks for fast feedback. I believe I've downloaded the updated version here: https://github.com/lkuza2/java-speech-api/releases v2.0.1

Is there any files need to update?

Cheers

— Reply to this email directly or view it on GitHub https://github.com/lkuza2/java-speech-api/issues/74#issuecomment-172717661 .

neutt22 commented 8 years ago

Please take a look: http://prntscr.com/9rxi1v Seems like some classes are deprecated.

neutt22 commented 8 years ago

This is the JAR file I've added to my Eclipse: http://prntscr.com/9rxidc

Skylion007 commented 8 years ago

The Recognizer class no longer works. You should not be using deprecated classes or methods as they will not work.

On Mon, Jan 18, 2016 at 9:47 PM, Jim Paulo Ovejera <notifications@github.com

wrote:

Please take a look: http://prntscr.com/9rxi1v Seems like some classes are deprecated.

— Reply to this email directly or view it on GitHub https://github.com/lkuza2/java-speech-api/issues/74#issuecomment-172720926 .

neutt22 commented 8 years ago

I see! But where can I found those updated class files when I've got the latest one from your latest release? http://prntscr.com/9rxip2

Skylion007 commented 8 years ago

Recogizer no longer works and wilil never ever work again. Google has shutdown that API. You need to use the GSpeechDuplex API or something similar.

On Mon, Jan 18, 2016 at 9:50 PM, Jim Paulo Ovejera <notifications@github.com

wrote:

I see! But where can I found those updated class files when I've got the latest one from your latest release? http://prntscr.com/9rxip2

— Reply to this email directly or view it on GitHub https://github.com/lkuza2/java-speech-api/issues/74#issuecomment-172722144 .

neutt22 commented 8 years ago

Can you point me to a good working example for GSpeechDuplex? Because your example branch is deprecated.

Skylion007 commented 8 years ago

It's all on the Wiki: https://github.com/lkuza2/java-speech-api/wiki/Duplex---Hello-World

neutt22 commented 8 years ago

Thanks big time! I forgot to check the wiki. It's fully working now :)

Skylion007 commented 8 years ago

I was able to fix the recognizer class. It now works so I've undeprecated it. Although Duplex is still the recommended method for interacting with the API.

neutt22 commented 8 years ago

Looks like the Recognizer has new params? http://prntscr.com/9se6fz

neutt22 commented 8 years ago

aaand its has some prints hardcoded? http://prntscr.com/9se7x3

Skylion007 commented 8 years ago

The Duplex API does have some prints hardcoded. I've been meaning to try to remove those by replacing them with loggers or other means. I would welcome a pull request which removes these printouts and replaces them with a logger of some sort.

The Recognizer class does have some new params, (it's has Google API key required since V2, sorry Google's end, not mine.) Feel free to consult the JavaDoc code in the future for more information. You now need an API key to use either the Recognizer or the Duplex API.

RahulChandrashekar17061984 commented 8 years ago

Hi I am always get a 400 Exception saying that the host does not exist.

Kindly provide you inputs

Skylion007 commented 8 years ago

@RahulChandrashekar17061984 , are you sure you are using the newest version of the API? Not sure how old the newest release is, but ensure you are using the current, freshly compiled version.