punctuation for microsoft (#566)

* punctuation for microsoft

* wip
This commit is contained in:
Hoan Luu Huu
2023-12-18 20:38:05 +07:00
committed by GitHub
parent bcb4bf43bf
commit 30977b309c
3 changed files with 10 additions and 7 deletions

View File

@@ -590,7 +590,8 @@ class TaskGather extends SttTask {
return;
}
evt = this.normalizeTranscription(evt, this.vendor, 1, this.language, this.shortUtterance);
evt = this.normalizeTranscription(evt, this.vendor, 1, this.language,
this.shortUtterance, this.data.recognizer.punctuation);
if (evt.alternatives.length === 0) {
this.logger.info({evt}, 'TaskGather:_onTranscription - got empty transcript, continue listening');
return;

View File

@@ -305,7 +305,8 @@ class TaskTranscribe extends SttTask {
}
this.logger.debug({evt}, 'TaskTranscribe:_onTranscription - before normalization');
evt = this.normalizeTranscription(evt, this.vendor, channel, this.language);
evt = this.normalizeTranscription(evt, this.vendor, channel, this.language, undefined,
this.data.recognizer.punctuation);
this.logger.debug({evt}, 'TaskTranscribe:_onTranscription');
if (evt.alternatives.length === 0) {
this.logger.info({evt}, 'TaskTranscribe:_onTranscription - got empty transcript, continue listening');