mirror of
https://github.com/gedoor/legado.git
synced 2025-08-10 00:52:30 +00:00
优化
This commit is contained in:
@@ -93,9 +93,10 @@ class TTSReadAloudService : BaseReadAloudService(), TextToSpeech.OnInitListener
|
||||
LogUtils.d(TAG, "朗读列表大小 ${contentList.size}")
|
||||
LogUtils.d(TAG, "朗读页数 ${textChapter?.pageSize}")
|
||||
val tts = textToSpeech ?: throw NoStackTraceException("tts is null")
|
||||
val contentList = contentList
|
||||
for (i in nowSpeak until contentList.size) {
|
||||
var text = contentList[i]
|
||||
ensureActive()
|
||||
var text = contentList[i]
|
||||
if (paragraphStartPos > 0 && i == nowSpeak) {
|
||||
text = text.substring(paragraphStartPos)
|
||||
}
|
||||
@@ -126,8 +127,6 @@ class TTSReadAloudService : BaseReadAloudService(), TextToSpeech.OnInitListener
|
||||
AppLog.put("tts朗读出错:$text")
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
LogUtils.d(TAG, "朗读内容添加完成")
|
||||
}.onError {
|
||||
|
||||
Reference in New Issue
Block a user