csdcorp / speech_to_text

A Flutter plugin that exposes device specific text to speech recognition capability.
BSD 3-Clause "New" or "Revised" License
351 stars 218 forks source link

Not working on Android 12 #265

Closed tamoyal closed 2 years ago

tamoyal commented 2 years ago

I just upgraded my device to Android 12 and speech recognition stopped working. onResult never gets called. Any chance you have tried this yet? Thanks!

rayrapetyan commented 2 years ago

Same here.

sowens-csd commented 2 years ago

I have not, will do now in a simulator and see what's up.

sbis04 commented 2 years ago

Yes, same for me too. I just updated to Android 12 today and this plugin stopped working, showing error_unknown as the error message.

sowens-csd commented 2 years ago

I have confirmed that it certainly looks like there is a problem in Android 12 (API 31). At least I have sound level notifications happening in an emulator but no recognized words being returned via the results callback. Exploring further.

sowens-csd commented 2 years ago

I reconfigured the emulator and it is now working. Looks like for me at least the problem was in the microphone configuration for the emulator. So right now I don't know if there is a new problem or not. Can someone who can reproduce the problem try the example app on their device and let me know if it is working? If not could you set debugLogging to true on the initialize method and send me a log? Also details about the device type, version of the plugin you're using, Flutter version, and anything else you think might be relevant?

tamoyal commented 2 years ago

Hey @sowens-csd, as always, thanks for your fast response! I can't get the example app to run due to this:

Execution failed for task ':app:stripDebugDebugSymbols'.
> No version of NDK matched the requested version 20.0.5594570. Versions available locally: 23.0.7599858

but I did run my own app which works on Android 11 but not Android 12 and got this debug log for ya (on Android 12)

D/SpeechToTextPlugin(10919): Start initialize
D/SpeechToTextPlugin(10919): Checked permission
D/SpeechToTextPlugin(10919): has permission, completing
D/SpeechToTextPlugin(10919): completeInitialize
D/SpeechToTextPlugin(10919): Testing recognition availability
D/SpeechToTextPlugin(10919): Creating recognizer
D/SpeechToTextPlugin(10919): Setting listener
D/SpeechToTextPlugin(10919): before setup intent
D/SpeechToTextPlugin(10919): setupRecognizerIntent
D/SpeechToTextPlugin(10919): after setup intent
D/SpeechToTextPlugin(10919): sending result
D/SpeechToTextPlugin(10919): leaving complete
D/SpeechToTextPlugin(10919): leaving initializeIfPermitted
D/SpeechToTextPlugin(10919): In RecognizerIntent apply
D/SpeechToTextPlugin(10919): put model
D/SpeechToTextPlugin(10919): put package
D/SpeechToTextPlugin(10919): put partial
D/SpeechToTextPlugin(10919): Start listening
D/SpeechToTextPlugin(10919): setupRecognizerIntent
D/SpeechToTextPlugin(10919): Notify status:listening
D/SpeechToTextPlugin(10919): Start listening done
D/SpeechToTextPlugin(10919): In RecognizerIntent apply
D/SpeechToTextPlugin(10919): put model
D/SpeechToTextPlugin(10919): put package
D/SpeechToTextPlugin(10919): put partial
D/SpeechToTextPlugin(10919): put languageTag
D/SpeechToTextPlugin(10919): rmsDB -2.0 / -2.0
D/SpeechToTextPlugin(10919): Error 12 after start at 127 -2.0 / -2.0
D/SpeechToTextPlugin(10919): Notify status:notListening
D/SpeechToTextPlugin(10919): Notify status:doneNoResult
sowens-csd commented 2 years ago

Okay, error 12 is very interesting. That's a new error value that was added in Android 12, here's the description:

Requested language is not available to be used with the current recognizer.

What language code are you sending in the listen method?

I should add handling for the new Android 12 error codes to my error handling method.

sbis04 commented 2 years ago

@sowens-csd I just tested with the example app (present here) on my Pixel 4a with Android 12. it produced "Error 12":

