mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +00:00
bugfix: transcribe/gather using default as vendor
This commit is contained in:
@@ -142,8 +142,14 @@ class TaskGather extends Task {
|
|||||||
}, 'Gather:exec - enabling continuous ASR since it is turned on for the session');
|
}, 'Gather:exec - enabling continuous ASR since it is turned on for the session');
|
||||||
}
|
}
|
||||||
this.ep = ep;
|
this.ep = ep;
|
||||||
if ('default' === this.vendor || !this.vendor) this.vendor = cs.speechRecognizerVendor;
|
if ('default' === this.vendor || !this.vendor) {
|
||||||
if ('default' === this.language || !this.language) this.language = cs.speechRecognizerLanguage;
|
this.vendor = cs.speechRecognizerVendor;
|
||||||
|
if (this.data.recognizer) this.data.recognizer.vendor = this.vendor;
|
||||||
|
}
|
||||||
|
if ('default' === this.language || !this.language) {
|
||||||
|
this.language = cs.speechRecognizerLanguage;
|
||||||
|
if (this.data.recognizer) this.data.recognizer.language = this.language;
|
||||||
|
}
|
||||||
if (!this.data.recognizer.vendor) {
|
if (!this.data.recognizer.vendor) {
|
||||||
this.data.recognizer.vendor = this.vendor;
|
this.data.recognizer.vendor = this.vendor;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -68,8 +68,14 @@ class TaskTranscribe extends Task {
|
|||||||
|
|
||||||
this.ep = ep;
|
this.ep = ep;
|
||||||
this.ep2 = ep2;
|
this.ep2 = ep2;
|
||||||
if ('default' === this.vendor || !this.vendor) this.vendor = cs.speechRecognizerVendor;
|
if ('default' === this.vendor || !this.vendor) {
|
||||||
if ('default' === this.language || !this.language) this.language = cs.speechRecognizerLanguage;
|
this.vendor = cs.speechRecognizerVendor;
|
||||||
|
if (this.data.recognizer) this.data.recognizer.vendor = this.vendor;
|
||||||
|
}
|
||||||
|
if ('default' === this.language || !this.language) {
|
||||||
|
this.language = cs.speechRecognizerLanguage;
|
||||||
|
if (this.data.recognizer) this.data.recognizer.language = this.language;
|
||||||
|
}
|
||||||
if (!this.data.recognizer.vendor) {
|
if (!this.data.recognizer.vendor) {
|
||||||
this.data.recognizer.vendor = this.vendor;
|
this.data.recognizer.vendor = this.vendor;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,7 +87,7 @@ module.exports = (logger, srf) => {
|
|||||||
const haveNuance = speech.find((s) => s.vendor === 'nuance');
|
const haveNuance = speech.find((s) => s.vendor === 'nuance');
|
||||||
const haveDeepgram = speech.find((s) => s.vendor === 'deepgram');
|
const haveDeepgram = speech.find((s) => s.vendor === 'deepgram');
|
||||||
const haveIbm = speech.find((s) => s.vendor === 'ibm');
|
const haveIbm = speech.find((s) => s.vendor === 'ibm');
|
||||||
if (!haveGoogle || !haveAws || !haveMicrosoft || !haveWellsaid || !haveNuance) {
|
if (!haveGoogle || !haveAws || !haveMicrosoft || !haveWellsaid || !haveNuance || !haveIbm || !haveDeepgram) {
|
||||||
const [r3] = await pp.query(sqlSpeechCredentialsForSP, account_sid);
|
const [r3] = await pp.query(sqlSpeechCredentialsForSP, account_sid);
|
||||||
if (r3.length) {
|
if (r3.length) {
|
||||||
if (!haveGoogle) {
|
if (!haveGoogle) {
|
||||||
|
|||||||
Reference in New Issue
Block a user