Closed Tanelo closed 3 years ago
Have you tried following the steps in the troubleshooting section of the README doc for checking for speech availability on the device?
@sowens-csd Yes I did ! Thanks for answering
I think it has to do with the fact that it "is not available on my device"
What is below is on my device
E/SpeechToTextPlugin(23472): Speech recognition not available on this device
E/flutter (23472): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: PlatformException(recognizerNotAvailable, Speech recognition not available on this device, , null)
E/flutter (23472): #0 StandardMethodCodec.decodeEnvelope
package:flutter/…/services/message_codecs.dart:582
E/flutter (23472): #1 MethodChannel._invokeMethod
package:flutter/…/services/platform_channel.dart:159
E/flutter (23472):
However, when running on the android emulator, a different type of error occurs (however I've read all the readme). Launching lib/main.dart on sdk gphone x86 arm in debug mode... What is below is on the emulator lib/main.dart:1 ✓ Built build/app/outputs/flutter-apk/app-debug.apk. Connecting to VM Service at ws://127.0.0.1:55540/0qfsIlv19Lg=/ws I/flutter ( 6006): onStatus: listening I/flutter ( 6006): onError: SpeechRecognitionError msg: error_permission, permanent: true I/flutter ( 6006): onStatus: notListening
Yes, that's a common problem on emulators, you frequently have to explicitly install speech recognition on emulators using the steps from that troubleshooting link. It is a little less common for physical devices though not unheard of.
If the steps in the troubleshooting guide didn't help what's the device type and OS version? You could try passing in the options
array on the initialize
method with androidIntentLookup
as the only member. I'd be curious if that works. It works around devices that don't use the Android default speech recognizer intent.
My message was not clear enough, can you read it again ? Sorry :(
What concerns me is about the physical device..
Sorry, I should have specified. The directions I provided were for you to try on the physical device. And I would like to know the device type and OS version for the physical device.
It is Huawei P40 Lite E, android 10, modèle : ART-L29. Yes I've followed the directions on troobleshooting. But i don't understand the new directions you shared.
I don't get that part : ' You could try passing in the options array on the initialize method with androidIntentLookup as the only member'
Interesting, Huawei is one of the models that I think I have seen this issue with, that makes the options worth trying. Try this:
var hasSpeech = await speech.initialize(
onError: errorListener, onStatus: statusListener, debugLogging: true, options: [SpeechToText.androidIntentLookup]);
Not working after modifications : V/AudioManager(29390): querySoundEffectsEnabled... D/SpeechToTextPlugin(29390): Start initialize D/SpeechToTextPlugin(29390): Checked permission D/SpeechToTextPlugin(29390): has permission, completing D/SpeechToTextPlugin(29390): completeInitialize D/SpeechToTextPlugin(29390): Testing recognition availability E/SpeechToTextPlugin(29390): Speech recognition not available on this device D/SpeechToTextPlugin(29390): leaving initializeIfPermitted E/flutter (29390): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: PlatformException(recognizerNotAvailable, Speech recognition not available on this device, , null)
Not working on the simulator either.. With the same error...
Based on these results it looks to me like speech recognition is not installed on those devices. Is the Google speech assistant working on those devices? That's one way to verify that speech recognition at least might be functioning on them.
I dont think this thing is avaible. It is Huawei assistant. I'll try later on an other Android assistant.
Still the plugin is not working on the emulator either.
Any updates on this issue? Were you able to get it working on a device?
It's working fine on another device. Thanks !
it works on other devices that has a version of 12 and beyond but 11 and below it doesnt work.
how can i resolve this in order for it to work on any version of android devices
It seems that running speech_to_text is not possible on my device. `E/SpeechToTextPlugin(18694): Speech recognition not available on this device
E/flutter (18694): [ERROR:flutter/lib/ui/ui_dart_state.cc(177)] Unhandled Exception: PlatformException(recognizerNotAvailable, Speech recognition not available on this device, , null)
I've also tried to put the