consistent assemblyAiOptions name (#1267)

* consistent assemblyAiOptions  name

* update verb specification version
This commit is contained in:
Hoan Luu Huu
2025-07-03 19:05:56 +07:00
committed by GitHub
parent ba2049b705
commit 3c185d4bd2
3 changed files with 16 additions and 16 deletions

View File

@@ -1031,24 +1031,24 @@ module.exports = (logger) => {
else if ('assemblyai' === vendor) {
const serviceVersion = rOpts.assemblyAiOptions?.serviceVersion || sttCredentials.service_version || 'v2';
const {
format_turns,
end_of_turn_confidence_threshold,
min_end_of_turn_silence_when_confident,
max_turn_silence
formatTurns,
endOfTurnConfidenceThreshold,
minEndOfTurnSilenceWhenConfident,
maxTurnSilence
} = rOpts.assemblyAiOptions || {};
opts = {
...opts,
ASSEMBLYAI_API_VERSION: serviceVersion,
...(serviceVersion === 'v3' && {
...(format_turns && {
ASSEMBLYAI_FORMAT_TURNS: format_turns
...(formatTurns && {
ASSEMBLYAI_FORMAT_TURNS: formatTurns
}),
...(end_of_turn_confidence_threshold && {
ASSEMBLYAI_END_OF_TURN_CONFIDENCE_THRESHOLD: end_of_turn_confidence_threshold
...(endOfTurnConfidenceThreshold && {
ASSEMBLYAI_END_OF_TURN_CONFIDENCE_THRESHOLD: endOfTurnConfidenceThreshold
}),
ASSEMBLYAI_MIN_END_OF_TURN_SILENCE_WHEN_CONFIDENT: min_end_of_turn_silence_when_confident || 500,
...(max_turn_silence && {
ASSEMBLYAI_MAX_TURN_SILENCE: max_turn_silence
ASSEMBLYAI_MIN_END_OF_TURN_SILENCE_WHEN_CONFIDENT: minEndOfTurnSilenceWhenConfident || 500,
...(maxTurnSilence && {
ASSEMBLYAI_MAX_TURN_SILENCE: maxTurnSilence
}),
}),
...(sttCredentials.api_key) &&

8
package-lock.json generated
View File

@@ -18,7 +18,7 @@
"@jambonz/speech-utils": "^0.2.13",
"@jambonz/stats-collector": "^0.1.10",
"@jambonz/time-series": "^0.2.13",
"@jambonz/verb-specifications": "^0.0.106",
"@jambonz/verb-specifications": "^0.0.107",
"@modelcontextprotocol/sdk": "^1.9.0",
"@opentelemetry/api": "^1.8.0",
"@opentelemetry/exporter-jaeger": "^1.23.0",
@@ -1505,9 +1505,9 @@
}
},
"node_modules/@jambonz/verb-specifications": {
"version": "0.0.106",
"resolved": "https://registry.npmjs.org/@jambonz/verb-specifications/-/verb-specifications-0.0.106.tgz",
"integrity": "sha512-xBCGKKW5QC7ItZyeF22esytpG2yIhkGWIvBgTaf97CilQmUdLGo3rWG3i7qnRvU9MPXFCtVCMt/aaMt1Ep6V2g==",
"version": "0.0.107",
"resolved": "https://registry.npmjs.org/@jambonz/verb-specifications/-/verb-specifications-0.0.107.tgz",
"integrity": "sha512-pkH02jUBNG9GluJdrbyO6tboN1/XANXmIoLtmKlX96VtKUGDr+li+lTGEpkMkIM+O1NjT/PSEXzGVPQwxLaKug==",
"license": "MIT",
"dependencies": {
"debug": "^4.3.4",

View File

@@ -34,7 +34,7 @@
"@jambonz/speech-utils": "^0.2.13",
"@jambonz/stats-collector": "^0.1.10",
"@jambonz/time-series": "^0.2.13",
"@jambonz/verb-specifications": "^0.0.106",
"@jambonz/verb-specifications": "^0.0.107",
"@modelcontextprotocol/sdk": "^1.9.0",
"@opentelemetry/api": "^1.8.0",
"@opentelemetry/exporter-jaeger": "^1.23.0",