pull/525/head
gedoor 5 years ago
parent 8656fb60e9
commit 8b441a76c0
  1. 8
      app/src/main/java/io/legado/app/service/TTSReadAloudService.kt

@ -78,15 +78,11 @@ class TTSReadAloudService : BaseReadAloudService(), TextToSpeech.OnInitListener
super.play() super.play()
execute { execute {
MediaHelp.playSilentSound(this@TTSReadAloudService) MediaHelp.playSilentSound(this@TTSReadAloudService)
}.onFinally {
textToSpeech?.let { textToSpeech?.let {
it.speak("", TextToSpeech.QUEUE_FLUSH, null, null) it.speak("", TextToSpeech.QUEUE_FLUSH, null, null)
for (i in nowSpeak until contentList.size) { for (i in nowSpeak until contentList.size) {
it.speak( it.speak(contentList[i], TextToSpeech.QUEUE_ADD, null, AppConst.APP_TAG + i)
contentList[i],
TextToSpeech.QUEUE_ADD,
null,
AppConst.APP_TAG + i
)
} }
} }
} }

Loading…
Cancel
Save