优化
This commit is contained in:
1 parent
ed785179b8
commit
83179e5f97
1 file changed
+4
-2
@@ -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
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in new issue
Block a user