Search code examples
androidapispeech-recognitionspeech-to-text

Should I use android Speech Recognizer in my App for data collection?


I don't want my app to control and execute some tasks on users phone, like setting alarm or calling someone. I have found many tutorials that focused on accomplishing this. I want to collect data using the speech recognizer API that goes to an online server, and later can be requested by multiple users.

For example:

"OK Google! find the nearby hospitals for me", I don't want this.

"Facebook was founded by Mark Zuckerberg in 2004", I want this.

The text data (collected from the recognition api) would hardly be 500 characters long and because the speech to text technology can make mistakes, I will allow the users to do the final check and make necessary changes by typing. Is Android's speech recognition suited for this kind of application? Or should I go for Google cloud APIs? I want to go with the former because it's completely free (No?). I want the recognition to be as accurate as possible and that's why I don't wanna leave Google's APIs.


Solution

  • You can invoke the speech recognizer Activity on Android using the Intent

    new Intent(RecognizerIntent.ACTION_RECOGNIZE_SPEECH);
    

    and receive the recognized text as result.

    See details at https://developer.android.com/training/wearables/apps/voice.html