Stop tts streaming, when bargeIn is enabled for gather verb and input is detected (#1154)

https://github.com/jambonz/jambonz-feature-server/issues/1153
This commit is contained in:
rammohan-y
2025-04-14 18:48:50 +05:30
committed by GitHub
parent eb5e6fa515
commit 87195b6444

View File

@@ -107,7 +107,7 @@ class TaskSay extends TtsTask {
throw new SpeechCredentialError(
`No text-to-speech service credentials for ${vendor} with labels: ${label} have been configured`);
}
this.ep = ep;
try {
await this.setTtsStreamingChannelVars(vendor, language, voice, credentials, ep);
@@ -292,8 +292,10 @@ class TaskSay extends TtsTask {
if (cs.isInConference) {
const {memberId, confName} = cs;
this.killPlayToConfMember(this.ep, memberId, confName);
}
else {
} else if (this.isStreamingTts) {
this.logger.debug('TaskSay:kill - clearing TTS stream for streaming audio');
cs.clearTtsStream();
} else {
this.notifyStatus({event: 'kill-playback'});
this.ep.api('uuid_break', this.ep.uuid);
}