mirror of
https://github.com/jambonz/verb-specifications.git
synced 2026-03-24 12:39:08 +00:00
Compare commits
22 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
3f19ce4a24 | ||
|
|
1e6b24181c | ||
|
|
63aa94a9ec | ||
|
|
d4614c2ad1 | ||
|
|
7da6165b93 | ||
|
|
ad76081fa7 | ||
|
|
ce94e943d2 | ||
|
|
436fb557dc | ||
|
|
203b8600a8 | ||
|
|
b877ca52d0 | ||
|
|
cdb671d25d | ||
|
|
6ae0aff8b1 | ||
|
|
9a2a22dd88 | ||
|
|
369583d536 | ||
|
|
77d203ca80 | ||
|
|
9cb550f49e | ||
|
|
de88976293 | ||
|
|
60efb4b9af | ||
|
|
49ac048477 | ||
|
|
e653a62c49 | ||
|
|
f41aae81c6 | ||
|
|
5707f7d4d4 |
@@ -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.40",
|
||||
"version": "0.0.50",
|
||||
"lockfileVersion": 2,
|
||||
"requires": true,
|
||||
"packages": {
|
||||
"": {
|
||||
"name": "@jambonz/verb-specifications",
|
||||
"version": "0.0.40",
|
||||
"version": "0.0.50",
|
||||
"license": "MIT",
|
||||
"dependencies": {
|
||||
"debug": "^4.3.4",
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"name": "@jambonz/verb-specifications",
|
||||
"version": "0.0.40",
|
||||
"version": "0.0.50",
|
||||
"description": "Jambonz Verb Specification Utilities",
|
||||
"main": "index.js",
|
||||
"scripts": {
|
||||
|
||||
59
specs.json
59
specs.json
@@ -43,6 +43,7 @@
|
||||
"bargeIn": "#bargeIn",
|
||||
"record": "#recordOptions",
|
||||
"listen": "#listenOptions",
|
||||
"transcribe": "#transcribeOptions",
|
||||
"amd": "#amd",
|
||||
"notifyEvents": "boolean",
|
||||
"reset": "string|array",
|
||||
@@ -91,6 +92,16 @@
|
||||
"enable"
|
||||
]
|
||||
},
|
||||
"transcribeOptions": {
|
||||
"properties": {
|
||||
"enable": "boolean",
|
||||
"transcriptionHook": "string",
|
||||
"recognizer": "#recognizer"
|
||||
},
|
||||
"required": [
|
||||
"enable"
|
||||
]
|
||||
},
|
||||
"dequeue": {
|
||||
"properties": {
|
||||
"id": "string",
|
||||
@@ -411,7 +422,8 @@
|
||||
"headers": "object",
|
||||
"timeout": "number",
|
||||
"amd": "#amd",
|
||||
"dual_streams" : "boolean"
|
||||
"dual_streams": "boolean",
|
||||
"sipRequestWithinDialogHook": "string"
|
||||
},
|
||||
"required": [
|
||||
"call_hook",
|
||||
@@ -459,7 +471,8 @@
|
||||
"vmail": "boolean",
|
||||
"tenant": "string",
|
||||
"trunk": "string",
|
||||
"overrideTo": "string"
|
||||
"overrideTo": "string",
|
||||
"proxy": "string"
|
||||
},
|
||||
"required": [
|
||||
"type"
|
||||
@@ -488,11 +501,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 +597,9 @@
|
||||
"nvidiaOptions": "#nvidiaOptions",
|
||||
"sonioxOptions": "#sonioxOptions",
|
||||
"cobaltOptions": "#cobaltOptions",
|
||||
"awsOptions": "#awsOptions",
|
||||
"azureOptions": "#azureOptions",
|
||||
"assemblyAiOptions": "#assemblyAiOptions",
|
||||
"customOptions": "#customOptions"
|
||||
},
|
||||
"required": [
|
||||
@@ -599,6 +615,36 @@
|
||||
"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",
|
||||
@@ -746,6 +792,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,17 @@ test("validate correct verbs", async (t) => {
|
||||
]
|
||||
}
|
||||
},
|
||||
{
|
||||
"verb": "config",
|
||||
"recognizer": {
|
||||
"vendor": "google",
|
||||
"language": "de-DE",
|
||||
"label": "label1",
|
||||
"assemblyAiOptions": {
|
||||
"apiKey": "apikey"
|
||||
}
|
||||
}
|
||||
},
|
||||
{
|
||||
"verb": "config",
|
||||
"record": {
|
||||
@@ -178,6 +197,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