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

Speech Recognition API (V1) discontinued. Switch to V2 #41

Closed Skylion007 closed 10 years ago

Skylion007 commented 10 years ago

It appears as though the V1 Speech Recognition API has been discontinued (the URL is generating 400 error). In the meantime, please use the V2 Duplex and chunked APIs instead. We are working on solving this issue ASAP.

wugh commented 10 years ago

V2 API is limited by 50 requests/day. Can we use the API key which is provided by gillesdemey (AIzaSyCnl6MRydhw_5fLXIdASxkLJzcJh5iX0M4)

Skylion007 commented 10 years ago

We do not officially condone using keys that do not belong to you, but yes.

dantavo commented 10 years ago

I ran this code and I haven't any error but I haven't also any string in output why? There is something wrong in my code?

String path="file:prova.flac"; RecognizerChunked("AIzaSyCnl6MRydhw_5fLXIdASxkLJzcJh5iX0M4"); rc.getRecognizedDataForFlac(path, 16000);

Skylion007 commented 10 years ago

You never add a listener to the RecognizerChunked, which is necessary for a response. Not to mention that particular API key has been retired and is no longer valid. Please create your own following the documentation on the Wiki.

dantavo commented 10 years ago

Sorry now I've created my own key but I have the same result. I follow the wiki but probably I don't understand because I haven't result.

Is possible send a wave file converted before in .flac by your classes and get the Speech Result?

dantavo commented 10 years ago

I follow alse the example Duplex but: 1) Byte[] data = Files.read(mic.getAudioFile());//Saves data into memory. dup.recognize(data, (int)mic.getAudioFormat().getSampleRate()); mic.getAudioFile().delete();//Deletes Buffer file

the library are missing where I find the object Files

Skylion007 commented 10 years ago

Oh, sorry I forgot that's an old example. We renamed the class to GSpeechDuplex from Duplex. Use that instead. Sorry, the implementation of the V2 endpoint is still under development and we changed the class name without updating the documentation.