send stream_empty when tts streaming has nothing to play

This commit is contained in:
Hoan HL
2025-10-24 11:57:25 +07:00
parent 0869a73052
commit c17bb1f1e8

View File

@@ -3095,6 +3095,9 @@ Duration=${duration} `
}
_onTtsStreamingEmpty() {
this.requestor?.request('tts:streaming-event', '/streaming-event', {event_type: 'stream_empty'})
.catch((err) => this.logger.info({err}, 'CallSession:_onTtsStreamingEmpty - Error sending'));
const task = this.currentTask;
if (task && TaskName.Say === task.name) {
task.notifyTtsStreamIsEmpty();