tts throttling and send user_interruption event (#1019)

* tts throttling and send user_interruption event

* tts streaming: if we get a flush with tokens pending, send the flush after the tokens

* wip
This commit is contained in:
Dave Horton
2025-01-04 16:34:01 -05:00
committed by GitHub
parent 3706aa4d98
commit a2581eaeb4
3 changed files with 26 additions and 8 deletions

View File

@@ -866,6 +866,8 @@ class CallSession extends Emitter {
}
}
clearTtsStream() {
this.requestor?.request('tts:streaming-event', '/streaming-event', {event_type: 'user_interruption'})
.catch((err) => this.logger.info({err}, 'CallSession:clearTtsStream - Error sending user_interruption'));
this.ttsStreamingBuffer?.clear();
}