[6.3.0][Feat]新增语音合成开始播放的回调事件
This commit is contained in:
@@ -288,7 +288,17 @@ class IFlyTekTts : IMogoTTS, InitListener {
|
||||
|
||||
private val ttsListener = object : SynthesizerListener {
|
||||
override fun onSpeakBegin() {
|
||||
|
||||
if (Thread.currentThread() == Looper.getMainLooper().thread) {
|
||||
curTtsEntity?.let {
|
||||
speakVoiceMap[it.toString()]?.onSpeakStart(it.toString())
|
||||
}
|
||||
} else {
|
||||
UiThreadHandler.post {
|
||||
curTtsEntity?.let {
|
||||
speakVoiceMap[it.toString()]?.onSpeakStart(it.toString())
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
override fun onBufferProgress(p0: Int, p1: Int, p2: Int, p3: String?) {
|
||||
|
||||
Reference in New Issue
Block a user