flutter_tts
flutter_tts copied to clipboard
Example code not loading engines or languages on emulator
💬 Questions and Help
I'm having trouble getting TTS to work on my codebase when using an emulator that is running Android 11 (tested on multiple emulators). For testing I copied the example code into my codebase and it is stuck on "Loading engines..." and "Loading Languages..." This same code works fine on Android 10 on the emulator, and it also works on Android 11 on physical devices, just not emulated Android 11 devices.
Configuration:
- In
android/app/build.gradle
I have the minimum Android SDK version set to 21 as instructed in the README. - Dart SDK constraints: ">=2.6.0 <3.0.0"
- flutter_tts version: 3.2.1
I have tried with and without the following included in the manifest file and it made no difference:
<manifest ... >
...
<queries>
<intent>
<action android:name="TextToSpeech.Engine.INTENT_ACTION_TTS_SERVICE" />
</intent>
</queries>
...
</manifest>
I'm not sure that I am including this correctly though.
@jlanoieuri have you tried with new API versions? Although API level 21 is the min supported, it's very limited.
I am facing the same issue. It works with android 10 emulator, API 29; doesn't work with android 11 emulator, API 30. It works on physical device though.
@sandeshgoel have you tried the latest 3.2.2 version for working with android 11? You may need to run a flutter clean
before building.
@sandeshgoel have you tried the latest 3.2.2 version for working with android 11? You may need to run a
flutter clean
before building.
I use the latest sample code, running on a Lenovo Tab-X616F device, Android version 10, unable to speak. The sample code has been loading engines...
@Rob-wang do you see any error messages that could be helpful in troubleshooting your issue?
@Rob-wang do you see any error messages that could be helpful in troubleshooting your issue?
NO, No error displayed
@Rob-wang what version of flutter are you on?
@Rob-wang what version of flutter are you on?
macOS Big Sur 11.5.2 Flutter 2.5.1 • channel stable • Tools • Dart 2.14.2
我应该也是这个问题,getEngines只获得了com.samsung.SMT
@Rob-wang okay I don't have that device, but I'll try to replicate the issue.
@Rob-wang okay I don't have that device, but I'll try to replicate the issue.
thanks. If it is repaired, can you reply to me? Looking forward to your good news
Is there any solution ? I got same error when i tried at android emulator .
API : 30 Android API 11.0 Device : Pixel 4 XL @dlutton @Rob-wang