mirror of
https://github.com/jambonz/verb-specifications.git
synced 2026-03-24 04:27:54 +00:00
Compare commits
65 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
954f9479c9 | ||
|
|
58385e791b | ||
|
|
85aaab5856 | ||
|
|
d70324485b | ||
|
|
2cf2c15586 | ||
|
|
f6ad050a32 | ||
|
|
ba02161f74 | ||
|
|
fabf9255ea | ||
|
|
3f1e7cbd3b | ||
|
|
ff6bea3168 | ||
|
|
4ea66245d4 | ||
|
|
faa99cdce3 | ||
|
|
d017e739b1 | ||
|
|
764383cf43 | ||
|
|
3f19ce4a24 | ||
|
|
1e6b24181c | ||
|
|
63aa94a9ec | ||
|
|
d4614c2ad1 | ||
|
|
7da6165b93 | ||
|
|
ad76081fa7 | ||
|
|
ce94e943d2 | ||
|
|
436fb557dc | ||
|
|
203b8600a8 | ||
|
|
b877ca52d0 | ||
|
|
cdb671d25d | ||
|
|
6ae0aff8b1 | ||
|
|
9a2a22dd88 | ||
|
|
369583d536 | ||
|
|
77d203ca80 | ||
|
|
9cb550f49e | ||
|
|
de88976293 | ||
|
|
60efb4b9af | ||
|
|
49ac048477 | ||
|
|
e653a62c49 | ||
|
|
f41aae81c6 | ||
|
|
5707f7d4d4 | ||
|
|
f75871dc46 | ||
|
|
98fa56bd3d | ||
|
|
e1b9abef9e | ||
|
|
22b118534b | ||
|
|
733a4760fe | ||
|
|
3deb8759db | ||
|
|
79cdfc73d4 | ||
|
|
9b7358d6b4 | ||
|
|
4bb25941bf | ||
|
|
42ff6170b6 | ||
|
|
873d8dc0c8 | ||
|
|
992a5fe897 | ||
|
|
6803a3e49d | ||
|
|
2d2145917e | ||
|
|
4fa8d46fd8 | ||
|
|
9690e14f64 | ||
|
|
49752d16ea | ||
|
|
9e141cba6a | ||
|
|
82e2bc5239 | ||
|
|
3a5b053248 | ||
|
|
d74364b1c2 | ||
|
|
213d7596d2 | ||
|
|
3d4df422e1 | ||
|
|
3531711991 | ||
|
|
f860074a24 | ||
|
|
65de44012a | ||
|
|
067a49bd2c | ||
|
|
4967efa745 | ||
|
|
61669e5574 |
@@ -1,4 +1,4 @@
|
||||
# verb-specificiations
|
||||
# verb-specifications
|
||||
Jambonz Verb Specification Utilities
|
||||
|
||||
#### Running the test suite
|
||||
|
||||
@@ -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
4
package-lock.json
generated
@@ -1,12 +1,12 @@
|
||||
{
|
||||
"name": "@jambonz/verb-specifications",
|
||||
"version": "0.0.27",
|
||||
"version": "0.0.57",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@jambonz/verb-specifications",
|
||||
"version": "0.0.27",
|
||||
"version": "0.0.57",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"debug": "^4.3.4",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@jambonz/verb-specifications",
|
||||
"version": "0.0.27",
|
||||
"version": "0.0.57",
|
||||
"description": "Jambonz Verb Specification Utilities",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
139
specs.json
139
specs.json
@@ -1,4 +1,11 @@
|
||||
{
|
||||
"answer": {
|
||||
"properties": {
|
||||
"id": "string"
|
||||
},
|
||||
"required": [
|
||||
]
|
||||
},
|
||||
"sip:decline": {
|
||||
"properties": {
|
||||
"id": "string",
|
||||
@@ -43,10 +50,13 @@
|
||||
"bargeIn": "#bargeIn",
|
||||
"record": "#recordOptions",
|
||||
"listen": "#listenOptions",
|
||||
"transcribe": "#transcribeOptions",
|
||||
"amd": "#amd",
|
||||
"notifyEvents": "boolean",
|
||||
"reset": "string|array",
|
||||
"onHoldMusic": "string"
|
||||
"onHoldMusic": "string",
|
||||
"actionHookDelayAction": "#actionHookDelayAction",
|
||||
"sipRequestWithinDialogHook": "object|string"
|
||||
},
|
||||
"required": []
|
||||
},
|
||||
@@ -60,7 +70,12 @@
|
||||
"type": "string",
|
||||
"enum": ["mono", "stereo", "mixed"]
|
||||
},
|
||||
"metadata": "object"
|
||||
"metadata": "object",
|
||||
"maxLength": "number",
|
||||
"passDtmf": "boolean",
|
||||
"playBeep": "boolean",
|
||||
"disableBidirectionalAudio": "boolean",
|
||||
"timeout": "number"
|
||||
},
|
||||
"required": [
|
||||
"enable"
|
||||
@@ -84,6 +99,34 @@
|
||||
"enable"
|
||||
]
|
||||
},
|
||||
"transcribeOptions": {
|
||||
"properties": {
|
||||
"enable": "boolean",
|
||||
"transcriptionHook": "string",
|
||||
"recognizer": "#recognizer"
|
||||
},
|
||||
"required": [
|
||||
"enable"
|
||||
]
|
||||
},
|
||||
"dub": {
|
||||
"properties": {
|
||||
"id": "string",
|
||||
"action": {
|
||||
"type": "string",
|
||||
"enum": ["addTrack", "removeTrack", "silenceTrack", "playOnTrack", "sayOnTrack"]
|
||||
},
|
||||
"track": "string",
|
||||
"play": "string",
|
||||
"say": "string",
|
||||
"loop": "boolean",
|
||||
"gain": "number|string"
|
||||
},
|
||||
"required": [
|
||||
"action",
|
||||
"track"
|
||||
]
|
||||
},
|
||||
"dequeue": {
|
||||
"properties": {
|
||||
"id": "string",
|
||||
@@ -169,7 +212,8 @@
|
||||
"timeout": "number",
|
||||
"recognizer": "#recognizer",
|
||||
"play": "#play",
|
||||
"say": "#say"
|
||||
"say": "#say",
|
||||
"actionHookDelayAction": "#actionHookDelayAction"
|
||||
},
|
||||
"required": [
|
||||
]
|
||||
@@ -179,8 +223,11 @@
|
||||
"id": "string",
|
||||
"name": "string",
|
||||
"beep": "boolean",
|
||||
"memberTag": "string",
|
||||
"speakOnlyTo": "string",
|
||||
"startConferenceOnEnter": "boolean",
|
||||
"endConferenceOnExit": "boolean",
|
||||
"endConferenceDuration": "number",
|
||||
"maxParticipants": "number",
|
||||
"joinMuted": "boolean",
|
||||
"actionHook": "object|string",
|
||||
@@ -198,6 +245,7 @@
|
||||
"properties": {
|
||||
"id": "string",
|
||||
"actionHook": "object|string",
|
||||
"onHoldHook": "object|string",
|
||||
"answerOnBridge": "boolean",
|
||||
"callerId": "string",
|
||||
"callerName": "string",
|
||||
@@ -214,7 +262,8 @@
|
||||
"timeout": "number",
|
||||
"proxy": "string",
|
||||
"transcribe": "#transcribe",
|
||||
"amd": "#amd"
|
||||
"amd": "#amd",
|
||||
"tag": "object"
|
||||
},
|
||||
"required": [
|
||||
"target"
|
||||
@@ -400,7 +449,9 @@
|
||||
"to": "#target",
|
||||
"headers": "object",
|
||||
"timeout": "number",
|
||||
"amd": "#amd"
|
||||
"amd": "#amd",
|
||||
"dual_streams": "boolean",
|
||||
"sipRequestWithinDialogHook": "string"
|
||||
},
|
||||
"required": [
|
||||
"call_hook",
|
||||
@@ -448,7 +499,8 @@
|
||||
"vmail": "boolean",
|
||||
"tenant": "string",
|
||||
"trunk": "string",
|
||||
"overrideTo": "string"
|
||||
"overrideTo": "string",
|
||||
"proxy": "string"
|
||||
},
|
||||
"required": [
|
||||
"type"
|
||||
@@ -477,7 +529,11 @@
|
||||
"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"]
|
||||
@@ -497,6 +553,9 @@
|
||||
"vendor": "string",
|
||||
"label": "string",
|
||||
"language": "string",
|
||||
"fallbackVendor": "string",
|
||||
"fallbackLabel": "string",
|
||||
"fallbackLanguage": "string",
|
||||
"vad": "#vad",
|
||||
"hints": "array",
|
||||
"hintsBoost": "number",
|
||||
@@ -559,11 +618,16 @@
|
||||
"azureSttEndpointId": "string",
|
||||
"asrDtmfTerminationDigit": "string",
|
||||
"asrTimeout": "number",
|
||||
"fastRecognitionTimeout": "number",
|
||||
"nuanceOptions": "#nuanceOptions",
|
||||
"deepgramOptions": "#deepgramOptions",
|
||||
"ibmOptions": "#ibmOptions",
|
||||
"nvidiaOptions": "#nvidiaOptions",
|
||||
"sonioxOptions": "#sonioxOptions",
|
||||
"cobaltOptions": "#cobaltOptions",
|
||||
"awsOptions": "#awsOptions",
|
||||
"azureOptions": "#azureOptions",
|
||||
"assemblyAiOptions": "#assemblyAiOptions",
|
||||
"customOptions": "#customOptions"
|
||||
},
|
||||
"required": [
|
||||
@@ -579,6 +643,48 @@
|
||||
"required": [
|
||||
]
|
||||
},
|
||||
"awsOptions": {
|
||||
"properties": {
|
||||
"accessKey": "string",
|
||||
"secretKey": "string",
|
||||
"securityToken": "string",
|
||||
"region": "string",
|
||||
"vocabularyName": "string",
|
||||
"vocabularyFilterName": "string",
|
||||
"vocabularyFilterMethod": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"remove",
|
||||
"mask",
|
||||
"tag"
|
||||
]
|
||||
},
|
||||
"languageModelName": "string",
|
||||
"piiEntityTypes": "array",
|
||||
"piiIdentifyEntities": "boolean"
|
||||
},
|
||||
"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",
|
||||
@@ -611,12 +717,15 @@
|
||||
},
|
||||
"deepgramOptions": {
|
||||
"properties": {
|
||||
"deepgramSttUri": "string",
|
||||
"deepgramSttUseTls": "boolean",
|
||||
"apiKey": "string",
|
||||
"tier": "string",
|
||||
"model": "string",
|
||||
"customModel": "string",
|
||||
"version": "string",
|
||||
"punctuate": "boolean",
|
||||
"smartFormatting": "boolean",
|
||||
"profanityFilter": "boolean",
|
||||
"redact": {
|
||||
"type": "string",
|
||||
@@ -637,6 +746,8 @@
|
||||
"replace": "array",
|
||||
"keywords": "array",
|
||||
"endpointing": "boolean | number",
|
||||
"utteranceEndMs": "number",
|
||||
"shortUtterance": "boolean",
|
||||
"vadTurnoff": "number",
|
||||
"tag": "string"
|
||||
}
|
||||
@@ -711,6 +822,11 @@
|
||||
"required": [
|
||||
]
|
||||
},
|
||||
"assemblyAiOptions": {
|
||||
"properties": {
|
||||
"apiKey": "string"
|
||||
}
|
||||
},
|
||||
"resource": {
|
||||
"properties": {
|
||||
"externalReference": "#resourceReference",
|
||||
@@ -811,5 +927,14 @@
|
||||
"toneTimeoutMs": "number",
|
||||
"greetingCompletionTimeoutMs": "number"
|
||||
}
|
||||
},
|
||||
"actionHookDelayAction" : {
|
||||
"properties": {
|
||||
"enabled": "boolean",
|
||||
"noResponseTimeout": "number",
|
||||
"noResponseGiveUpTimeout": "number",
|
||||
"retries": "number",
|
||||
"actions": "array"
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -37,7 +37,49 @@ test("validate correct verbs", async (t) => {
|
||||
"input" : ["speech"],
|
||||
"actionHook": "/userInput"
|
||||
},
|
||||
"onHoldMusic": "http://server.com/hold"
|
||||
"transcribe": {
|
||||
"enable": true,
|
||||
"transcriptionHook": "http://server.com/hook",
|
||||
"recognizer": {
|
||||
"vendor": "google",
|
||||
"language": "de-DE",
|
||||
}
|
||||
},
|
||||
"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",
|
||||
"recognizer": {
|
||||
"vendor": "google",
|
||||
"language": "de-DE",
|
||||
"label": "label1",
|
||||
"assemblyAiOptions": {
|
||||
"apiKey": "apikey"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"verb": "config",
|
||||
@@ -50,6 +92,10 @@ test("validate correct verbs", async (t) => {
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"verb": "config",
|
||||
"sipRequestWithinDialogHook": "https://jambonz.or/sipIndialogActionHook"
|
||||
},
|
||||
{
|
||||
"verb": "config",
|
||||
"record": {
|
||||
@@ -67,6 +113,7 @@ test("validate correct verbs", async (t) => {
|
||||
{
|
||||
"verb": "dial",
|
||||
"actionHook": "/outdial",
|
||||
"onHoldHook": "/onHoldHook",
|
||||
"callerId": "+16173331212",
|
||||
"callerName": "Tom",
|
||||
"answerOnBridge": true,
|
||||
@@ -134,6 +181,7 @@ test("validate correct verbs", async (t) => {
|
||||
"language": "en-US",
|
||||
"hints": ["sales", "support"],
|
||||
"hintsBoost": 10,
|
||||
"fastRecognitionTimeout": 2000,
|
||||
"deepgramOptions": {
|
||||
"endpointing": 500
|
||||
}
|
||||
@@ -143,7 +191,29 @@ test("validate correct verbs", async (t) => {
|
||||
"synthesizer": {
|
||||
"vendor": "google",
|
||||
"language": "en-US",
|
||||
"label": "label1"
|
||||
"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",
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
@@ -159,12 +229,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",
|
||||
@@ -304,7 +399,8 @@ test("validate correct verbs", async (t) => {
|
||||
"amd": {
|
||||
"actionHook": "/answeringMachineDetection",
|
||||
|
||||
}
|
||||
},
|
||||
"dual_streams": true
|
||||
}
|
||||
];
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user