fixed callsession cannot close tts streaming (#1472)

This commit is contained in:
Hoan Luu Huu authored and GitHub committed 2025-12-16 07:58:54 -05:00
1 parent c5cd488fdf
commit e007e0e2d3
1 file changed
+6 -1
+6 -1
View File
@@ -504,7 +504,12 @@ class CallSession extends Emitter {
}
get isTtsStreamEnabled() {
return this.backgroundTaskManager.isTaskRunning('ttsStream');
// 1st background tts stream
return this.backgroundTaskManager.isTaskRunning('ttsStream') ||
// 2nd current task streaming tts
TaskName.Say === this.currentTask?.name && this.currentTask?.isStreamingTts ||
// 3rd nested verb is streaming tts
TaskName.Gather === this.currentTask?.name && this.currentTask.sayTask?.isStreamingTts;
}
get isListenEnabled() {