D/SpeechToTextPlugin( 9837): Start initialize
D/SpeechToTextPlugin( 9837): Checked permission
D/SpeechToTextPlugin( 9837): Requesting permission
D/SpeechToTextPlugin( 9837): leaving initializeIfPermitted
D/SpeechToTextPlugin( 9837): completeInitialize
D/SpeechToTextPlugin( 9837): Testing recognition availability
D/SpeechToTextPlugin( 9837): Creating recognizer
D/SpeechToTextPlugin( 9837): Setting listener
D/SpeechToTextPlugin( 9837): before setup intent
D/SpeechToTextPlugin( 9837): setupRecognizerIntent
D/SpeechToTextPlugin( 9837): after setup intent
D/SpeechToTextPlugin( 9837): sending result
D/SpeechToTextPlugin( 9837): leaving complete
D/SpeechToTextPlugin( 9837): In RecognizerIntent apply
D/SpeechToTextPlugin( 9837): put model
D/SpeechToTextPlugin( 9837): put package
D/SpeechToTextPlugin( 9837): put partial
D/SpeechToTextPlugin( 9837): Received extra language broadcast
D/SpeechToTextPlugin( 9837): Extra supported languages
D/SpeechToTextPlugin( 9837): Start listening
D/SpeechToTextPlugin( 9837): setupRecognizerIntent
D/SpeechToTextPlugin( 9837): Notify status:listening
D/SpeechToTextPlugin( 9837): Start listening done
D/SpeechToTextPlugin( 9837): In RecognizerIntent apply
D/SpeechToTextPlugin( 9837): put model
D/SpeechToTextPlugin( 9837): put package
D/SpeechToTextPlugin( 9837): put partial
D/SpeechToTextPlugin( 9837): put languageTag
D/SpeechToTextPlugin( 9837): rmsDB -2.0 / -2.0
D/SpeechToTextPlugin( 9837): Error 12 after start at 76 -2.0 / -2.0
D/SpeechToTextPlugin( 9837): Notify status:notListening
D/SpeechToTextPlugin( 9837): Notify status:doneNoResult

I used exactly the example code, so inside the listen method the language code retrieved using the following is used:

var systemLocale = await speech.systemLocale();
 _currentLocaleId = systemLocale!.localeId;

My default system language is English (India) on my phone. But I tried by changing the language to English (United States) too but still Error 12.

sowens-csd commented 2 years ago

This is really helpful, thank you. Is Google Assistant working properly on the device in either of those languages?

Could you add some print statements to the example app to log what the value of _currentLocaleId is just before the listen method is called? I'm wondering if there has been a format change for some languages in Android 12 that is causing an issue.

rayrapetyan commented 2 years ago

With _currentLocaleId printed:

I/flutter (19588): _currentLocaleId: en_US
D/SpeechToTextPlugin(19588): Start listening
D/SpeechToTextPlugin(19588): setupRecognizerIntent
D/SpeechToTextPlugin(19588): Notify status:listening
D/SpeechToTextPlugin(19588): Start listening done
D/SpeechToTextPlugin(19588): In RecognizerIntent apply
D/SpeechToTextPlugin(19588): put model
D/SpeechToTextPlugin(19588): put package
D/SpeechToTextPlugin(19588): put partial
D/SpeechToTextPlugin(19588): put languageTag
D/SpeechToTextPlugin(19588): rmsDB -2.0 / -2.0
D/SpeechToTextPlugin(19588): Error 12 after start at 47 -2.0 / -2.0
D/SpeechToTextPlugin(19588): Notify status:notListening
D/SpeechToTextPlugin(19588): Notify status:doneNoResult
sbis04 commented 2 years ago

This is really helpful, thank you. Is Google Assistant working properly on the device in either of those languages?

Could you add some print statements to the example app to log what the value of _currentLocaleId is just before the listen method is called? I'm wondering if there has been a format change for some languages in Android 12 that is causing an issue.

Yes, I also checked the exact same things. Google assistant is working perfectly on the device, and I also checked whether the voice was installed by going inside the Accessibility settings of the device, it was also installed.

I added print statements inside the initSpeechState method like this:

var systemLocale = await speech.systemLocale();
_currentLocaleId = systemLocale!.localeId;
print(_currentLocaleId);

Here are the logs with the default first and then changing to English (US):

