mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-21 09:08:02 +00:00
fix transcribe
This commit is contained in:
@@ -226,17 +226,23 @@ class TaskGather extends Task {
|
||||
this.language = cs.speechRecognizerLanguage;
|
||||
if (this.data.recognizer) this.data.recognizer.language = this.language;
|
||||
}
|
||||
this.fallbackVendor = this.data.recognizer && this.data.recognizer.fallbackVendor !== 'default' ?
|
||||
this.data.recognizer.fallbackVendor :
|
||||
cs.fallbackSpeechRecognizerVendor;
|
||||
|
||||
this.fallbackLanguage = this.data.recognizer && this.data.recognizer.fallbackLanguage !== 'default' ?
|
||||
this.data.recognizer.fallbackLanguage :
|
||||
cs.fallbackSpeechRecognizerLanguage;
|
||||
|
||||
this.fallbackLabel = this.data.recognizer && this.data.recognizer.fallbackLabel !== 'default' ?
|
||||
this.data.recognizer.fallbackLabel :
|
||||
cs.fallbackSpeechRecognizerLabel;
|
||||
if ('default' === this.label || !this.label) {
|
||||
this.label = cs.speechRecognizerLabel;
|
||||
if (this.data.recognizer) this.data.recognizer.label = this.label;
|
||||
}
|
||||
// Fallback options
|
||||
if ('default' === this.fallbackVendor || !this.fallbackVendor) {
|
||||
this.fallbackVendor = cs.fallbackSpeechRecognizerVendor;
|
||||
if (this.data.recognizer) this.data.recognizer.fallbackVendor = this.fallbackVendor;
|
||||
}
|
||||
if ('default' === this.fallbackLanguage || !this.fallbackLanguage) {
|
||||
this.fallbackLanguage = cs.fallbackSpeechRecognizerLanguage;
|
||||
if (this.data.recognizer) this.data.recognizer.fallbackLanguage = this.fallbackLanguage;
|
||||
}
|
||||
if ('default' === this.fallbackLabel || !this.fallbackLabel) {
|
||||
this.fallbackLabel = cs.fallbackSpeechRecognizerLabel;
|
||||
if (this.data.recognizer) this.data.recognizer.fallbackLabel = this.fallbackLabel;
|
||||
}
|
||||
|
||||
if (!this.data.recognizer.vendor) {
|
||||
this.data.recognizer.vendor = this.vendor;
|
||||
|
||||
Reference in New Issue
Block a user