I have a solution that works well for speech recognition and sound recording. Here is a link to a simple Android project that I created to show how the solution works. In addition, I put several print screens in the project to illustrate this 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 Pultz gives more details about the API:
"(...) the new [Google] API is a full duplex streaming API. This means that it actually uses two HTTP connections - one POST request to download the content as a" live "fragmented stream, and a second GET request for access to results, which is more important for longer audio samples or for 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 a Flac entry in this project by extracting and adapting some code snippets and libraries from an open source application called AudioBoo. AudioBoo uses its own 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 and can be improved for specific situations. To make it work in a different 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 in the end I will delete it. If someone needs more information about this, let me know because I cannot post more than two links in this post.
lsantsan Apr 17 '14 at 21:22 2014-04-17 21:22
source share