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 response is giving NULL #92

Closed NicoLouis-be closed 4 years ago

NicoLouis-be commented 7 years ago

somewhere the conversion from the original response to the googleresponse is going wrong.

if i do String[] response = rawRequest(file, maxNumOfResponses, sampleRate); for (String s : response) { System.out.println (s); }

i get as result {"result":[{"alternative":[{"transcript":"groente","confidence":0.22364359},{"transcript":"groenten","confidence":0},{"transcript":"citroen","confidence":0},{"transcript":"gezond","confidence":0},{"transcript":"Dronten","confidence":0}],"final":true}],"result_index":0}

if i do the same through the jar file then i get a NULL as response , and the following error ERROR: Google cannot be contacted

so it all goes fine through the rawRequest but after that it goes wrong just wanted to report it, if i find a solution i will do a pull request

NicoLouis-be commented 7 years ago

wierd

if i copy the parseResponse function to my code and also the google response class, i'm not getting any errors and it works fine.

maybe i did something wrong with your jar file, i'm just going to import the code instead of using the release file.

yueyangz commented 7 years ago

Hi Nico, How did you resolve the NULL response issue specifically?

NicoLouis-be commented 7 years ago

ouch long time ago :) i think i downloaded the source file and implemented it that way into in my code instead of including the jar file. That fixed the problem i believe

DineshGuptaa commented 7 years ago

Hi , I am new to Java Speech API. I have downloaded the code plus hello world program but I am getting empty response from google

Please help me.