Reputation: 1329
I am using the Google Speech API on Android to enable speech-to-text in my Android app. However, I noticed that the recognition is much worse compared to Google Assistant or the built-in "Hey Google" services.
Are those using another API or is it the same one, and what could be the reason that the quality differs so much.
As an example, when I say "Smitten Ice Cream" (a place in SF, CA), Google Maps understands the speech right away whereas my app does not after 5 attempts. Is there maybe a way to add context to the Speech API that I'm trying to transcribe a location?
Upvotes: 3
Views: 2699
Reputation: 6144
This answer is based on an assumption, from years of using the inbuilt Google SpeechRecognizer for my applications.
I have had many, many reports that when users first start using my applications, the voice recognition is nowhere near as accurate as they are used to with Google Now/Assistant - even though it seemingly, is the same 'service' on their device.
The assumption is, that when you place your package name in the Intent details:
intent.putExtra(RecognizerIntent.EXTRA_CALLING_PACKAGE, getPackageName());
Google will start a new 'voice model' for this package, unless one already exists. As stated in the documentation, if you omit this - Google is likely to add this regardless.
This is actually a sensible approach. If your application is focused on medical terms, you would not want the results to be biased against such terms - which any existing model, most likely would be.
I've found after a short period of usage, the accuracy increases greatly.
There is another potential issue, due to a long standing bug - If the recognition results continue to be way off, you'll need to uninstall the Google App that provides the RecognitionService, remove all files etc and reinstall. This is an instant fix for those whose accuracy is inexplicably terrible.
A paragraph, very similar to the above, appears in my app Troubleshooting section to try and help users understand. I've not had a situation where the recognition accuracy didn't improve.
Not a solution for you, but I hope confirming your experience will help.
Upvotes: 4