D/SpeechToTextPlugin(21877): Start initialize
D/SpeechToTextPlugin(21877): Checked permission
D/SpeechToTextPlugin(21877): has permission, completing
D/SpeechToTextPlugin(21877): completeInitialize
D/SpeechToTextPlugin(21877): Testing recognition availability
D/SpeechToTextPlugin(21877): Creating recognizer
D/SpeechToTextPlugin(21877): Setting listener
D/SpeechToTextPlugin(21877): before setup intent
D/SpeechToTextPlugin(21877): setupRecognizerIntent
D/SpeechToTextPlugin(21877): after setup intent
D/SpeechToTextPlugin(21877): sending result
D/SpeechToTextPlugin(21877): leaving complete
D/SpeechToTextPlugin(21877): leaving initializeIfPermitted
D/SpeechToTextPlugin(21877): In RecognizerIntent apply
D/SpeechToTextPlugin(21877): put model
D/SpeechToTextPlugin(21877): put package
D/SpeechToTextPlugin(21877): put partial
D/SpeechToTextPlugin(21877): Received extra language broadcast
D/SpeechToTextPlugin(21877): Extra supported languages
I/flutter (21877): en_IN
D/SpeechToTextPlugin(21877): Start listening
D/SpeechToTextPlugin(21877): setupRecognizerIntent
D/SpeechToTextPlugin(21877): Notify status:listening
D/SpeechToTextPlugin(21877): Start listening done
D/SpeechToTextPlugin(21877): In RecognizerIntent apply
D/SpeechToTextPlugin(21877): put model
D/SpeechToTextPlugin(21877): put package
D/SpeechToTextPlugin(21877): put partial
D/SpeechToTextPlugin(21877): put languageTag
D/SpeechToTextPlugin(21877): rmsDB -2.0 / -2.0
D/SpeechToTextPlugin(21877): Error 12 after start at 68 -2.0 / -2.0
D/SpeechToTextPlugin(21877): Notify status:notListening
D/SpeechToTextPlugin(21877): Notify status:doneNoResult
I/flutter (21877): en_US
sowens-csd commented 2 years ago

Thanks, this gives me a lot more to go on. Not sure why I'm not seeing that problem but it could be a real device vs. simulator issue. Searching for clues now.

sowens-csd commented 2 years ago

Well this would be surprising if true. Can you try a test with a language of en-US instead of en_US. It looks like the first is the correct format while the second is what I've always used, apparently successfully until now.

rayrapetyan commented 2 years ago

FYI I've always used:

final String DefaultLocale = Platform.isAndroid ? 'en_US' : 'en-US';

sowens-csd commented 2 years ago

But Android 12 still doesn't work with en-US?

sbis04 commented 2 years ago

I just tested with en-US it worked but with en-IN it doesn't, it's weird 🤔

sowens-csd commented 2 years ago

We're making some progress though, that's good. Does en_IN appear on the returned locales list?

sbis04 commented 2 years ago

Yes, en_IN appears in the locales list, see above it got printed even in logs.

sbis04 commented 2 years ago

Also, we tried testing on our production app, there seem to be some other issues as well. Now, as the button is pressed in the app which calls the listen, there's no starting sound before listening starts. With that, as we speak something the starting and recognized sounds play simultaneously.

Second case, if the button is tapped once to call the listen (no starting sound or anything) and then tapped the second time the staring and stopping sounds play simultaneously.

NOTE: Though the starting sound doesn't play but the mic seems to get activated as in Android 12 there's a dedicated indicator built in Android.

sowens-csd commented 2 years ago

I see the log message, there is a slight oddness in the way I pick up the default language that differs from the way all the other members of the list are treated. Could you try an experiment and change the default language on the device to something else and then see if the locales list still contains en_IN?

sbis04 commented 2 years ago

Okay, I'm trying in a minute.

