优化
This commit is contained in:
@@ -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