there's a way (and the example) to register audio (in VOICE_RECOGNITION mode) and capture the voice in a string?
would be perfect if there was no need to save it to a wav file, but listening in real time
I looked the AudioRecord library and test project but i can't retrieve the string during the registration
I had a look at the android developers site, it appears that the Voice recognition uses audiorecord to capture the voice, but there doesn't appear to be any way to interact with that process. It's all done within the Voice recognition itself.
If you can find any examples done in Java, it might give a clue if it can be done, but I couldn't see one.
ok, and this buffer is possible to convert it in a string?
For example:
if "AudioRecord" records "ciao", in the buffer there's a bytes array of "ciao"....right?
if yes, there's a way to convert the byte array to retrieve the string "ciao"?
Perhaps I am not understanding you properly, but the SpeechRecognizer is a complete process, there doesn't appear to be any interface other than the provided one which does the recording it needs.
It doesn't seem possible to feed a pre-recorded file into the recognizer object.
The problem is that the SpeechRecognizer, listens only for a given period and not continuously.
I was able to do a listen continuously, restarting the listening in "SpeechRecognizer_Results" event
My goal is to run a service in background that listens a command (es: "CALL ....." , "SEND ....")
not knowing when the user speak, i've need to run this service in a continuous way
My goal is to run a service in background that listens a command (es: "CALL ....." , "SEND ....")
not knowing when the user speak, i've need to run this service in a continuous way
I don't think it's possible because your device will always in "listen mode" that drain the battery and occupy the microphone. As you can see all voice recognition apps have a button like "press and speak".