In accordance with the above issue with starting listening (the start sound still doesn't play), but here's the log's while listening:

D/SpeechToTextPlugin( 8603): Calling results callback
D/SpeechToTextPlugin( 8603): Notify status:notListening
D/SpeechToTextPlugin( 8603): Notify status:done
I/flutter ( 8603): SpeechRecognitionResult words: [SpeechRecognitionWords words: Hi,  confidence: -1.0], final: false
D/SpeechToTextPlugin( 8603): rmsDB 1.72 / 10.0
D/SpeechToTextPlugin( 8603): rmsDB -2.0 / 10.0
I/flutter ( 8603): notListening
D/SpeechToTextPlugin( 8603): Calling results callback
I/flutter ( 8603): SpeechRecognitionResult words: [SpeechRecognitionWords words: Hi there,  confidence: -1.0], final: false
D/SpeechToTextPlugin( 8603): Calling results callback
I/flutter ( 8603): SpeechRecognitionResult words: [SpeechRecognitionWords words: Hi there,  confidence: 0.0, SpeechRecognitionWords words: Hi dear,  confidence: 0.0], final: true
I/flutter ( 8603): Words recog: Hi there
I/flutter ( 8603): done

The confidence is now always returning "0.0", there was a check for that in my app whether it is above 0.5 because of that it wasn't proceeding in my app. But any clues why the confidence is "0.0" every time (using "en-US")?

sowens-csd commented 2 years ago

No, I don't understand the low confidence score. Is the behaviour you described new as of Android 12?

sbis04 commented 2 years ago

Yes, only in Android 12. On other devices below this API level, everything is fine. We have a lot of users using without any issues having Android 11 or below.

sbis04 commented 2 years ago

Also, I just tested by changing the default device language to English US. Now, using en-US gives a different error:

D/SpeechToTextPlugin(21439): Start initialize
D/SpeechToTextPlugin(21439): Checked permission
D/SpeechToTextPlugin(21439): has permission, completing
D/SpeechToTextPlugin(21439): completeInitialize
D/SpeechToTextPlugin(21439): Testing recognition availability
D/SpeechToTextPlugin(21439): sending result
D/SpeechToTextPlugin(21439): leaving complete
D/SpeechToTextPlugin(21439): leaving initializeIfPermitted
D/SpeechToTextPlugin(21439): Received extra language broadcast
D/SpeechToTextPlugin(21439): Extra supported languages
I/flutter (21439): en-US
D/SpeechToTextPlugin(21439): Start listening
D/SpeechToTextPlugin(21439): setupRecognizerIntent
D/SpeechToTextPlugin(21439): Notify status:listening
D/SpeechToTextPlugin(21439): Start listening done
D/SpeechToTextPlugin(21439): rmsDB -2.0 / -2.0
D/SpeechToTextPlugin(21439): Error 5 after start at 46 -2.0 / -2.0
D/SpeechToTextPlugin(21439): Notify status:notListening
D/SpeechToTextPlugin(21439): Notify status:doneNoResult

And, en-IN is in the locale list, and using it gives the error 12 again.

sbis04 commented 2 years ago

@sowens-csd An update, the default language started working, confidence works now and also the weird staring issue got solved. This seems like an Android 12 bug of some kind.

What I did is, changed the default language (en-IN) to en-US and then back to en-IN, and restarted the device. This fixed the bug. But I checked google assistant was working fine all the time whatever is the default language.

So, currently it works for the en-IN but not for any other format of "en" (like not working for en-US). This never happened on any API version below this.

I forgot to mention one thing, there was a small update in Android 12 of some kind, maybe that fixed the issue. Because the default version of the app (with en_IN) now started working without any changes, not even the en-IN change is required now.

davidd647 commented 2 years ago

I believe I've been having the same problem. I'm running a Pixel 3 (Android 12), hooked up to my M1 Macbook Pro (Flutter, VS Code).

STT wasn't working on my live app until I reset my phone just now. On tapping record, very small time elapses before output showed "error_unknown - true". I got the same output from the code @sbis04 mentioned above (just had to remove the iconButton in the code and ensured _currentLocaleId wasn't assigned a null value to run it)...

After restarting my phone, the live app now works! 😃 The only problem that remains is the error on the example code - which has changed to "error_speech_timeout - true". The time elapsed between tapping 'start' and it stopping is very short (maybe instant).

If I can help you with any error output, please let me know. I will try hard to be as concise and clear as possible. I'm very grateful for your hard work!

sowens-csd commented 2 years ago

Here's what I believe is the current state of the language code issue. Please correct me if this is not true for you:

@tamoyal can you see if a restart or Android update resolves your issue and report back? Also, if you could change the title of this to something like 'Language code not recognized on Android 12' since I'd like to start another issue for the problems with short timeouts.

@davidd647 would you mind creating a separate issue to track the timeout problem with the example app? It would be helpful if you included any difference between the initialize and listen calls in your app vs. the example app. I think this is the same error that @sbis04 mentioned above so we should move that over to a separate issue.

rayrapetyan commented 2 years ago

Restarting phone resolved the issue..

tamoyal commented 2 years ago

