mirror of
https://github.com/jambonz/verb-specifications.git
synced 2026-03-24 12:39:08 +00:00
Compare commits
42 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f3f048d94f | ||
|
|
a737d8bcbb | ||
|
|
c3d69e614e | ||
|
|
9277e053a6 | ||
|
|
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 |
@@ -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.39",
|
||||
"version": "0.0.59",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@jambonz/verb-specifications",
|
||||
"version": "0.0.39",
|
||||
"version": "0.0.59",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"debug": "^4.3.4",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@jambonz/verb-specifications",
|
||||
"version": "0.0.39",
|
||||
"version": "0.0.59",
|
||||
"description": "Jambonz Verb Specification Utilities",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
103
specs.json
103
specs.json
@@ -1,4 +1,11 @@
|
||||
{
|
||||
"answer": {
|
||||
"properties": {
|
||||
"id": "string"
|
||||
},
|
||||
"required": [
|
||||
]
|
||||
},
|
||||
"sip:decline": {
|
||||
"properties": {
|
||||
"id": "string",
|
||||
@@ -43,12 +50,14 @@
|
||||
"bargeIn": "#bargeIn",
|
||||
"record": "#recordOptions",
|
||||
"listen": "#listenOptions",
|
||||
"transcribe": "#transcribeOptions",
|
||||
"amd": "#amd",
|
||||
"notifyEvents": "boolean",
|
||||
"reset": "string|array",
|
||||
"onHoldMusic": "string",
|
||||
"actionHookDelayAction": "#actionHookDelayAction",
|
||||
"sipRequestWithinDialogHook": "object|string"
|
||||
"sipRequestWithinDialogHook": "object|string",
|
||||
"boostAudioSignal": "number|string"
|
||||
},
|
||||
"required": []
|
||||
},
|
||||
@@ -91,6 +100,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",
|
||||
@@ -187,6 +224,8 @@
|
||||
"id": "string",
|
||||
"name": "string",
|
||||
"beep": "boolean",
|
||||
"memberTag": "string",
|
||||
"speakOnlyTo": "string",
|
||||
"startConferenceOnEnter": "boolean",
|
||||
"endConferenceOnExit": "boolean",
|
||||
"endConferenceDuration": "number",
|
||||
@@ -224,7 +263,9 @@
|
||||
"timeout": "number",
|
||||
"proxy": "string",
|
||||
"transcribe": "#transcribe",
|
||||
"amd": "#amd"
|
||||
"amd": "#amd",
|
||||
"dub": "#dub",
|
||||
"tag": "object"
|
||||
},
|
||||
"required": [
|
||||
"target"
|
||||
@@ -411,7 +452,8 @@
|
||||
"headers": "object",
|
||||
"timeout": "number",
|
||||
"amd": "#amd",
|
||||
"dual_streams" : "boolean"
|
||||
"dual_streams": "boolean",
|
||||
"sipRequestWithinDialogHook": "string"
|
||||
},
|
||||
"required": [
|
||||
"call_hook",
|
||||
@@ -459,7 +501,8 @@
|
||||
"vmail": "boolean",
|
||||
"tenant": "string",
|
||||
"trunk": "string",
|
||||
"overrideTo": "string"
|
||||
"overrideTo": "string",
|
||||
"proxy": "string"
|
||||
},
|
||||
"required": [
|
||||
"type"
|
||||
@@ -488,11 +531,11 @@
|
||||
"vendor": "string",
|
||||
"label": "string",
|
||||
"language": "string",
|
||||
"voice": "string",
|
||||
"voice": "string|object",
|
||||
"fallbackVendor": "string",
|
||||
"fallbackLabel": "string",
|
||||
"fallbackLanguage": "string",
|
||||
"fallbackVoice": "string",
|
||||
"fallbackVoice": "string|object",
|
||||
"engine": {
|
||||
"type": "string",
|
||||
"enum": ["standard", "neural"]
|
||||
@@ -584,6 +627,9 @@
|
||||
"nvidiaOptions": "#nvidiaOptions",
|
||||
"sonioxOptions": "#sonioxOptions",
|
||||
"cobaltOptions": "#cobaltOptions",
|
||||
"awsOptions": "#awsOptions",
|
||||
"azureOptions": "#azureOptions",
|
||||
"assemblyAiOptions": "#assemblyAiOptions",
|
||||
"customOptions": "#customOptions"
|
||||
},
|
||||
"required": [
|
||||
@@ -599,6 +645,43 @@
|
||||
"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",
|
||||
"languageIdMode": {
|
||||
"type": "string",
|
||||
"enum": [
|
||||
"AtStart",
|
||||
"Continuous"
|
||||
]
|
||||
}
|
||||
},
|
||||
"required": [
|
||||
]
|
||||
},
|
||||
"cobaltOptions": {
|
||||
"properties": {
|
||||
"serverUri": "string",
|
||||
@@ -643,6 +726,8 @@
|
||||
},
|
||||
"deepgramOptions": {
|
||||
"properties": {
|
||||
"deepgramSttUri": "string",
|
||||
"deepgramSttUseTls": "boolean",
|
||||
"apiKey": "string",
|
||||
"tier": "string",
|
||||
"model": "string",
|
||||
@@ -671,6 +756,7 @@
|
||||
"keywords": "array",
|
||||
"endpointing": "boolean | number",
|
||||
"utteranceEndMs": "number",
|
||||
"shortUtterance": "boolean",
|
||||
"vadTurnoff": "number",
|
||||
"tag": "string"
|
||||
}
|
||||
@@ -745,6 +831,11 @@
|
||||
"required": [
|
||||
]
|
||||
},
|
||||
"assemblyAiOptions": {
|
||||
"properties": {
|
||||
"apiKey": "string"
|
||||
}
|
||||
},
|
||||
"resource": {
|
||||
"properties": {
|
||||
"externalReference": "#resourceReference",
|
||||
|
||||
@@ -37,6 +37,14 @@ test("validate correct verbs", async (t) => {
|
||||
"input" : ["speech"],
|
||||
"actionHook": "/userInput"
|
||||
},
|
||||
"transcribe": {
|
||||
"enable": true,
|
||||
"transcriptionHook": "http://server.com/hook",
|
||||
"recognizer": {
|
||||
"vendor": "google",
|
||||
"language": "de-DE",
|
||||
}
|
||||
},
|
||||
"onHoldMusic": "http://server.com/hold",
|
||||
"actionHookDelayAction": {
|
||||
"enabled": true,
|
||||
@@ -62,6 +70,28 @@ test("validate correct verbs", async (t) => {
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"verb": "config",
|
||||
"recognizer": {
|
||||
"vendor": "google",
|
||||
"language": "de-DE",
|
||||
"label": "label1",
|
||||
"assemblyAiOptions": {
|
||||
"apiKey": "apikey"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"verb": "config",
|
||||
"recognizer": {
|
||||
"vendor": "google",
|
||||
"language": "de-DE",
|
||||
"label": "label1",
|
||||
"azureOptions": {
|
||||
"languageIdMode": "Continuous"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"verb": "config",
|
||||
"record": {
|
||||
@@ -178,6 +208,24 @@ test("validate correct verbs", async (t) => {
|
||||
"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",
|
||||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user