fix config.transcribe should not override config.transcribe.recognizer (#817)

This commit is contained in:
Hoan Luu Huu
2024-07-19 18:26:49 +07:00
committed by GitHub
parent 65ef4e6d64
commit 83191487cf

View File

@@ -249,12 +249,14 @@ class TaskConfig extends Task {
} }
if (this.hasTranscribe) { if (this.hasTranscribe) {
if (this.transcribe.enable) { if (this.transcribe.enable) {
if (!this.transcribeOpts.recognizer) {
this.transcribeOpts.recognizer = this.hasRecognizer ? this.transcribeOpts.recognizer = this.hasRecognizer ?
this.recognizer : this.recognizer :
{ {
vendor: cs.speechRecognizerVendor, vendor: cs.speechRecognizerVendor,
language: cs.speechRecognizerLanguage language: cs.speechRecognizerLanguage
}; };
}
this.logger.debug(this.transcribeOpts, 'Config: enabling transcribe'); this.logger.debug(this.transcribeOpts, 'Config: enabling transcribe');
cs.startBackgroundTask('transcribe', this.transcribeOpts); cs.startBackgroundTask('transcribe', this.transcribeOpts);
} else { } else {