@sowens-csd so far what I have seen is that a user with a Pixel 5 and Android 12 restarted their phone and that solved the issue. Another user with a Pixel 3 and Android 12 restarted and it did not solve the issue, however they are the only user with a Pixel 3 so it's possible speech recognition never worked on a Pixel 3? When you talk about the patch, you basically mean update to the absolute latest version of Android 12, correct?

sowens-csd commented 2 years ago

Yes update to the latest version. I'm not sure if that was a factor in some of the other resolutions but someone suggested that it might have been. I have no reason to believe it wouldn't work on a Pixel 3. If that device had Google Assistant working then speech recognition should work.

davidd647 commented 2 years ago

Just to clarify - resetting my phone resolved an issue - probably the issue described above.

I still have another issue, but after some thought, I realized that it's probably something I can fix and isn't relevant here.

I'll see if I can submit a PR for the example code when I can get it to work on my machine.

Edit: To clarify a bit more - the code for the app I made is working, just not the example code.

sowens-csd commented 2 years ago

The repo version now adds error handling for the new SDK 31 error codes. This will be in 5.2.1. I think this is the only change required to close this issue.

sowens-csd commented 2 years ago

This is interesting, not sure whether it's new documentation or I just missed it before but the Android docs say this:

Please note that setRecognitionListener(android.speech.RecognitionListener) should be called before dispatching any command to the created SpeechRecognizer, otherwise no notifications will be received. This method must be called from the main thread of your app.

While I do call setRecognitionListener it is not being called from the main thread. That might explain some flakiness. I've just pushed an experimental change to that. It works on my local devices. If someone could try it on an Android 12 device and let me know if there are any issues that would be great, thanks!

sbis04 commented 2 years ago

@sowens-csd thanks for this update, this fixed every issue that I was facing! Amazing 🎉

I tried it on my Android 12 device, it works perfectly now. All the language changes also work now, tried my native languages too.

Logs

