TextToSpeech API does not work until TTS Settings are opened
- /e/ version: 1.7-s-rc
- Device model(s): emerald but any
- Developer mode enabled: yes
- Device rooted: no
- Trackers blocker enabled: no
Summary
TextToSpeech API does not work until TTS Settings are opened
Description
Afer a clean flash of a device, a sample app using the TextToSpeech API doesn't play any sound.
We need to open Settings -> Accessibility -> Text-to-speech output and from this point we are now able to play a sound with the TTS API.
The issue happens with both espeaktts and picotts at boot.
The issue might be located in frameworks_base or the settings app.
Sample code used for test:
val onInitListener = TextToSpeech.OnInitListener { }
tts = TextToSpeech(baseContext, onInitListener)
tts.speak("Hello world!", TextToSpeech.QUEUE_FLUSH, null)
Edited by Jonathan Klee