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
531 stars 304 forks source link

404 That's an error #67

Closed Dustinhoefer closed 8 years ago

Dustinhoefer commented 8 years ago

Hello,

unfortunately I can't get your api to work =(

https://www.google.com/speech-api/full-duplex/v2/ only gives me a 404, as well as the GSpeechDuplex class:

Starting to write Error: 404 Exception in thread "Downstream Thread" java.lang.NullPointerException at com.darkprograms.speech.recognizer.GSpeechDuplex$1.run(GSpeechDuplex.java:197)

I joined the chromium group and created a key: Speech API 15.10.2015 Server AIzaSy....

Any help is greatly appreciated!

Regards, Dustin

Skylion007 commented 8 years ago

First all of that, endpoint will always 404 when given no arguments and accessed via a web browser. I will look into the issue and see if I can replicate it. Meanwhile, has anyone else encountered this issue? Has Google decided to change their endpoint again?

TheRealWeco commented 8 years ago

I also have this Error.

https://www.google.com/speech-api/full-duplex/v2/down?maxresults=1&pair=553405221900241 Starting to write Error: 404 Exception in thread "Downstream Thread" java.lang.NullPointerException at com.darkprograms.speech.recognizer.GSpeechDuplex$1.run(GSpeechDuplex.java:199) IO WRITE DONE HELP: -1 https://www.google.com/speech-api/full-duplex/v2/down?maxresults=1&pair=228937810580252 Starting to write Error: 404 Exception in thread "Downstream Thread" java.lang.NullPointerException at com.darkprograms.speech.recognizer.GSpeechDuplex$1.run(GSpeechDuplex.java:199) IO WRITE DONE

Skylion007 commented 8 years ago

If the downstream thread is exiting in that manner, it usually means the upstream thread encountered some type of error, likely failed authentication. Since it's working for other people, I would look at instructions in the wiki to ensure that you are using a valid API key. This is likely causing the issue.

tjohn93 commented 8 years ago

Did anyone manage to resole this? I'm having the same issue. Went back to make a browser key but this 404 error is still popping up.

Skylion007 commented 8 years ago

404 error indicates an authentication error of sometime (it's not connecting to the downstream thread). If you have a look at the source code, I think I have a todo error somewhere to add an AUTH failure callback to that portion of the code. Anyway, it basically just means that the server is rejecting the downstream connection for some reason.

If you mean you are getting the 404 error in the browser, that's suppose to happen because you are using a browser and it doesn't know how to handle a request with that user-agent and such to a URL with no params.

tjohn93 commented 8 years ago

Sorry, I'm new to Java in general.

I made a server key at first and received the error, went back, deleted the project in Google and made a new one, made a browser key instead as per the Chromium instructions. I have a feeling that it might have something to do with how I'm importing the GSpeechDuplex file, but I'm not sure.

Skylion007 commented 8 years ago

If it was an issue importing GSpeechDuplex, you would be getting errors at compile time. It definitely is with the API-key.

On Sat, Nov 28, 2015 at 9:39 PM, tjohn93 notifications@github.com wrote:

Sorry, I'm new to Java in general.

I made a server key at first and received the error, went back, deleted the project in Google and made a new one, made a browser key instead as per the Chromium instructions. I have a feeling that it might have something to do with how I'm importing the GSpeechDuplex file, but I'm not sure.

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

birkanu commented 8 years ago

Hi, I have also been getting the same error, but I am pretty sure I have created an API key following the instructions. What is your recommendation on this?

Skylion007 commented 8 years ago

It's been a long time since I created an API key, but if I recall, I did not use the server API key because that constrains you to one IP address. There are instructions on the wiki on how to create an API key for this project. Since there has been no developments on this issue I am closing this.

Skylion007 commented 8 years ago

Okay so it turns you guys were right and it was an API problem. I was using an old version binary I had that used the V1 version of the API which still works. Unfortunately, it appears as the V2 duplex API is broken so I have reverted this to the V1 API. I apologize for the confusion, I should have tested with the latest binaries but I didn't realize the Duplex API had changed at all since then.

birkanu commented 8 years ago

Yeah, I noticed that and I started using the V1 API instead.

ghost commented 8 years ago

Hey yall. I got this going after hours of deciphering everything and now I am here. Where can I get a "V1" api key?

Skylion007 commented 8 years ago

Duplex V1 API key is the same as the V2 one.

On Wed, Jan 13, 2016 at 11:10 PM, insertnamethere notifications@github.com wrote:

Hey yall. I got this going after hours of deciphering everything and now I am here. Where can I get a "V1" api key?

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