```sh D/SpeechToTextPlugin( 7453): Start initialize D/SpeechToTextPlugin( 7453): Checked permission D/SpeechToTextPlugin( 7453): has permission, completing D/SpeechToTextPlugin( 7453): completeInitialize D/SpeechToTextPlugin( 7453): Testing recognition availability D/SpeechToTextPlugin( 7453): sending result D/SpeechToTextPlugin( 7453): leaving complete D/SpeechToTextPlugin( 7453): leaving initializeIfPermitted D/SpeechToTextPlugin( 7453): Received extra language broadcast D/SpeechToTextPlugin( 7453): Extra supported languages I/flutter ( 7453): 2021-11-07T19:21:30.089600 start listening D/SpeechToTextPlugin( 7453): Start listening D/SpeechToTextPlugin( 7453): setupRecognizerIntent D/SpeechToTextPlugin( 7453): Notify status:listening D/SpeechToTextPlugin( 7453): Start listening done I/flutter ( 7453): 2021-11-07T19:21:30.158696 Received listener status: listening, listening: true D/SpeechToTextPlugin( 7453): rmsDB -2.0 / -2.0 3 D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 1.6000001 4 D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 4.84 11 D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 5.68 22 D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 10.0 D/SpeechToTextPlugin( 7453): Calling results callback 2 D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 10.0 I/flutter ( 7453): 2021-11-07T19:21:31.234844 Result listener final: false, words: , confidence: -1.0 36 D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 10.0 D/SpeechToTextPlugin( 7453): Notify status:notListening D/SpeechToTextPlugin( 7453): Notify status:done D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 10.0 D/SpeechToTextPlugin( 7453): Calling results callback I/flutter ( 7453): 2021-11-07T19:21:31.987212 Received listener status: notListening, listening: false I/flutter ( 7453): 2021-11-07T19:21:31.988685 Result listener final: false, words: hello, confidence: -1.0 D/SpeechToTextPlugin( 7453): Calling results callback I/flutter ( 7453): 2021-11-07T19:21:32.121700 Result listener final: true, words: hello, confidence: 0.9299549 I/flutter ( 7453): 2021-11-07T19:21:32.122667 Received listener status: done, listening: false I/flutter ( 7453): en_US I/flutter ( 7453): 2021-11-07T19:21:41.238992 start listening D/SpeechToTextPlugin( 7453): Start listening D/SpeechToTextPlugin( 7453): setupRecognizerIntent D/SpeechToTextPlugin( 7453): Notify status:listening D/SpeechToTextPlugin( 7453): Start listening done D/SpeechToTextPlugin( 7453): In RecognizerIntent apply D/SpeechToTextPlugin( 7453): put model D/SpeechToTextPlugin( 7453): put package D/SpeechToTextPlugin( 7453): put partial D/SpeechToTextPlugin( 7453): put languageTag I/flutter ( 7453): 2021-11-07T19:21:41.286458 Received listener status: listening, listening: true D/SpeechToTextPlugin( 7453): rmsDB -2.0 / -2.0 3 D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 1.6000001 4 D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 4.84 11 D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 5.68 22 D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 10.0 D/SpeechToTextPlugin( 7453): Calling results callback 2 D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 10.0 I/flutter ( 7453): 2021-11-07T19:21:31.234844 Result listener final: false, words: , confidence: -1.0 36 D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 10.0 D/SpeechToTextPlugin( 7453): Notify status:notListening D/SpeechToTextPlugin( 7453): Notify status:done D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 10.0 D/SpeechToTextPlugin( 7453): Calling results callback I/flutter ( 7453): 2021-11-07T19:21:31.987212 Received listener status: notListening, listening: false I/flutter ( 7453): 2021-11-07T19:21:31.988685 Result listener final: false, words: hello, confidence: -1.0 D/SpeechToTextPlugin( 7453): Calling results callback I/flutter ( 7453): 2021-11-07T19:21:32.121700 Result listener final: true, words: hello, confidence: 0.9299549 I/flutter ( 7453): 2021-11-07T19:21:32.122667 Received listener status: done, listening: false I/flutter ( 7453): en_US I/flutter ( 7453): 2021-11-07T19:21:41.238992 start listening D/SpeechToTextPlugin( 7453): Start listening D/SpeechToTextPlugin( 7453): setupRecognizerIntent D/SpeechToTextPlugin( 7453): Notify status:listening D/SpeechToTextPlugin( 7453): Start listening done D/SpeechToTextPlugin( 7453): In RecognizerIntent apply D/SpeechToTextPlugin( 7453): put model D/SpeechToTextPlugin( 7453): put package D/SpeechToTextPlugin( 7453): put partial D/SpeechToTextPlugin( 7453): put languageTag I/flutter ( 7453): 2021-11-07T19:21:41.286458 Received listener status: listening, listening: true D/SpeechToTextPlugin( 7453): rmsDB -2.0 / -2.0 D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 1.3600001 4 D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 2.44 4 D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 6.2799997 D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 7.0 22 D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 9.28 D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 9.5199995 D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 9.64 22 D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 10.0 D/SpeechToTextPlugin( 7453): Calling results callback I/flutter ( 7453): 2021-11-07T19:21:42.606612 Result listener final: false, words: , confidence: -1.0 34 D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 10.0 D/SpeechToTextPlugin( 7453): Notify status:notListening D/SpeechToTextPlugin( 7453): Notify status:done I/flutter ( 7453): 2021-11-07T19:21:43.364952 Received listener status: notListening, listening: false D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 10.0 D/SpeechToTextPlugin( 7453): Calling results callback I/flutter ( 7453): 2021-11-07T19:21:43.487981 Result listener final: true, words: hello, confidence: 0.9299549 I/flutter ( 7453): 2021-11-07T19:21:43.488287 Received listener status: done, listening: false I/flutter ( 7453): bn_IN I/flutter ( 7453): 2021-11-07T19:21:58.858466 start listening D/SpeechToTextPlugin( 7453): Start listening D/SpeechToTextPlugin( 7453): setupRecognizerIntent D/SpeechToTextPlugin( 7453): Notify status:listening D/SpeechToTextPlugin( 7453): Start listening done D/SpeechToTextPlugin( 7453): In RecognizerIntent apply D/SpeechToTextPlugin( 7453): put model D/SpeechToTextPlugin( 7453): put package D/SpeechToTextPlugin( 7453): put partial D/SpeechToTextPlugin( 7453): put languageTag I/flutter ( 7453): 2021-11-07T19:21:58.860691 Received listener status: listening, listening: true D/SpeechToTextPlugin( 7453): rmsDB -2.0 / -2.0 D/SpeechToTextPlugin( 7453): rmsDB -2.0 / -1.76 D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 0.63999987 D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 1.1199999 7 D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 5.56 14 D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 7.0 D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 8.799999 15 D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 10.0 D/SpeechToTextPlugin( 7453): Calling results callback D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 10.0 I/flutter ( 7453): 2021-11-07T19:21:59.988702 Result listener final: false, words: , confidence: -1.0 2 D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 10.0 D/SpeechToTextPlugin( 7453): Calling results callback I/flutter ( 7453): 2021-11-07T19:22:00.031280 Result listener final: false, words: , confidence: -1.0 4 D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 10.0 D/SpeechToTextPlugin( 7453): Calling results callback D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 10.0 I/flutter ( 7453): 2021-11-07T19:22:00.123392 Result listener final: false, words: , confidence: -1.0 30 D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 10.0 D/SpeechToTextPlugin( 7453): Notify status:notListening D/SpeechToTextPlugin( 7453): Notify status:done I/flutter ( 7453): 2021-11-07T19:22:00.811147 Received listener status: notListening, listening: false D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 10.0 D/SpeechToTextPlugin( 7453): Calling results callback I/flutter ( 7453): 2021-11-07T19:22:00.944255 Result listener final: true, words: কি হলো, confidence: 0.82102835 I/flutter ( 7453): 2021-11-07T19:22:00.944573 Received listener status: done, listening: false I/flutter ( 7453): hi_IN I/flutter ( 7453): 2021-11-07T19:22:16.369424 start listening D/SpeechToTextPlugin( 7453): Start listening D/SpeechToTextPlugin( 7453): setupRecognizerIntent D/SpeechToTextPlugin( 7453): Notify status:listening D/SpeechToTextPlugin( 7453): Start listening done D/SpeechToTextPlugin( 7453): In RecognizerIntent apply D/SpeechToTextPlugin( 7453): put model D/SpeechToTextPlugin( 7453): put package D/SpeechToTextPlugin( 7453): put partial D/SpeechToTextPlugin( 7453): put languageTag I/flutter ( 7453): 2021-11-07T19:22:16.371921 Received listener status: listening, listening: true D/SpeechToTextPlugin( 7453): rmsDB -2.0 / -2.0 3 D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 2.44 5 D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 5.56 18 D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 8.559999 D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 9.4 17 D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 9.64 D/SpeechToTextPlugin( 7453): Calling results callback D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 9.64 I/flutter ( 7453): 2021-11-07T19:22:17.499806 Result listener final: false, words: , confidence: -1.0 9 D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 9.64 D/SpeechToTextPlugin( 7453): Calling results callback D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 9.64 I/flutter ( 7453): 2021-11-07T19:22:17.699466 Result listener final: false, words: , confidence: -1.0 16 D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 9.64 D/SpeechToTextPlugin( 7453): Calling results callback I/flutter ( 7453): 2021-11-07T19:22:18.066878 Result listener final: false, words: क्या, confidence: -1.0 10 D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 9.64 D/SpeechToTextPlugin( 7453): Calling results callback I/flutter ( 7453): 2021-11-07T19:22:18.266691 Result listener final: false, words: क्या हुआ, confidence: -1.0 9 D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 9.64 D/SpeechToTextPlugin( 7453): Notify status:notListening D/SpeechToTextPlugin( 7453): Notify status:done I/flutter ( 7453): 2021-11-07T19:22:18.439430 Received listener status: notListening, listening: false D/SpeechToTextPlugin( 7453): rmsDB -2.0 / 9.64 D/SpeechToTextPlugin( 7453): Calling results callback I/flutter ( 7453): 2021-11-07T19:22:18.558551 Result listener final: true, words: क्या हुआ, confidence: 0.95774883 I/flutter ( 7453): 2021-11-07T19:22:18.558823 Received listener status: done, listening: false ```

Please publish this version to pub.dev. Thanks!

sowens-csd commented 2 years ago

What?! That's amazing, thanks so much for trying that so quickly. I'll run some more tests here but unless I hear negatives I'll publish this change as 5.2.0 by tomorrow AM.

sowens-csd commented 2 years ago

5.2.0 is now live on pub.dev. Thanks for all the help on this issue. I'm going to leave this open for a couple of days to see if there are any new reports with 5.2.0.

tamoyal commented 2 years ago

I'm going to release this to production now @sowens-csd and I will let you know if anyone has the issue. I can't reproduce right now. Thanks!

sowens-csd commented 2 years ago

I think this is resolved. Please open a new issue if you see any problems.