-
Notifications
You must be signed in to change notification settings - Fork 238
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can't get locales on Android #505
Comments
Is this on a real device or a simulator? If real which device? I'm definitely not happy with that method of getting the locales. Sure wish Android with fix the default previously working method or implement their suggested new method consistently. However, I've never seen it just hang. That's very surprising. Can you do a run with |
This is on a real device Xiaomi Poco F3 (M2012K11AG). I use LineageOS 20 (Android 13) with all available Android patches until 05.04.2024, so the System is very up-to date. This is the output:
I should have everything set up: |
So on newer Android builds locales are retrieved using on device speech recognition if it is available. From what I've seen in the past some devices, possibly including Xiaomi do not fully implement all parts of Android. I think there is/was some disagreement with Google that blocked it. I wonder if the on device speech recognition is not working. I'll have a look at the way it looks up the on device and see if maybe it's failing to catch an exception or something there. |
I'm using LineageOS which should be almost vanilla Android. |
@sowens-csd when you can give me a bit of guidance on how to debug it, I will happily do it. I'm just not really familiar with native android to build up a small test application with ease. |
Thanks for the offer. I’d love to work with you on it. Unfortunately it will be a few weeks. I’ll post again when I can work on it. Sorry for the delay. |
@Solorwind I didn't find a solution and moved to another library. Google now offers a very simply voice input sheet on Android that only requires a single call. But since you seem to target iOS, I cannot help you out with that. |
Can you please tell me which library you have moved into |
I have the same problem, and the strange thing is that I was able to get a lot of language lists last week, but now I can only get one language. |
await speechToText.initialize( And on Samsung phones you must add this SpeechToText.androidIntentLookup, |
I tried to run the example but the call
SpeechToTextPlatform.instance.locales()
is never returning on my device. I tried several rebuilds and reinstalls, but it wouldn't work. I have two languages offline installed. I tried to fish with logcat, but there is nothing. Flutter is not throwing anything as well.Edit: Tag v6.2.0 is working (but only showing one of my two available languages), all version above are not working. I'm on Flutter 3.21.0-1.0.pre.2
Edit: After setting up a new example I can identify that the following version breaks the locales platform call on my device (Android 13):
The text was updated successfully, but these errors were encountered: