I got this answer from here, I checked the dates and saw that it was published a few days after your message, so I decided that you missed it. Speech recognition and audio recording in Android at a time
I have a solution that works well to recognize speech and audio recording. Here ( https://github.com/katchsvartanian/voiceRecognition ) is a link to a simple Android project that I created to show how the solution works. In addition, I put several screens in the project to illustrate the application.
I will try to briefly explain the approach that I used. I combined two functions in this project: Google Speech API and Flac entry.
The Google Speech API is called through HTTP connections. Mike Pulz gives more details about the API:
"(...) the new [Google] API is a full duplex streaming API. means that it actually uses two HTTP connections - one POST request to download the content as a" live "fragmented stream, and the second GET to request access to the results, which it makes much more sense for longer sound samples or streaming audio. "
However, this API must receive a FLAC sound file for it to work properly. This makes us move on to the second part: writing flags
I implemented the Flac entry in this project by extracting and adapting some pieces of code and libraries from an open source application called AudioBoo. AudioBoo uses native code to record and play flac format.
Thus, you can record flac sound, send it to the Google Speech API, receive text and play the recorded sound.
The project that I created has basic principles to make it work for specific situations. To make it work in another scenario, you need to get the Google Speech API key, which is obtained as part of the Google Chromium-dev group. I left one key in this project to show its work, but I will delete it in the end. If someone needs more information about this, let me know because I cannot post more than two links in this post.