mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 16:50:39 +00:00
Bugfix/config stt punctuation (#164)
* support recognizer.punctuation in config verb (#163) * fixes from testing
This commit is contained in:
@@ -286,6 +286,18 @@ class CallSession extends Emitter {
|
|||||||
return this._globalAltLanguages;
|
return this._globalAltLanguages;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
set globalSttPunctuation(punctuate) {
|
||||||
|
this._globalSttPunctuation = punctuate;
|
||||||
|
}
|
||||||
|
|
||||||
|
get globalSttPunctuation() {
|
||||||
|
return this._globalSttPunctuation;
|
||||||
|
}
|
||||||
|
|
||||||
|
hasGlobalSttPunctuation() {
|
||||||
|
return this._globalSttPunctuation !== undefined;
|
||||||
|
}
|
||||||
|
|
||||||
async notifyRecordOptions(opts) {
|
async notifyRecordOptions(opts) {
|
||||||
const {action} = opts;
|
const {action} = opts;
|
||||||
this.logger.debug({opts}, 'CallSession:notifyRecordOptions');
|
this.logger.debug({opts}, 'CallSession:notifyRecordOptions');
|
||||||
|
|||||||
@@ -98,6 +98,9 @@ class TaskConfig extends Task {
|
|||||||
this.logger.info({altLanguages: this.recognizer.altLanguages}, 'Config: updated altLanguages');
|
this.logger.info({altLanguages: this.recognizer.altLanguages}, 'Config: updated altLanguages');
|
||||||
cs.altLanguages = this.recognizer.altLanguages;
|
cs.altLanguages = this.recognizer.altLanguages;
|
||||||
}
|
}
|
||||||
|
if ('punctuation' in this.recognizer) {
|
||||||
|
cs.globalSttPunctuation = this.recognizer.punctuation;
|
||||||
|
}
|
||||||
this.logger.info({
|
this.logger.info({
|
||||||
recognizer: this.recognizer,
|
recognizer: this.recognizer,
|
||||||
isContinuousAsr: cs.isContinuousAsr
|
isContinuousAsr: cs.isContinuousAsr
|
||||||
|
|||||||
@@ -146,6 +146,9 @@ class TaskGather extends Task {
|
|||||||
this.logger.debug({altLanguages: this.altLanguages},
|
this.logger.debug({altLanguages: this.altLanguages},
|
||||||
'Gather:exec - applying altLanguages');
|
'Gather:exec - applying altLanguages');
|
||||||
}
|
}
|
||||||
|
if (cs.hasGlobalSttPunctuation) {
|
||||||
|
this.punctuation = cs.globalSttPunctuation;
|
||||||
|
}
|
||||||
if (!this.isContinuousAsr && cs.isContinuousAsr) {
|
if (!this.isContinuousAsr && cs.isContinuousAsr) {
|
||||||
this.isContinuousAsr = true;
|
this.isContinuousAsr = true;
|
||||||
this.asrTimeout = cs.asrTimeout * 1000;
|
this.asrTimeout = cs.asrTimeout * 1000;
|
||||||
|
|||||||
@@ -74,6 +74,9 @@ class TaskTranscribe extends Task {
|
|||||||
this.logger.debug({altLanguages: this.altLanguages},
|
this.logger.debug({altLanguages: this.altLanguages},
|
||||||
'Gather:exec - applying altLanguages');
|
'Gather:exec - applying altLanguages');
|
||||||
}
|
}
|
||||||
|
if (cs.hasGlobalSttPunctuation) {
|
||||||
|
this.punctuation = cs.globalSttPunctuation;
|
||||||
|
}
|
||||||
|
|
||||||
this.ep = ep;
|
this.ep = ep;
|
||||||
this.ep2 = ep2;
|
this.ep2 = ep2;
|
||||||
|
|||||||
Reference in New Issue
Block a user