gotev / android-speech

Android speech recognition and text to speech made easy
http://gotev.github.io/android-speech/
Apache License 2.0
473 stars 156 forks source link

getSupportedTextToSpeechVoices() returns null #67

Closed ChristophyBarth closed 1 year ago

ChristophyBarth commented 1 year ago

.

yuripourre commented 1 year ago

@ChristophyBarth did you find the problem? How did you solve it?

ChristophyBarth commented 1 year ago

@ChristophyBarth did you find the problem? How did you solve it?

The Speech code called after init was too close. So you have to take init to your launcher activity, and before you get to the activity where you need to use it, it would have successfully been initialized.

yuripourre commented 1 year ago

Thank you for the explanation it might be useful for other people!

gotev commented 1 year ago

@ChristophyBarth I can confirm this behavior having experienced it in the past. The approach you're suggesting is the best one among the ones I've also tried. Thank you!