mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +00:00
send eager_eot events (#1382)
This commit is contained in:
@@ -914,7 +914,7 @@ class TaskGather extends SttTask {
|
|||||||
|
|
||||||
evt = this.normalizeTranscription(evt, this.vendor, 1, this.language,
|
evt = this.normalizeTranscription(evt, this.vendor, 1, this.language,
|
||||||
this.shortUtterance, this.data.recognizer.punctuation);
|
this.shortUtterance, this.data.recognizer.punctuation);
|
||||||
//this.logger.debug({evt, bugname, finished, vendor: this.vendor}, 'Gather:_onTranscription normalized transcript');
|
this.logger.debug({evt, bugname, finished, vendor: this.vendor}, 'Gather:_onTranscription normalized transcript');
|
||||||
|
|
||||||
if (evt.alternatives.length === 0) {
|
if (evt.alternatives.length === 0) {
|
||||||
this.logger.info({evt}, 'TaskGather:_onTranscription - got empty transcript, continue listening');
|
this.logger.info({evt}, 'TaskGather:_onTranscription - got empty transcript, continue listening');
|
||||||
@@ -1080,6 +1080,11 @@ class TaskGather extends SttTask {
|
|||||||
this.cs.requestor.request('verb:hook', this.partialResultHook, Object.assign({speech: evt},
|
this.cs.requestor.request('verb:hook', this.partialResultHook, Object.assign({speech: evt},
|
||||||
this.cs.callInfo, httpHeaders));
|
this.cs.callInfo, httpHeaders));
|
||||||
}
|
}
|
||||||
|
else if (this.vendor === 'deepgramflux' &&
|
||||||
|
['EagerEndOfTurn', 'TurnResumed'].includes(evt.vendor.evt?.event)) {
|
||||||
|
this.logger.debug(`Gather:_onTranscription - deepgramflux event detected: ${evt.event}`);
|
||||||
|
this.performAction({speech: evt, reason: 'speechDetected'}, false);
|
||||||
|
}
|
||||||
if (this.vendor === 'soniox') {
|
if (this.vendor === 'soniox') {
|
||||||
if (evt.vendor.finalWords.length) {
|
if (evt.vendor.finalWords.length) {
|
||||||
this.logger.debug({evt}, 'TaskGather:_onTranscription - buffering soniox transcript');
|
this.logger.debug({evt}, 'TaskGather:_onTranscription - buffering soniox transcript');
|
||||||
|
|||||||
Reference in New Issue
Block a user