mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-20 08:40:38 +00:00
in verb transcribe, recognizer should be optional (default to application default) but transcriptionHook mudt be mandatory (#367)
This commit is contained in:
@@ -35,20 +35,21 @@ class TaskTranscribe extends Task {
|
|||||||
this.transcriptionHook = this.data.transcriptionHook;
|
this.transcriptionHook = this.data.transcriptionHook;
|
||||||
this.earlyMedia = this.data.earlyMedia === true || (parentTask && parentTask.earlyMedia);
|
this.earlyMedia = this.data.earlyMedia === true || (parentTask && parentTask.earlyMedia);
|
||||||
|
|
||||||
|
if (this.data.recognizer) {
|
||||||
const recognizer = this.data.recognizer;
|
const recognizer = this.data.recognizer;
|
||||||
this.vendor = recognizer.vendor;
|
this.vendor = recognizer.vendor;
|
||||||
this.language = recognizer.language;
|
this.language = recognizer.language;
|
||||||
this.interim = !!recognizer.interim;
|
|
||||||
this.separateRecognitionPerChannel = recognizer.separateRecognitionPerChannel;
|
|
||||||
|
|
||||||
/* let credentials be supplied in the recognizer object at runtime */
|
/* let credentials be supplied in the recognizer object at runtime */
|
||||||
this.sttCredentials = setSpeechCredentialsAtRuntime(recognizer);
|
this.sttCredentials = setSpeechCredentialsAtRuntime(recognizer);
|
||||||
|
|
||||||
|
this.interim = !!recognizer.interim;
|
||||||
|
this.separateRecognitionPerChannel = recognizer.separateRecognitionPerChannel;
|
||||||
|
|
||||||
|
}
|
||||||
|
else this.data.recognizer = {hints: [], altLanguages: []};
|
||||||
|
|
||||||
/* buffer for soniox transcripts */
|
/* buffer for soniox transcripts */
|
||||||
this._sonioxTranscripts = [];
|
this._sonioxTranscripts = [];
|
||||||
|
|
||||||
recognizer.hints = recognizer.hints || [];
|
|
||||||
recognizer.altLanguages = recognizer.altLanguages || [];
|
|
||||||
}
|
}
|
||||||
|
|
||||||
get name() { return TaskName.Transcribe; }
|
get name() { return TaskName.Transcribe; }
|
||||||
|
|||||||
14
package-lock.json
generated
14
package-lock.json
generated
@@ -15,7 +15,7 @@
|
|||||||
"@jambonz/speech-utils": "^0.0.13",
|
"@jambonz/speech-utils": "^0.0.13",
|
||||||
"@jambonz/stats-collector": "^0.1.8",
|
"@jambonz/stats-collector": "^0.1.8",
|
||||||
"@jambonz/time-series": "^0.2.5",
|
"@jambonz/time-series": "^0.2.5",
|
||||||
"@jambonz/verb-specifications": "^0.0.22",
|
"@jambonz/verb-specifications": "^0.0.24",
|
||||||
"@opentelemetry/api": "^1.4.0",
|
"@opentelemetry/api": "^1.4.0",
|
||||||
"@opentelemetry/exporter-jaeger": "^1.9.0",
|
"@opentelemetry/exporter-jaeger": "^1.9.0",
|
||||||
"@opentelemetry/exporter-trace-otlp-http": "^0.35.0",
|
"@opentelemetry/exporter-trace-otlp-http": "^0.35.0",
|
||||||
@@ -1676,9 +1676,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"node_modules/@jambonz/verb-specifications": {
|
"node_modules/@jambonz/verb-specifications": {
|
||||||
"version": "0.0.22",
|
"version": "0.0.24",
|
||||||
"resolved": "https://registry.npmjs.org/@jambonz/verb-specifications/-/verb-specifications-0.0.22.tgz",
|
"resolved": "https://registry.npmjs.org/@jambonz/verb-specifications/-/verb-specifications-0.0.24.tgz",
|
||||||
"integrity": "sha512-dgvpVh48IX2CVedLKgxYhv5ZwWoeAPtEhCjXqkkVOGgh6eqX1eu+pmcH2D/aKeFdxhXRVGUxfhtLLerfErIpVQ==",
|
"integrity": "sha512-Bm8NKaCa2Xor82I1c873BtBaXbtFHXS3rPrnSM1+cYQqz5eXkl4QE4qDKqv2z9ihYYuuTZzTwwp8jQSXJGIb0g==",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"pino": "^8.8.0"
|
"pino": "^8.8.0"
|
||||||
@@ -10128,9 +10128,9 @@
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"@jambonz/verb-specifications": {
|
"@jambonz/verb-specifications": {
|
||||||
"version": "0.0.22",
|
"version": "0.0.24",
|
||||||
"resolved": "https://registry.npmjs.org/@jambonz/verb-specifications/-/verb-specifications-0.0.22.tgz",
|
"resolved": "https://registry.npmjs.org/@jambonz/verb-specifications/-/verb-specifications-0.0.24.tgz",
|
||||||
"integrity": "sha512-dgvpVh48IX2CVedLKgxYhv5ZwWoeAPtEhCjXqkkVOGgh6eqX1eu+pmcH2D/aKeFdxhXRVGUxfhtLLerfErIpVQ==",
|
"integrity": "sha512-Bm8NKaCa2Xor82I1c873BtBaXbtFHXS3rPrnSM1+cYQqz5eXkl4QE4qDKqv2z9ihYYuuTZzTwwp8jQSXJGIb0g==",
|
||||||
"requires": {
|
"requires": {
|
||||||
"debug": "^4.3.4",
|
"debug": "^4.3.4",
|
||||||
"pino": "^8.8.0"
|
"pino": "^8.8.0"
|
||||||
|
|||||||
@@ -31,7 +31,7 @@
|
|||||||
"@jambonz/speech-utils": "^0.0.13",
|
"@jambonz/speech-utils": "^0.0.13",
|
||||||
"@jambonz/stats-collector": "^0.1.8",
|
"@jambonz/stats-collector": "^0.1.8",
|
||||||
"@jambonz/time-series": "^0.2.5",
|
"@jambonz/time-series": "^0.2.5",
|
||||||
"@jambonz/verb-specifications": "^0.0.22",
|
"@jambonz/verb-specifications": "^0.0.24",
|
||||||
"@opentelemetry/api": "^1.4.0",
|
"@opentelemetry/api": "^1.4.0",
|
||||||
"@opentelemetry/exporter-jaeger": "^1.9.0",
|
"@opentelemetry/exporter-jaeger": "^1.9.0",
|
||||||
"@opentelemetry/exporter-trace-otlp-http": "^0.35.0",
|
"@opentelemetry/exporter-trace-otlp-http": "^0.35.0",
|
||||||
|
|||||||
Reference in New Issue
Block a user