support dial translate with s2s services

This commit is contained in:
Quan HL
2025-02-03 21:23:53 +07:00
parent 57887a660c
commit 4ead43b761
3 changed files with 35 additions and 4 deletions
+2 -2
View File
@@ -1,12 +1,12 @@
{ {
"name": "@jambonz/verb-specifications", "name": "@jambonz/verb-specifications",
"version": "0.0.94", "version": "0.0.95",
"lockfileVersion": 2, "lockfileVersion": 2,
"requires": true, "requires": true,
"packages": { "packages": {
"": { "": {
"name": "@jambonz/verb-specifications", "name": "@jambonz/verb-specifications",
"version": "0.0.94", "version": "0.0.95",
"license": "MIT", "license": "MIT",
"dependencies": { "dependencies": {
"debug": "^4.3.4", "debug": "^4.3.4",
+16 -1
View File
@@ -298,7 +298,8 @@
"transcribe": "#transcribe", "transcribe": "#transcribe",
"amd": "#amd", "amd": "#amd",
"dub": ["#dub"], "dub": ["#dub"],
"tag": "object" "tag": "object",
"translate": "#translate"
}, },
"required": [ "required": [
"target" "target"
@@ -1190,5 +1191,19 @@
"streaming": "boolean", "streaming": "boolean",
"sampleRate": "number" "sampleRate": "number"
} }
},
"translate": {
"properties": {
"callerLanguage": "string",
"calleeLanguage": "string",
"gain": "#gain",
"llm": "#llm"
}
},
"gain": {
"properties": {
"naturalVoice": "string",
"translatedVoice": "string"
}
} }
} }
+17 -1
View File
@@ -166,7 +166,23 @@ test("validate correct verbs", async (t) => {
"type": "user", "type": "user",
"name": "spike@sip.example.com" "name": "spike@sip.example.com"
} }
] ],
"translate": {
"callerLanguage": "en-US",
"calleeLanguage": "vn-VN",
"gain": {
"naturalVoice": "-10db",
"translatedVoice": "+2dB"
},
"llm": {
"model": 'openai',
"vendor": "openai",
"auth": {
"apiKey": "API key"
},
"llmOptions": {}
}
}
}, },
{ {
"verb": "dialogflow", "verb": "dialogflow",