Recorded sound file (ala google now, google keep) - RecognizerIntent / Listener

I am developing an application that uses a recognizer identifier to receive voice input. However, starting with the jelly bean, I was not able to get the actual sound file from my voice input.

The recognition function ( http://developer.android.com/reference/android/speech/RecognitionListener.html ) has a method called onBufferReceived. However, there is no promises that this method will be called, and when I implemented it, it was never called. Is there a way to get this method to work, or what is the “best practical” approach for collecting a sound file that parses the recognition identifier?

This should be possible, since now both google can do this with the voice command "note-to-self", and Google Keep: s voice notes do the same.

thanks

+4
source share
1 answer

I don’t think there is a way to force it. This clearly depends on the implementation of the recognition service. If Google decides not to call onBufferReceived , then there is no way to get the actual data to be used. Please note that the Google apps mentioned do not use the (publicly available) Intent / Service API to access speech recognition, but it does seem to use a private API in applications (speech recognition can be included in their applications).

+2
source

All Articles