transcribe and gather: silently discard listening events from ibm stt

This commit is contained in:
Dave Horton committed 2023-01-11 14:59:15 -05:00
1 parent a2e909b057
commit d5c04d2133
2 files changed
+7

No files matched your search

+4
View File
@@ -484,6 +484,10 @@ class TaskGather extends Task {
this.logger.debug({evt, bugname, finished}, 'Gather:_onTranscription');
if (bugname && this.bugname !== bugname) return;
if (this.vendor === 'ibm') {
if (evt?.state === 'listening') return;
}
evt = this.normalizeTranscription(evt, this.vendor, 1, this.language);
/* count words for bargein feature */
+3
View File
@@ -226,6 +226,9 @@ class TaskTranscribe extends Task {
const bugname = fsEvent.getHeader('media-bugname');
if (bugname && this.bugname !== bugname) return;
if (this.vendor === 'ibm') {
if (evt?.state === 'listening') return;
}
this.logger.debug({evt}, 'TaskTranscribe:_onTranscription - before normalization');
evt = this.normalizeTranscription(evt, this.vendor, channel, this.language);