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

4
package-lock.json generated
View File

@@ -1,12 +1,12 @@
{
"name": "@jambonz/verb-specifications",
"version": "0.0.94",
"version": "0.0.95",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "@jambonz/verb-specifications",
"version": "0.0.94",
"version": "0.0.95",
"license": "MIT",
"dependencies": {
"debug": "^4.3.4",

View File

@@ -298,7 +298,8 @@
"transcribe": "#transcribe",
"amd": "#amd",
"dub": ["#dub"],
"tag": "object"
"tag": "object",
"translate": "#translate"
},
"required": [
"target"
@@ -1190,5 +1191,19 @@
"streaming": "boolean",
"sampleRate": "number"
}
},
"translate": {
"properties": {
"callerLanguage": "string",
"calleeLanguage": "string",
"gain": "#gain",
"llm": "#llm"
}
},
"gain": {
"properties": {
"naturalVoice": "string",
"translatedVoice": "string"
}
}
}

View File

@@ -166,7 +166,23 @@ test("validate correct verbs", async (t) => {
"type": "user",
"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",