diff --git a/app/src/main/java/io/legado/app/service/TTSReadAloudService.kt b/app/src/main/java/io/legado/app/service/TTSReadAloudService.kt index 78b6ad2c6..3abcddf7e 100644 --- a/app/src/main/java/io/legado/app/service/TTSReadAloudService.kt +++ b/app/src/main/java/io/legado/app/service/TTSReadAloudService.kt @@ -52,8 +52,10 @@ class TTSReadAloudService : BaseReadAloudService(), TextToSpeech.OnInitListener @Synchronized fun clearTTS() { - textToSpeech?.stop() - textToSpeech?.shutdown() + textToSpeech?.runCatching { + stop() + shutdown() + } textToSpeech = null ttsInitFinish = false }