mirror of
https://github.com/jambonz/jambonz-feature-server.git
synced 2025-12-19 04:17:44 +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.earlyMedia = this.data.earlyMedia === true || (parentTask && parentTask.earlyMedia);
|
||||
|
||||
const recognizer = this.data.recognizer;
|
||||
this.vendor = recognizer.vendor;
|
||||
this.language = recognizer.language;
|
||||
this.interim = !!recognizer.interim;
|
||||
this.separateRecognitionPerChannel = recognizer.separateRecognitionPerChannel;
|
||||
if (this.data.recognizer) {
|
||||
const recognizer = this.data.recognizer;
|
||||
this.vendor = recognizer.vendor;
|
||||
this.language = recognizer.language;
|
||||
/* let credentials be supplied in the recognizer object at runtime */
|
||||
this.sttCredentials = setSpeechCredentialsAtRuntime(recognizer);
|
||||
|
||||
/* let credentials be supplied in the recognizer object at runtime */
|
||||
this.sttCredentials = setSpeechCredentialsAtRuntime(recognizer);
|
||||
this.interim = !!recognizer.interim;
|
||||
this.separateRecognitionPerChannel = recognizer.separateRecognitionPerChannel;
|
||||
|
||||
}
|
||||
else this.data.recognizer = {hints: [], altLanguages: []};
|
||||
|
||||
/* buffer for soniox transcripts */
|
||||
this._sonioxTranscripts = [];
|
||||
|
||||
recognizer.hints = recognizer.hints || [];
|
||||
recognizer.altLanguages = recognizer.altLanguages || [];
|
||||
}
|
||||
|
||||
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/stats-collector": "^0.1.8",
|
||||
"@jambonz/time-series": "^0.2.5",
|
||||
"@jambonz/verb-specifications": "^0.0.22",
|
||||
"@jambonz/verb-specifications": "^0.0.24",
|
||||
"@opentelemetry/api": "^1.4.0",
|
||||
"@opentelemetry/exporter-jaeger": "^1.9.0",
|
||||
"@opentelemetry/exporter-trace-otlp-http": "^0.35.0",
|
||||
@@ -1676,9 +1676,9 @@
|
||||
}
|
||||
},
|
||||
"node_modules/@jambonz/verb-specifications": {
|
||||
"version": "0.0.22",
|
||||
"resolved": "https://registry.npmjs.org/@jambonz/verb-specifications/-/verb-specifications-0.0.22.tgz",
|
||||
"integrity": "sha512-dgvpVh48IX2CVedLKgxYhv5ZwWoeAPtEhCjXqkkVOGgh6eqX1eu+pmcH2D/aKeFdxhXRVGUxfhtLLerfErIpVQ==",
|
||||
"version": "0.0.24",
|
||||
"resolved": "https://registry.npmjs.org/@jambonz/verb-specifications/-/verb-specifications-0.0.24.tgz",
|
||||
"integrity": "sha512-Bm8NKaCa2Xor82I1c873BtBaXbtFHXS3rPrnSM1+cYQqz5eXkl4QE4qDKqv2z9ihYYuuTZzTwwp8jQSXJGIb0g==",
|
||||
"dependencies": {
|
||||
"debug": "^4.3.4",
|
||||
"pino": "^8.8.0"
|
||||
@@ -10128,9 +10128,9 @@
|
||||
}
|
||||
},
|
||||
"@jambonz/verb-specifications": {
|
||||
"version": "0.0.22",
|
||||
"resolved": "https://registry.npmjs.org/@jambonz/verb-specifications/-/verb-specifications-0.0.22.tgz",
|
||||
"integrity": "sha512-dgvpVh48IX2CVedLKgxYhv5ZwWoeAPtEhCjXqkkVOGgh6eqX1eu+pmcH2D/aKeFdxhXRVGUxfhtLLerfErIpVQ==",
|
||||
"version": "0.0.24",
|
||||
"resolved": "https://registry.npmjs.org/@jambonz/verb-specifications/-/verb-specifications-0.0.24.tgz",
|
||||
"integrity": "sha512-Bm8NKaCa2Xor82I1c873BtBaXbtFHXS3rPrnSM1+cYQqz5eXkl4QE4qDKqv2z9ihYYuuTZzTwwp8jQSXJGIb0g==",
|
||||
"requires": {
|
||||
"debug": "^4.3.4",
|
||||
"pino": "^8.8.0"
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
"@jambonz/speech-utils": "^0.0.13",
|
||||
"@jambonz/stats-collector": "^0.1.8",
|
||||
"@jambonz/time-series": "^0.2.5",
|
||||
"@jambonz/verb-specifications": "^0.0.22",
|
||||
"@jambonz/verb-specifications": "^0.0.24",
|
||||
"@opentelemetry/api": "^1.4.0",
|
||||
"@opentelemetry/exporter-jaeger": "^1.9.0",
|
||||
"@opentelemetry/exporter-trace-otlp-http": "^0.35.0",
|
||||
|
||||
Reference in New Issue
Block a user