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 authored and GitHub committed 2025-01-04 16:34:01 -05:00
1 parent 3706aa4d98
commit a2581eaeb4
3 files changed
+26 -8

No files matched your search

+2
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();
}