This commit is contained in:
kunfei
2023-07-07 19:22:26 +08:00
parent ed785179b8
commit 83179e5f97
@@ -52,8 +52,10 @@ class TTSReadAloudService : BaseReadAloudService(), TextToSpeech.OnInitListener
@Synchronized @Synchronized
fun clearTTS() { fun clearTTS() {
textToSpeech?.stop() textToSpeech?.runCatching {
textToSpeech?.shutdown() stop()
shutdown()
}
textToSpeech = null textToSpeech = null
ttsInitFinish = false ttsInitFinish = false
} }