Version 3.5.3 getEngines won't return complete list of available engines
🐛 Bug Report
When using version 3.5.3, calling getEngines won't return all the available engines installed on device.
Expected behavior
FlutterTts getEngines method on version 3.5.1 returns all the available engines installed on my device:
[com.samsung.SMT, com.google.android.tts, com.acapelagroup.android.tts, com.cereproc.Gabriel, com.github.olga_yakovleva.rhvoice.android, com.redzoc.ramees.tts.espeak]
But if I upgrade to version 3.5.3, it returns only:
[com.samsung.SMT, com.google.android.tts]
Same issue was observed across three different samsung devices (Galaxy s21, a7 5g and Galaxy tab a7 lite).
Same issue was observed using a stripped-down project that only instantiates FlutterTts and lists engines.
Tried version 3.5.2, but my project couldn't compile declaring this version as dependency.
Reproduction steps
Calling getEngines after instantiating FlutterTts.
Configuration
Version: 3.5.3
Platform:
- [ ] :iphone: iOS
- [x] :robot: Android
@chimura can you confirm if this is still an issue with the latest version? The only difference in the android code is a conversion to Kotlin.
Same issue with me. Confirm in OPPO and HUAWEI phones. OPPO has two engines but gets nothing. HUAWEI has four engines but gets only one.
@joyjiyuan @chimura are you waiting for TTS to be initialized before you call the getEngines method? I added an initHandler for Android so you could do something like this:
flutterTts.setInitHandler(() {
await flutterTts.getEngines;
});
of course you'll want to save it to a value so you can print them out for testing.
@joyjiyuan @chimura are you waiting for TTS to be initialized before you call the getEngines method? I added an initHandler for Android so you could do something like this:
flutterTts.setInitHandler(() { await flutterTts.getEngines; });of course you'll want to save it to a value so you can print them out for testing.
Yes. I had used the call back, but the results are same.
@joyjiyuan @chimura can you confirm when you get a moment if this is still an issue? I tested on a pixel device and it's working.