Compare commits

...

47 Commits

Author SHA1 Message Date
Dave Horton
77d203ca80 0.0.44 2023-10-30 12:49:54 -04:00
Dave Horton
9cb550f49e fix prev commit 2023-10-30 12:49:35 -04:00
Dave Horton
de88976293 0.0.43 2023-10-30 11:15:49 -04:00
Dave Horton
60efb4b9af add recognizer.azureOptions.speechSegmentationSilenceTimeoutMs (to support https://github.com/jambonz/jambonz-feature-server/issues/508) (#31) 2023-10-30 11:15:18 -04:00
Dave Horton
49ac048477 0.0.42 2023-10-29 21:38:28 -04:00
Hoan Luu Huu
e653a62c49 feat google custom voice (#30) 2023-10-29 21:37:49 -04:00
Dave Horton
f41aae81c6 0.0.41 2023-10-27 15:19:12 -04:00
Dave Horton
5707f7d4d4 remove properties with undefined values before validation: the SttTask superclass of gather and transcribe creates them for label and callbackVendor 2023-10-27 15:18:58 -04:00
Dave Horton
f75871dc46 0.0.40 2023-10-27 10:23:39 -04:00
Dave Horton
98fa56bd3d add deepgramOptions.shortUtterance - triggers transcript based on is_final not speech_final 2023-10-27 10:23:31 -04:00
Dave Horton
e1b9abef9e 0.0.39 2023-10-26 13:54:19 -04:00
Dave Horton
22b118534b add deepgramOptions.utteranceEndMs 2023-10-26 13:54:10 -04:00
Dave Horton
733a4760fe 0.0.38 2023-10-25 10:09:21 -04:00
Dave Horton
3deb8759db add deepgramOptions.smartFormatting (#28) 2023-10-25 10:08:56 -04:00
Dave Horton
79cdfc73d4 0.0.37 2023-10-06 08:54:14 -04:00
Hoan Luu Huu
9b7358d6b4 feat: add sip Indialog actionHook (#27)
* feat: add sip Indialog actionHook

* to use Hook

* to use Hook

* fix
2023-10-06 08:49:49 -04:00
Dave Horton
4bb25941bf 0.0.36 2023-09-22 09:09:22 -04:00
Hoan Luu Huu
42ff6170b6 support bot delay action (#26)
* support bot delay action

* support bot delay action
2023-09-22 09:09:04 -04:00
Dave Horton
873d8dc0c8 0.0.35 2023-09-20 07:31:02 -04:00
Hoan Luu Huu
992a5fe897 add support for dual streams in rest:dial (#25) 2023-09-20 07:30:23 -04:00
Dave Horton
6803a3e49d 0.0.34 2023-09-13 09:39:46 -04:00
Hoan Luu Huu
2d2145917e feat fast recognition (#22) 2023-09-13 09:39:17 -04:00
Anton Voylenko
4fa8d46fd8 missing config verbs for listen (#24) 2023-09-13 09:33:25 -04:00
Dave Horton
9690e14f64 0.0.33 2023-09-13 08:59:09 -04:00
Dave Horton
49752d16ea allow specification of token for cobalt speech when compiling contexts 2023-09-13 08:59:01 -04:00
Dave Horton
9e141cba6a 0.0.32 2023-09-12 20:48:02 -04:00
Dave Horton
82e2bc5239 Vendor/cobalt (#23)
* add support for cobalt

* more changes for cobalt

* 0.0.31

* more cobalt options
2023-09-12 20:47:30 -04:00
Dave Horton
3a5b053248 0.0.30 2023-08-19 09:45:46 -04:00
Dave Horton
d74364b1c2 Merge pull request #21 from avoylenko/main
endConferenceDuration for conference verb
2023-08-19 09:45:36 -04:00
Anton Voylenko
213d7596d2 endConferenceDuration for conference verb 2023-08-19 15:36:02 +03:00
Dave Horton
3d4df422e1 0.0.29 2023-08-17 07:53:39 -04:00
Dave Horton
3531711991 Merge pull request #20 from jambonz/feat/fallback_speech
feat fallback speech vendor
2023-08-17 07:53:07 -04:00
Quan HL
f860074a24 fix typo 2023-08-17 11:54:15 +07:00
Quan HL
65de44012a feat fallback speech vendor 2023-08-17 11:29:44 +07:00
Dave Horton
067a49bd2c 0.0.28 2023-08-15 18:17:33 -04:00
Dave Horton
4967efa745 Merge pull request #19 from jambonz/feat/moh_01
add onHoldHook to dial verb
2023-08-15 18:16:39 -04:00
Quan HL
61669e5574 add onHoldHook to dial verb 2023-08-16 05:01:34 +07:00
Dave Horton
e25ef7349e 0.0.27 2023-08-15 08:47:07 -04:00
Dave Horton
26f5609996 Merge pull request #18 from jambonz/fix/multi_speech_same_vendor
feat add label to synthesizer
2023-08-15 08:45:58 -04:00
Quan HL
1a1436b612 add label to recognizer 2023-08-15 09:14:33 +07:00
Quan HL
ba9a9f9b60 feat add label to synthesizer 2023-08-15 07:07:47 +07:00
Dave Horton
93c368e894 Merge pull request #17 from jambonz/feat/moh
feat: add onhold music to dial verb
2023-08-10 07:49:26 -04:00
Quan HL
185e4df06e obholdMusic for config verb 2023-08-10 13:56:10 +07:00
Quan HL
c22e8c9cf0 feat: add onhold music to dial verb 2023-07-25 17:56:28 +07:00
Dave Horton
1c3d86c807 0.0.26 2023-07-20 07:35:08 -04:00
Dave Horton
7e986acc17 Merge pull request #15 from jambonz/feat/siprec_custom_headers
feat confige record allow SIP custom headers
2023-07-20 07:34:29 -04:00
Quan HL
d5c535c02c feat confige record allow SIP custom headers 2023-07-20 15:12:10 +07:00
5 changed files with 157 additions and 15 deletions

View File

@@ -58,7 +58,8 @@ function validateVerb(name, data, logger) {
const dSpec = specData.properties[dKey];
debug(`Task:validate validating property ${dKey} with value ${JSON.stringify(dVal)}`);
if (typeof dSpec === 'string' && dSpec === 'array') {
if (typeof dVal === 'undefined') continue;
else if (typeof dSpec === 'string' && dSpec === 'array') {
if (!Array.isArray(dVal)) throw new Error(`${name}: property ${dKey} is not an array`);
}
else if (typeof dSpec === 'string' && dSpec.includes('|')) {

4
package-lock.json generated
View File

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

View File

@@ -1,6 +1,6 @@
{
"name": "@jambonz/verb-specifications",
"version": "0.0.25",
"version": "0.0.44",
"description": "Jambonz Verb Specification Utilities",
"main": "index.js",
"scripts": {

View File

@@ -45,7 +45,10 @@
"listen": "#listenOptions",
"amd": "#amd",
"notifyEvents": "boolean",
"reset": "string|array"
"reset": "string|array",
"onHoldMusic": "string",
"actionHookDelayAction": "#actionHookDelayAction",
"sipRequestWithinDialogHook": "object|string"
},
"required": []
},
@@ -59,7 +62,12 @@
"type": "string",
"enum": ["mono", "stereo", "mixed"]
},
"metadata": "object"
"metadata": "object",
"maxLength": "number",
"passDtmf": "boolean",
"playBeep": "boolean",
"disableBidirectionalAudio": "boolean",
"timeout": "number"
},
"required": [
"enable"
@@ -168,7 +176,8 @@
"timeout": "number",
"recognizer": "#recognizer",
"play": "#play",
"say": "#say"
"say": "#say",
"actionHookDelayAction": "#actionHookDelayAction"
},
"required": [
]
@@ -180,6 +189,7 @@
"beep": "boolean",
"startConferenceOnEnter": "boolean",
"endConferenceOnExit": "boolean",
"endConferenceDuration": "number",
"maxParticipants": "number",
"joinMuted": "boolean",
"actionHook": "object|string",
@@ -197,6 +207,7 @@
"properties": {
"id": "string",
"actionHook": "object|string",
"onHoldHook": "object|string",
"answerOnBridge": "boolean",
"callerId": "string",
"callerName": "string",
@@ -364,7 +375,8 @@
"enum": ["startCallRecording", "stopCallRecording", "pauseCallRecording", "resumeCallRecording"]
},
"recordingID": "string",
"siprecServerURL": "string|array"
"siprecServerURL": "string|array",
"headers": "object"
},
"required": [
"action"
@@ -398,7 +410,8 @@
"to": "#target",
"headers": "object",
"timeout": "number",
"amd": "#amd"
"amd": "#amd",
"dual_streams" : "boolean"
},
"required": [
"call_hook",
@@ -473,8 +486,13 @@
"synthesizer": {
"properties": {
"vendor": "string",
"label": "string",
"language": "string",
"voice": "string",
"voice": "string|object",
"fallbackVendor": "string",
"fallbackLabel": "string",
"fallbackLanguage": "string",
"fallbackVoice": "string|object",
"engine": {
"type": "string",
"enum": ["standard", "neural"]
@@ -492,7 +510,11 @@
"recognizer": {
"properties": {
"vendor": "string",
"label": "string",
"language": "string",
"fallbackVendor": "string",
"fallbackLabel": "string",
"fallbackLanguage": "string",
"vad": "#vad",
"hints": "array",
"hintsBoost": "number",
@@ -555,11 +577,14 @@
"azureSttEndpointId": "string",
"asrDtmfTerminationDigit": "string",
"asrTimeout": "number",
"fastRecognitionTimeout": "number",
"nuanceOptions": "#nuanceOptions",
"deepgramOptions": "#deepgramOptions",
"ibmOptions": "#ibmOptions",
"nvidiaOptions": "#nvidiaOptions",
"sonioxOptions": "#sonioxOptions",
"cobaltOptions": "#cobaltOptions",
"azureOptions": "#azureOptions",
"customOptions": "#customOptions"
},
"required": [
@@ -575,6 +600,25 @@
"required": [
]
},
"azureOptions": {
"properties": {
"speechSegmentationSilenceTimeoutMs": "number"
},
"required": [
]
},
"cobaltOptions": {
"properties": {
"serverUri": "string",
"enableConfusionNetwork": "boolean",
"metadata": "string",
"compiledContextData": "string",
"wordTimeOffsets": "boolean",
"contextToken": "string"
},
"required": [
]
},
"nvidiaOptions": {
"properties": {
"rivaUri": "string",
@@ -613,6 +657,7 @@
"customModel": "string",
"version": "string",
"punctuate": "boolean",
"smartFormatting": "boolean",
"profanityFilter": "boolean",
"redact": {
"type": "string",
@@ -633,6 +678,8 @@
"replace": "array",
"keywords": "array",
"endpointing": "boolean | number",
"utteranceEndMs": "number",
"shortUtterance": "boolean",
"vadTurnoff": "number",
"tag": "string"
}
@@ -807,5 +854,14 @@
"toneTimeoutMs": "number",
"greetingCompletionTimeoutMs": "number"
}
},
"actionHookDelayAction" : {
"properties": {
"enabled": "boolean",
"noResponseTimeout": "number",
"noResponseGiveUpTimeout": "number",
"retries": "number",
"actions": "array"
}
}
}

View File

@@ -24,24 +24,58 @@ test("validate correct verbs", async (t) => {
"verb": "config",
"synthesizer": {
"voice": "Jenny",
"vendor": "google"
"vendor": "google",
"label": "label1"
},
"recognizer": {
"vendor": "google",
"language": "de-DE"
"language": "de-DE",
"label": "label1"
},
"bargeIn": {
"enable": true,
"input" : ["speech"],
"actionHook": "/userInput"
},
"onHoldMusic": "http://server.com/hold",
"actionHookDelayAction": {
"enabled": true,
"noResponseTimeout": 5,
"noResponseGiveUpTimeout": 10,
"retries": 3,
"actions": [
{
"verb": "say",
"text": "To speak to Sales press 1 or say Sales. To speak to customer support press 2 or say Support",
"synthesizer": {
"vendor": "google",
"language": "en-US"
}
},
{
"verb": "play",
"url": "https://example.com/example.mp3",
"timeoutSecs": 10,
"seekOffset": 8000,
"actionHook": "/play/action"
}
]
}
},
{
"verb": "config",
"record": {
"action": "startCallRecording",
"siprecServerURL": ["sip:srs@recording.example.com","sip:srs@recording.example.com"]
"siprecServerURL": ["sip:srs@recording.example.com","sip:srs@recording.example.com"],
"headers" : {
"X-Header1": "Value1",
"X-Header2": "Value2"
}
}
},
{
"verb": "config",
"sipRequestWithinDialogHook": "https://jambonz.or/sipIndialogActionHook"
},
{
"verb": "config",
@@ -60,6 +94,7 @@ test("validate correct verbs", async (t) => {
{
"verb": "dial",
"actionHook": "/outdial",
"onHoldHook": "/onHoldHook",
"callerId": "+16173331212",
"callerName": "Tom",
"answerOnBridge": true,
@@ -127,6 +162,7 @@ test("validate correct verbs", async (t) => {
"language": "en-US",
"hints": ["sales", "support"],
"hintsBoost": 10,
"fastRecognitionTimeout": 2000,
"deepgramOptions": {
"endpointing": 500
}
@@ -135,7 +171,30 @@ test("validate correct verbs", async (t) => {
"text": "To speak to Sales press 1 or say Sales. To speak to customer support press 2 or say Support",
"synthesizer": {
"vendor": "google",
"language": "en-US"
"language": "en-US",
"label": "label1",
"fallbackVendor": "google",
"fallbackLanguage": "en-US",
"fallbackLabel": "label1",
"fallbackVoice": "voice"
}
},
"say": {
"text": "To speak to Sales press 1 or say Sales. To speak to customer support press 2 or say Support",
"synthesizer": {
"vendor": "google",
"language": "en-US",
"voice": {
"reportedUsage":"REALTIME",
"model":"path/to/model",
},
"fallbackVendor": "google",
"fallbackLanguage": "en-US",
"fallbackLabel": "label1",
"fallbackVoice": {
"reportedUsage":"REALTIME",
"model":"path/to/model",
}
}
}
},
@@ -151,12 +210,37 @@ test("validate correct verbs", async (t) => {
"recognizer": {
"vendor": "google",
"language": "en-US",
"fallbackVendor": "google",
"fallbackLanguage": "en-US",
"fallbackLabel": "label1",
"hints": ["sales", "support"],
"hintsBoost": 10,
"deepgramOptions": {
"endpointing": true
}
},
"actionHookDelayAction": {
"noResponseTimeout": 5,
"noResponseGiveUpTimeout": 10,
"retries": 3,
"actions": [
{
"verb": "say",
"text": "To speak to Sales press 1 or say Sales. To speak to customer support press 2 or say Support",
"synthesizer": {
"vendor": "google",
"language": "en-US"
}
},
{
"verb": "play",
"url": "https://example.com/example.mp3",
"timeoutSecs": 10,
"seekOffset": 8000,
"actionHook": "/play/action"
}
]
}
},
{
"verb": "hangup",
@@ -296,7 +380,8 @@ test("validate correct verbs", async (t) => {
"amd": {
"actionHook": "/answeringMachineDetection",
}
},
"dual_streams": true
}
];
try {