I try to use speech to text on android. I write a simple code and try on two devices(Huawei Android 6 api-level 23, Samsung Android 6 api-level 23).
My example is taken from this link
Permissions taken from user on runtime :
<uses-permission android:name="android.permission.RECORD_AUDIO"/> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE"/>
There many different behaviour between two devices. Huawei device calls onError callback on silence after 5 seconds. But on samsung device, it doesn't call onError in silence. Also it doesn't call onEndOfSpeech.So I try to terminate the recognizer. If I stop manually using recognizer.stoplistening()
;, it calls onError many times.
Is there any wrong settings in this example? How can I develop more stable app for speech to text?