@jambonz/schema 0.4.16 → 0.4.17
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/AGENTS.md +3 -2
- package/jambonz-app.schema.json +1 -0
- package/lib/normalize.js +1 -0
- package/package.json +1 -1
- package/verbs/voicelive_s2s.schema.json +146 -0
package/AGENTS.md
CHANGED
|
@@ -35,7 +35,7 @@ The verb schemas and JSON structure are identical in both modes. The difference
|
|
|
35
35
|
- **Webhook**: Simple IVR, call routing, voicemail, basic gather-and-respond patterns.
|
|
36
36
|
- **WebSocket**: LLM-powered voice agents, real-time audio streaming, complex conversational flows, anything requiring bidirectional communication, or asynchronous logic, or streaming tts.
|
|
37
37
|
|
|
38
|
-
**IMPORTANT**: Any application that uses a speech-to-speech verb (`openai_s2s`, `gptlive_s2s`, `google_s2s`, `deepgram_s2s`, `ultravox_s2s`, `qwen_s2s`, `elevenlabs_s2s`, `s2s`, or `agent`) MUST use WebSocket transport, not webhooks. These verbs require persistent bidirectional communication for real-time audio and events.
|
|
38
|
+
**IMPORTANT**: Any application that uses a speech-to-speech verb (`openai_s2s`, `gptlive_s2s`, `voicelive_s2s`, `google_s2s`, `deepgram_s2s`, `ultravox_s2s`, `qwen_s2s`, `elevenlabs_s2s`, `s2s`, or `agent`) MUST use WebSocket transport, not webhooks. These verbs require persistent bidirectional communication for real-time audio and events.
|
|
39
39
|
|
|
40
40
|
## Schema
|
|
41
41
|
|
|
@@ -64,6 +64,7 @@ Two tools are available:
|
|
|
64
64
|
### AI & Real-time
|
|
65
65
|
- **openai_s2s** / **google_s2s** / **deepgram_s2s** / **ultravox_s2s** / **qwen_s2s** — Connect the caller to a vendor-specific LLM for real-time voice conversation. These are the **preferred** verbs when the vendor is known. Each handles the full STT→LLM→TTS flow with the vendor pre-set.
|
|
66
66
|
- **gptlive_s2s** — Connect the caller to OpenAI's GPT Live API (limited-access alpha). A different wire protocol from `openai_s2s` (Realtime): `llmOptions` carries only a `session_update`, there is no `response_create`, and tool calls arrive via a Responses-targeted *delegation*. See [GPT Live S2S specifics](#gpt-live-s2s-specifics) below.
|
|
67
|
+
- **voicelive_s2s** — Connect the caller to the Azure Voice Live API. Requires `connectOptions.host` (your Foundry/Speech resource). Unlike `openai_s2s`, the `session_update` uses Voice Live's flat shape and is sent verbatim, so Azure-only settings (`azure_semantic_vad`, `azure_deep_noise_suppression`, Azure TTS voices) work.
|
|
67
68
|
- **elevenlabs_s2s** — Connect the caller to an ElevenLabs Conversational AI agent. **Unlike other s2s vendors**, ElevenLabs requires a pre-configured `agent_id` (created in the ElevenLabs dashboard) rather than a model and messages. See [ElevenLabs S2S specifics](#elevenlabs-s2s-specifics) below.
|
|
68
69
|
- **s2s** — Generic LLM voice conversation verb. Use only when the vendor is determined at runtime (e.g. from an env var). Requires `vendor` to be specified.
|
|
69
70
|
- **agent** — Higher-level voice AI agent with integrated turn detection. Mix-and-match STT, LLM, and TTS vendors.
|
|
@@ -99,7 +100,7 @@ Two tools are available:
|
|
|
99
100
|
**IMPORTANT — Code generation rules:**
|
|
100
101
|
|
|
101
102
|
1. **Always use `stream`, never `listen`** — they are synonyms; `stream` is the preferred name.
|
|
102
|
-
2. **Always use the vendor-specific shortcut when the LLM vendor is known** — use `openai_s2s`, `gptlive_s2s`, `google_s2s`, `elevenlabs_s2s`, `deepgram_s2s`, `qwen_s2s`, or `ultravox_s2s`. Do NOT use `llm` or `s2s` with a `vendor` property when a shortcut exists.
|
|
103
|
+
2. **Always use the vendor-specific shortcut when the LLM vendor is known** — use `openai_s2s`, `gptlive_s2s`, `voicelive_s2s`, `google_s2s`, `elevenlabs_s2s`, `deepgram_s2s`, `qwen_s2s`, or `ultravox_s2s`. Do NOT use `llm` or `s2s` with a `vendor` property when a shortcut exists.
|
|
103
104
|
3. **Use `s2s` (not `llm`) when the vendor is dynamic** — e.g. the vendor comes from an env var or runtime config. Both `s2s` and `llm` are synonyms, but prefer `s2s`.
|
|
104
105
|
4. **Never use `llm` in generated code** — it is a legacy name. Use either a vendor shortcut or `s2s`.
|
|
105
106
|
|
package/jambonz-app.schema.json
CHANGED
package/lib/normalize.js
CHANGED
|
@@ -16,6 +16,7 @@ const verbTransforms = new Map([
|
|
|
16
16
|
['ultravox_s2s', {verb: 'llm', properties: {vendor: 'ultravox'}}],
|
|
17
17
|
['qwen_s2s', {verb: 'llm', properties: {vendor: 'qwen'}}],
|
|
18
18
|
['gptlive_s2s', {verb: 'llm', properties: {vendor: 'gptlive'}}],
|
|
19
|
+
['voicelive_s2s', {verb: 'llm', properties: {vendor: 'voicelive'}}],
|
|
19
20
|
]);
|
|
20
21
|
|
|
21
22
|
function applyVerbTransform(name, data) {
|
package/package.json
CHANGED
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
{
|
|
2
|
+
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
+
"$id": "https://jambonz.org/schema/verbs/voicelive_s2s",
|
|
4
|
+
"minVersion": "11.1.0",
|
|
5
|
+
"title": "Azure Voice Live S2S",
|
|
6
|
+
"description": "Shortcut for 'llm' with vendor automatically set to 'voicelive'. Connects the caller to the Azure Voice Live API for real-time speech-to-speech conversation. connectOptions.host is required and names your Microsoft Foundry or Azure Speech resource (e.g. my-resource.services.ai.azure.com). auth takes either apiKey (sent as the api-key query parameter) or accessToken (a Microsoft Entra ID token, sent as a Bearer header). llmOptions.session_update is required and is sent verbatim in Voice Live's flat session shape, so Azure-only settings such as azure_semantic_vad, azure_deep_noise_suppression and Azure TTS voices are supported.",
|
|
7
|
+
"type": "object",
|
|
8
|
+
"allOf": [
|
|
9
|
+
{
|
|
10
|
+
"$ref": "../components/llm-base"
|
|
11
|
+
}
|
|
12
|
+
],
|
|
13
|
+
"properties": {
|
|
14
|
+
"verb": {
|
|
15
|
+
"const": "voicelive_s2s",
|
|
16
|
+
"description": "The verb name."
|
|
17
|
+
},
|
|
18
|
+
"vendor": {
|
|
19
|
+
"type": "string",
|
|
20
|
+
"const": "voicelive",
|
|
21
|
+
"description": "The LLM vendor (always 'voicelive' for this shortcut)."
|
|
22
|
+
},
|
|
23
|
+
"connectOptions": {
|
|
24
|
+
"type": "object",
|
|
25
|
+
"description": "Connection options for the Voice Live endpoint.",
|
|
26
|
+
"properties": {
|
|
27
|
+
"host": {
|
|
28
|
+
"type": "string",
|
|
29
|
+
"description": "Required. The Foundry/Speech resource hostname, e.g. my-resource.services.ai.azure.com."
|
|
30
|
+
},
|
|
31
|
+
"apiVersion": {
|
|
32
|
+
"type": "string",
|
|
33
|
+
"description": "The Voice Live api-version. Defaults to 2026-04-10.",
|
|
34
|
+
"examples": [
|
|
35
|
+
"2026-04-10",
|
|
36
|
+
"2026-07-15"
|
|
37
|
+
]
|
|
38
|
+
},
|
|
39
|
+
"agentId": {
|
|
40
|
+
"type": "string",
|
|
41
|
+
"description": "Foundry Agent Service agent id. When set, the session is addressed by agent instead of model."
|
|
42
|
+
},
|
|
43
|
+
"projectId": {
|
|
44
|
+
"type": "string",
|
|
45
|
+
"description": "Foundry project id, used together with agentId."
|
|
46
|
+
},
|
|
47
|
+
"path": {
|
|
48
|
+
"type": "string",
|
|
49
|
+
"description": "Overrides the entire websocket path, including the query string. Rarely needed."
|
|
50
|
+
}
|
|
51
|
+
},
|
|
52
|
+
"required": [
|
|
53
|
+
"host"
|
|
54
|
+
],
|
|
55
|
+
"additionalProperties": true
|
|
56
|
+
},
|
|
57
|
+
"auth": {
|
|
58
|
+
"type": "object",
|
|
59
|
+
"description": "Either apiKey (sent as the api-key query parameter) or accessToken (a Microsoft Entra ID token sent as a Bearer header).",
|
|
60
|
+
"properties": {
|
|
61
|
+
"apiKey": {
|
|
62
|
+
"type": "string",
|
|
63
|
+
"minLength": 1,
|
|
64
|
+
"description": "Azure Voice Live API key."
|
|
65
|
+
},
|
|
66
|
+
"accessToken": {
|
|
67
|
+
"type": "string",
|
|
68
|
+
"minLength": 1,
|
|
69
|
+
"description": "Microsoft Entra ID token for the https://ai.azure.com/.default scope."
|
|
70
|
+
}
|
|
71
|
+
},
|
|
72
|
+
"anyOf": [
|
|
73
|
+
{
|
|
74
|
+
"required": [
|
|
75
|
+
"apiKey"
|
|
76
|
+
]
|
|
77
|
+
},
|
|
78
|
+
{
|
|
79
|
+
"required": [
|
|
80
|
+
"accessToken"
|
|
81
|
+
]
|
|
82
|
+
}
|
|
83
|
+
],
|
|
84
|
+
"additionalProperties": true
|
|
85
|
+
},
|
|
86
|
+
"llmOptions": {
|
|
87
|
+
"type": "object",
|
|
88
|
+
"description": "session_update is sent verbatim in Voice Live's flat session shape; response_create triggers the first response.",
|
|
89
|
+
"properties": {
|
|
90
|
+
"session_update": {
|
|
91
|
+
"type": "object",
|
|
92
|
+
"description": "The flat Voice Live session body."
|
|
93
|
+
},
|
|
94
|
+
"response_create": {
|
|
95
|
+
"type": "object",
|
|
96
|
+
"description": "The initial response.create body."
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
"required": [
|
|
100
|
+
"session_update",
|
|
101
|
+
"response_create"
|
|
102
|
+
],
|
|
103
|
+
"additionalProperties": true
|
|
104
|
+
}
|
|
105
|
+
},
|
|
106
|
+
"required": [
|
|
107
|
+
"auth",
|
|
108
|
+
"connectOptions",
|
|
109
|
+
"llmOptions"
|
|
110
|
+
],
|
|
111
|
+
"examples": [
|
|
112
|
+
{
|
|
113
|
+
"verb": "voicelive_s2s",
|
|
114
|
+
"model": "gpt-realtime",
|
|
115
|
+
"auth": {
|
|
116
|
+
"apiKey": "..."
|
|
117
|
+
},
|
|
118
|
+
"connectOptions": {
|
|
119
|
+
"host": "my-resource.services.ai.azure.com"
|
|
120
|
+
},
|
|
121
|
+
"llmOptions": {
|
|
122
|
+
"session_update": {
|
|
123
|
+
"modalities": [
|
|
124
|
+
"text",
|
|
125
|
+
"audio"
|
|
126
|
+
],
|
|
127
|
+
"instructions": "You are a helpful voice assistant.",
|
|
128
|
+
"voice": {
|
|
129
|
+
"name": "en-US-Ava:DragonHDLatestNeural",
|
|
130
|
+
"type": "azure-standard"
|
|
131
|
+
},
|
|
132
|
+
"turn_detection": {
|
|
133
|
+
"type": "azure_semantic_vad",
|
|
134
|
+
"silence_duration_ms": 500,
|
|
135
|
+
"remove_filler_words": true
|
|
136
|
+
},
|
|
137
|
+
"input_audio_noise_reduction": {
|
|
138
|
+
"type": "azure_deep_noise_suppression"
|
|
139
|
+
}
|
|
140
|
+
},
|
|
141
|
+
"response_create": {}
|
|
142
|
+
},
|
|
143
|
+
"actionHook": "/s2s-complete"
|
|
144
|
+
}
|
|
145
|
+
]
|
|
146
|
+
}
|