voice
voice copied to clipboard
getSpeechRecognitionServices returns empty
Hi, I can't use the package because my getSpeechRecognitionServices() is always empty. Interestingly in debug mode getSpeechRecognitionServices works fine but in the signed apk using expo build returns empty.
Voice.getSpeechRecognitionServices()
Here is the permissions and queries inside AndroidManifest
<uses-permission android:name="android.permission.RECORD_AUDIO" /> <uses-permission android:name="android.permission.MODIFY_AUDIO_SETTINGS"/> <queries> <package android:name="com.google.android.googlequicksearchbox"/> <intent> <action android:name="android.intent.action.VIEW"/> <category android:name="android.intent.category.BROWSABLE"/> <data android:scheme="https"/> </intent> <intent> <action android:name="android.speech.RecognitionService" /> </intent> </queries>
Any help would be highly appreciated, thanks!
Having the same issue.
Solution is here: https://github.com/react-native-voice/voice/issues/350
Should be added in docs.
For react native cli add this in manifest
<uses-permission android:name="android.permission.RECORD_AUDIO" /> <queries> <package android:name="com.google.android.googlequicksearchbox"/> </queries> queries> <intent> <action android:name="android.speech.RecognitionService" /> </intent> </queries> <queries> <intent> <action android:name="android.speech.SpeechRecognizer" /> </intent> </queries>
last step make sure google llc is installed on your device :) this worked for me