mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 16:50:39 +00:00
ensure recognizer.altLanguages is an empty array if not otherwise specified
This commit is contained in:
@@ -37,6 +37,10 @@ class SttTask extends Task {
|
||||
|
||||
/* let credentials be supplied in the recognizer object at runtime */
|
||||
this.sttCredentials = setSpeechCredentialsAtRuntime(recognizer);
|
||||
|
||||
if (!Array.isArray(this.data.recognizer.altLanguages)) {
|
||||
this.data.recognizer.altLanguages = [];
|
||||
}
|
||||
} else {
|
||||
this.data.recognizer = {hints: [], altLanguages: []};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user