jambonz-python-sdk 0.2.0__tar.gz → 0.3.1__tar.gz
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.
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/.gitignore +0 -1
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/PKG-INFO +5 -5
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/README.md +4 -4
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/pyproject.toml +1 -1
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/client/api.py +4 -4
- jambonz_python_sdk-0.2.0/src/jambonz_sdk/schema/callbacks/pipeline-turn.schema.json → jambonz_python_sdk-0.3.1/src/jambonz_sdk/schema/callbacks/agent-turn.schema.json +4 -4
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/callbacks/call-status.schema.json +6 -1
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/components/recognizer-assemblyAiOptions.schema.json +3 -3
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/components/recognizer-deepgramOptions.schema.json +5 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/components/recognizer-houndifyOptions.schema.json +3 -1
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/components/recognizer.schema.json +18 -3
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/jambonz-app.schema.json +1 -1
- jambonz_python_sdk-0.2.0/src/jambonz_sdk/schema/verbs/pipeline.schema.json → jambonz_python_sdk-0.3.1/src/jambonz_sdk/schema/verbs/agent.schema.json +137 -16
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/verbs/dub.schema.json +1 -1
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/verbs/transcribe.schema.json +2 -1
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/types/__init__.py +2 -2
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/types/verbs.py +4 -4
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/verb_builder.pyi +174 -332
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/verb_registry.py +3 -3
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/websocket/session.py +43 -11
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/__init__.py +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/_signature.py +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/client/__init__.py +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/callbacks/amd.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/callbacks/base.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/callbacks/conference-status.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/callbacks/conference-wait.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/callbacks/conference.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/callbacks/dequeue.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/callbacks/dial-dtmf.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/callbacks/dial-hold.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/callbacks/dial-refer.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/callbacks/dial.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/callbacks/enqueue-wait.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/callbacks/enqueue.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/callbacks/gather-partial.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/callbacks/gather.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/callbacks/listen.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/callbacks/llm.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/callbacks/message.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/callbacks/play.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/callbacks/session-new.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/callbacks/session-reconnect.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/callbacks/session-redirect.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/callbacks/sip-refer-event.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/callbacks/sip-refer.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/callbacks/sip-request.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/callbacks/transcribe-translation.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/callbacks/transcribe.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/callbacks/tts-streaming-event.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/callbacks/verb-status.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/components/actionHook.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/components/actionHookDelayAction.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/components/amd.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/components/auth.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/components/bidirectionalAudio.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/components/fillerNoise.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/components/llm-base.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/components/recognizer-awsOptions.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/components/recognizer-azureOptions.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/components/recognizer-cobaltOptions.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/components/recognizer-customOptions.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/components/recognizer-elevenlabsOptions.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/components/recognizer-gladiaOptions.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/components/recognizer-googleOptions.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/components/recognizer-ibmOptions.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/components/recognizer-nuanceOptions.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/components/recognizer-nvidiaOptions.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/components/recognizer-openaiOptions.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/components/recognizer-sonioxOptions.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/components/recognizer-speechmaticsOptions.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/components/recognizer-verbioOptions.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/components/synthesizer.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/components/target.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/components/vad.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/verbs/alert.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/verbs/answer.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/verbs/conference.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/verbs/config.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/verbs/deepgram_s2s.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/verbs/dequeue.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/verbs/dial.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/verbs/dialogflow.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/verbs/dtmf.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/verbs/elevenlabs_s2s.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/verbs/enqueue.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/verbs/gather.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/verbs/google_s2s.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/verbs/hangup.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/verbs/leave.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/verbs/listen.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/verbs/llm.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/verbs/message.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/verbs/openai_s2s.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/verbs/pause.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/verbs/play.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/verbs/redirect.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/verbs/rest_dial.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/verbs/s2s.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/verbs/say.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/verbs/sip-decline.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/verbs/sip-refer.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/verbs/sip-request.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/verbs/stream.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/verbs/tag.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/verbs/ultravox_s2s.schema.json +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/types/components.py +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/types/rest.py +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/types/session.py +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/validator.py +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/verb_builder.py +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/webhook/__init__.py +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/webhook/middleware.py +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/webhook/response.py +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/websocket/__init__.py +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/websocket/audio_client.py +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/websocket/audio_stream.py +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/websocket/client.py +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/websocket/endpoint.py +0 -0
- {jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/websocket/router.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: jambonz-python-sdk
|
|
3
|
-
Version: 0.
|
|
3
|
+
Version: 0.3.1
|
|
4
4
|
Summary: Python SDK for jambonz CPaaS platform
|
|
5
5
|
Project-URL: Homepage, https://github.com/jambonz/jambonz-python-sdk
|
|
6
6
|
Project-URL: Repository, https://github.com/jambonz/jambonz-python-sdk
|
|
@@ -106,7 +106,7 @@ async with JambonzClient(
|
|
|
106
106
|
|
|
107
107
|
### Spec-driven verb generation
|
|
108
108
|
|
|
109
|
-
The SDK does **not** hardcode verb method signatures. Instead, verb methods (`.say()`, `.gather()`, `.dial()`, `.
|
|
109
|
+
The SDK does **not** hardcode verb method signatures. Instead, verb methods (`.say()`, `.gather()`, `.dial()`, `.agent()`, etc.) are **auto-generated at import time** from [JSON Schema](https://github.com/jambonz/schema) files — the same schemas used by the Node.js SDK and the jambonz server.
|
|
110
110
|
|
|
111
111
|
**What this means:**
|
|
112
112
|
|
|
@@ -132,7 +132,7 @@ VerbDef("new_verb", "new_verb", doc="Description.")
|
|
|
132
132
|
|
|
133
133
|
## Features
|
|
134
134
|
|
|
135
|
-
- **All 31 jambonz verbs**: say, play, gather, dial, conference, enqueue/dequeue, hangup, pause, redirect, config, tag, dtmf, dub, message, alert, answer, leave, listen/stream, transcribe, openai_s2s, google_s2s, deepgram_s2s, elevenlabs_s2s, ultravox_s2s, s2s, llm, dialogflow,
|
|
135
|
+
- **All 31 jambonz verbs**: say, play, gather, dial, conference, enqueue/dequeue, hangup, pause, redirect, config, tag, dtmf, dub, message, alert, answer, leave, listen/stream, transcribe, openai_s2s, google_s2s, deepgram_s2s, elevenlabs_s2s, ultravox_s2s, s2s, llm, dialogflow, agent, sip_decline, sip_request, sip_refer
|
|
136
136
|
- **Fluent chainable API**: `.say(...).gather(...).hangup()`
|
|
137
137
|
- **Webhook transport**: `WebhookResponse` for HTTP apps (works with aiohttp, FastAPI, Flask, etc.)
|
|
138
138
|
- **WebSocket transport**: `create_endpoint` with `Session`, event handling, `send()`/`reply()`
|
|
@@ -140,7 +140,7 @@ VerbDef("new_verb", "new_verb", doc="Description.")
|
|
|
140
140
|
- **Audio streaming**: Bidirectional audio via `AudioStream`
|
|
141
141
|
- **Mid-call control**: inject commands (mute, whisper, record, DTMF, tag)
|
|
142
142
|
- **TTS token streaming**: `send_tts_tokens()` / `flush_tts_tokens()`
|
|
143
|
-
- **
|
|
143
|
+
- **Agent updates**: `update_agent()` for mid-conversation LLM changes
|
|
144
144
|
- **Signature verification**: HMAC-SHA256 webhook signature validation
|
|
145
145
|
- **Env vars**: Portal discovery via OPTIONS + runtime reading
|
|
146
146
|
|
|
@@ -153,7 +153,7 @@ See the [`examples/`](examples/) directory:
|
|
|
153
153
|
| hello-world | [webhook](examples/hello-world/webhook_app.py) | [websocket](examples/hello-world/websocket_app.py) | Minimal greeting |
|
|
154
154
|
| echo | [webhook](examples/echo/webhook_app.py) | [websocket](examples/echo/websocket_app.py) | Speech echo with gather |
|
|
155
155
|
| ivr-menu | [webhook](examples/ivr-menu/webhook_app.py) | — | IVR menu with speech + DTMF |
|
|
156
|
-
| voice-agent | [webhook](examples/voice-agent/webhook_app.py) | [websocket](examples/voice-agent/websocket_app.py) | LLM
|
|
156
|
+
| voice-agent | [webhook](examples/voice-agent/webhook_app.py) | [websocket](examples/voice-agent/websocket_app.py) | LLM agent with tool calls |
|
|
157
157
|
| dial | [webhook](examples/dial/webhook_app.py) | — | Outbound dial with fallback |
|
|
158
158
|
| listen-record | [webhook](examples/listen-record/webhook_app.py) | [websocket](examples/listen-record/websocket_app.py) | Audio recording |
|
|
159
159
|
|
|
@@ -72,7 +72,7 @@ async with JambonzClient(
|
|
|
72
72
|
|
|
73
73
|
### Spec-driven verb generation
|
|
74
74
|
|
|
75
|
-
The SDK does **not** hardcode verb method signatures. Instead, verb methods (`.say()`, `.gather()`, `.dial()`, `.
|
|
75
|
+
The SDK does **not** hardcode verb method signatures. Instead, verb methods (`.say()`, `.gather()`, `.dial()`, `.agent()`, etc.) are **auto-generated at import time** from [JSON Schema](https://github.com/jambonz/schema) files — the same schemas used by the Node.js SDK and the jambonz server.
|
|
76
76
|
|
|
77
77
|
**What this means:**
|
|
78
78
|
|
|
@@ -98,7 +98,7 @@ VerbDef("new_verb", "new_verb", doc="Description.")
|
|
|
98
98
|
|
|
99
99
|
## Features
|
|
100
100
|
|
|
101
|
-
- **All 31 jambonz verbs**: say, play, gather, dial, conference, enqueue/dequeue, hangup, pause, redirect, config, tag, dtmf, dub, message, alert, answer, leave, listen/stream, transcribe, openai_s2s, google_s2s, deepgram_s2s, elevenlabs_s2s, ultravox_s2s, s2s, llm, dialogflow,
|
|
101
|
+
- **All 31 jambonz verbs**: say, play, gather, dial, conference, enqueue/dequeue, hangup, pause, redirect, config, tag, dtmf, dub, message, alert, answer, leave, listen/stream, transcribe, openai_s2s, google_s2s, deepgram_s2s, elevenlabs_s2s, ultravox_s2s, s2s, llm, dialogflow, agent, sip_decline, sip_request, sip_refer
|
|
102
102
|
- **Fluent chainable API**: `.say(...).gather(...).hangup()`
|
|
103
103
|
- **Webhook transport**: `WebhookResponse` for HTTP apps (works with aiohttp, FastAPI, Flask, etc.)
|
|
104
104
|
- **WebSocket transport**: `create_endpoint` with `Session`, event handling, `send()`/`reply()`
|
|
@@ -106,7 +106,7 @@ VerbDef("new_verb", "new_verb", doc="Description.")
|
|
|
106
106
|
- **Audio streaming**: Bidirectional audio via `AudioStream`
|
|
107
107
|
- **Mid-call control**: inject commands (mute, whisper, record, DTMF, tag)
|
|
108
108
|
- **TTS token streaming**: `send_tts_tokens()` / `flush_tts_tokens()`
|
|
109
|
-
- **
|
|
109
|
+
- **Agent updates**: `update_agent()` for mid-conversation LLM changes
|
|
110
110
|
- **Signature verification**: HMAC-SHA256 webhook signature validation
|
|
111
111
|
- **Env vars**: Portal discovery via OPTIONS + runtime reading
|
|
112
112
|
|
|
@@ -119,7 +119,7 @@ See the [`examples/`](examples/) directory:
|
|
|
119
119
|
| hello-world | [webhook](examples/hello-world/webhook_app.py) | [websocket](examples/hello-world/websocket_app.py) | Minimal greeting |
|
|
120
120
|
| echo | [webhook](examples/echo/webhook_app.py) | [websocket](examples/echo/websocket_app.py) | Speech echo with gather |
|
|
121
121
|
| ivr-menu | [webhook](examples/ivr-menu/webhook_app.py) | — | IVR menu with speech + DTMF |
|
|
122
|
-
| voice-agent | [webhook](examples/voice-agent/webhook_app.py) | [websocket](examples/voice-agent/websocket_app.py) | LLM
|
|
122
|
+
| voice-agent | [webhook](examples/voice-agent/webhook_app.py) | [websocket](examples/voice-agent/websocket_app.py) | LLM agent with tool calls |
|
|
123
123
|
| dial | [webhook](examples/dial/webhook_app.py) | — | Outbound dial with fallback |
|
|
124
124
|
| listen-record | [webhook](examples/listen-record/webhook_app.py) | [websocket](examples/listen-record/websocket_app.py) | Audio recording |
|
|
125
125
|
|
|
@@ -100,16 +100,16 @@ class CallsResource(_Resource):
|
|
|
100
100
|
"""
|
|
101
101
|
return await self.update(call_sid, {"mute_status": status})
|
|
102
102
|
|
|
103
|
-
async def
|
|
103
|
+
async def update_agent(
|
|
104
104
|
self, call_sid: str, data: dict[str, Any]
|
|
105
105
|
) -> dict[str, Any]:
|
|
106
|
-
"""Send a mid-conversation
|
|
106
|
+
"""Send a mid-conversation agent update.
|
|
107
107
|
|
|
108
108
|
Args:
|
|
109
109
|
call_sid: The call to update.
|
|
110
|
-
data:
|
|
110
|
+
data: Agent update payload.
|
|
111
111
|
"""
|
|
112
|
-
return await self.update(call_sid, {"
|
|
112
|
+
return await self.update(call_sid, {"agent_update": data})
|
|
113
113
|
|
|
114
114
|
async def noise_isolation(
|
|
115
115
|
self, call_sid: str, status: str, opts: dict[str, Any] | None = None
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://jambonz.org/schema/callbacks/
|
|
4
|
-
"title": "
|
|
5
|
-
"description": "Events sent to the
|
|
3
|
+
"$id": "https://jambonz.org/schema/callbacks/agent-turn",
|
|
4
|
+
"title": "Agent EventHook Events",
|
|
5
|
+
"description": "Events sent to the agent verb's eventHook during a conversation. These are sent as 'agent:event' messages over the WebSocket connection.",
|
|
6
6
|
"type": "object",
|
|
7
7
|
"oneOf": [
|
|
8
8
|
{
|
|
@@ -84,7 +84,7 @@
|
|
|
84
84
|
{
|
|
85
85
|
"properties": {
|
|
86
86
|
"type": {
|
|
87
|
-
"const": "
|
|
87
|
+
"const": "llm_response",
|
|
88
88
|
"description": "Sent when the LLM has finished generating its response for the current turn. Contains the complete response text."
|
|
89
89
|
},
|
|
90
90
|
"response": {
|
|
@@ -2,12 +2,17 @@
|
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
3
|
"$id": "https://jambonz.org/schema/callbacks/call-status",
|
|
4
4
|
"title": "Call Status Webhook Payload",
|
|
5
|
-
"description": "Payload sent to the call status webhook URL whenever the call state changes (e.g. trying, in-progress, completed). The status webhook is configured at the application level in jambonz. Multiple status events are sent over the life of a call. The final event (completed or failed) includes additional fields like duration and termination cause.",
|
|
5
|
+
"description": "Payload sent to the call status webhook URL whenever the call state changes (e.g. trying, in-progress, completed). The status webhook is configured at the application level in jambonz. Multiple status events are sent over the life of a call. The final event (completed or failed) includes additional fields like duration and termination cause.\n\n**Capturing B-leg call_sid:** When using the dial verb to bridge calls, status events are sent for both legs. The A-leg (original inbound call) has `direction: 'inbound'`. The B-leg (outbound dialed call) has `direction: 'outbound'`. To capture the B-leg's call_sid for later use (e.g., injecting commands to the B-leg), listen for status events where `direction === 'outbound'` and extract the `call_sid` field.",
|
|
6
6
|
"allOf": [
|
|
7
7
|
{ "$ref": "base" }
|
|
8
8
|
],
|
|
9
9
|
"type": "object",
|
|
10
10
|
"properties": {
|
|
11
|
+
"direction": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"enum": ["inbound", "outbound"],
|
|
14
|
+
"description": "Call direction. 'inbound' = A-leg (original incoming call to the application). 'outbound' = B-leg (call placed by the dial verb). Use this field to identify which leg generated the status event, especially when capturing the B-leg's call_sid for mid-call control."
|
|
15
|
+
},
|
|
11
16
|
"call_termination_by": {
|
|
12
17
|
"type": "string",
|
|
13
18
|
"enum": ["caller", "jambonz"],
|
|
@@ -28,15 +28,15 @@
|
|
|
28
28
|
},
|
|
29
29
|
"minEndOfTurnSilenceWhenConfident": {
|
|
30
30
|
"type": "number",
|
|
31
|
-
"description": "Minimum silence duration (
|
|
31
|
+
"description": "Minimum silence duration (milliseconds) to trigger end-of-turn when confidence is met. Default: 400."
|
|
32
32
|
},
|
|
33
33
|
"maxTurnSilence": {
|
|
34
34
|
"type": "number",
|
|
35
|
-
"description": "Maximum silence duration (
|
|
35
|
+
"description": "Maximum silence duration (milliseconds) before forcing end-of-turn. Default: 1280."
|
|
36
36
|
},
|
|
37
37
|
"minTurnSilence": {
|
|
38
38
|
"type": "number",
|
|
39
|
-
"description": "Minimum silence duration (
|
|
39
|
+
"description": "Minimum silence duration (milliseconds) before allowing end-of-turn."
|
|
40
40
|
},
|
|
41
41
|
"keyterms": {
|
|
42
42
|
"type": "array",
|
|
@@ -141,6 +141,11 @@
|
|
|
141
141
|
"eagerEotThreshold": {
|
|
142
142
|
"type": "number",
|
|
143
143
|
"description": "Eager end-of-turn threshold for faster response."
|
|
144
|
+
},
|
|
145
|
+
"languageHints": {
|
|
146
|
+
"type": "array",
|
|
147
|
+
"items": { "type": "string" },
|
|
148
|
+
"description": "Language hints for Deepgram Flux Multilingual. BCP-47 codes (e.g. 'en', 'es', 'fr'). Biases transcription toward specified languages."
|
|
144
149
|
}
|
|
145
150
|
},
|
|
146
151
|
"additionalProperties": false
|
|
@@ -47,7 +47,9 @@
|
|
|
47
47
|
"description": "Custom vocabulary terms."
|
|
48
48
|
},
|
|
49
49
|
"languageModel": { "type": "string", "description": "Language model to use." },
|
|
50
|
-
"audioQueryAbsoluteTimeout": { "type": "number", "description": "Absolute timeout for audio queries." }
|
|
50
|
+
"audioQueryAbsoluteTimeout": { "type": "number", "description": "Absolute timeout for audio queries." },
|
|
51
|
+
"eoqThreshold": { "type": "number", "minimum": 0, "maximum": 1, "description": "End-of-query likelihood threshold (0.0-1.0) to trigger end of speech when segmentation is disabled. Default 0.8, set to 0 to disable." },
|
|
52
|
+
"vadStopThreshold": { "type": "number", "minimum": 0, "maximum": 1, "description": "VAD probability threshold to trigger end of speech when segmentation is disabled. When VAD drops below this value after speech is detected, streaming stops. Default 0.05, set to 0 to disable." }
|
|
51
53
|
},
|
|
52
54
|
"additionalProperties": false
|
|
53
55
|
}
|
|
@@ -41,9 +41,24 @@
|
|
|
41
41
|
},
|
|
42
42
|
"hints": {
|
|
43
43
|
"type": "array",
|
|
44
|
-
"items": {
|
|
45
|
-
|
|
46
|
-
|
|
44
|
+
"items": {
|
|
45
|
+
"oneOf": [
|
|
46
|
+
{ "type": "string" },
|
|
47
|
+
{
|
|
48
|
+
"type": "object",
|
|
49
|
+
"properties": {
|
|
50
|
+
"phrase": { "type": "string" },
|
|
51
|
+
"boost": { "type": "number" }
|
|
52
|
+
},
|
|
53
|
+
"required": ["phrase"]
|
|
54
|
+
}
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
"description": "An array of words or phrases that the recognizer should favor. Each item can be a plain string or an object with 'phrase' and optional 'boost' properties.",
|
|
58
|
+
"examples": [
|
|
59
|
+
["jambonz", "drachtio", "SIP", "WebRTC"],
|
|
60
|
+
[{"phrase": "jambonz", "boost": 20}, {"phrase": "drachtio", "boost": 10}]
|
|
61
|
+
]
|
|
47
62
|
},
|
|
48
63
|
"hintsBoost": {
|
|
49
64
|
"type": "number",
|
{jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/jambonz-app.schema.json
RENAMED
|
@@ -28,7 +28,7 @@
|
|
|
28
28
|
{ "$ref": "verbs/deepgram_s2s" },
|
|
29
29
|
{ "$ref": "verbs/ultravox_s2s" },
|
|
30
30
|
{ "$ref": "verbs/dialogflow" },
|
|
31
|
-
{ "$ref": "verbs/
|
|
31
|
+
{ "$ref": "verbs/agent" },
|
|
32
32
|
{ "$ref": "verbs/conference" },
|
|
33
33
|
{ "$ref": "verbs/transcribe" },
|
|
34
34
|
{ "$ref": "verbs/enqueue" },
|
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json-schema.org/draft/2020-12/schema",
|
|
3
|
-
"$id": "https://jambonz.org/schema/verbs/
|
|
3
|
+
"$id": "https://jambonz.org/schema/verbs/agent",
|
|
4
4
|
"minVersion": "10.1.0",
|
|
5
|
-
"title": "
|
|
6
|
-
"description": "Configures a complete STT → LLM → TTS
|
|
5
|
+
"title": "Agent",
|
|
6
|
+
"description": "Configures a complete voice AI agent by wiring together STT → LLM → TTS with integrated turn detection. Provides a higher-level abstraction than manually orchestrating the individual components. Optimized for building voice AI agents with proper turn-taking behavior.",
|
|
7
7
|
"type": "object",
|
|
8
8
|
"properties": {
|
|
9
9
|
"verb": {
|
|
10
|
-
"const": "
|
|
10
|
+
"const": "agent"
|
|
11
11
|
},
|
|
12
12
|
"id": {
|
|
13
13
|
"type": "string",
|
|
@@ -15,11 +15,33 @@
|
|
|
15
15
|
},
|
|
16
16
|
"stt": {
|
|
17
17
|
"$ref": "../components/recognizer",
|
|
18
|
-
"description": "Speech-to-text configuration for the
|
|
18
|
+
"description": "Speech-to-text configuration for the agent."
|
|
19
19
|
},
|
|
20
20
|
"tts": {
|
|
21
21
|
"$ref": "../components/synthesizer",
|
|
22
|
-
"description": "Text-to-speech configuration for the
|
|
22
|
+
"description": "Text-to-speech configuration for the agent."
|
|
23
|
+
},
|
|
24
|
+
"autoLockLanguage": {
|
|
25
|
+
"oneOf": [
|
|
26
|
+
{ "type": "boolean" },
|
|
27
|
+
{ "type": "string", "enum": ["always"] }
|
|
28
|
+
],
|
|
29
|
+
"description": "When using Deepgram Flux Multilingual, automatically adjust STT language hints and switch TTS voice based on detected language. Values: false (disabled), true (lock on first utterance), 'always' (continuously adapt on every turn). Default: false.",
|
|
30
|
+
"default": false
|
|
31
|
+
},
|
|
32
|
+
"languageConfig": {
|
|
33
|
+
"type": "object",
|
|
34
|
+
"description": "Per-language overrides for TTS. Keys are BCP-47 language codes. When autoLockLanguage detects a language switch, the agent uses the corresponding config.",
|
|
35
|
+
"additionalProperties": {
|
|
36
|
+
"type": "object",
|
|
37
|
+
"properties": {
|
|
38
|
+
"tts": {
|
|
39
|
+
"$ref": "../components/synthesizer",
|
|
40
|
+
"description": "TTS config override for this language. Merged with default tts."
|
|
41
|
+
}
|
|
42
|
+
},
|
|
43
|
+
"additionalProperties": false
|
|
44
|
+
}
|
|
23
45
|
},
|
|
24
46
|
"turnDetection": {
|
|
25
47
|
"oneOf": [
|
|
@@ -53,7 +75,7 @@
|
|
|
53
75
|
}
|
|
54
76
|
],
|
|
55
77
|
"default": "stt",
|
|
56
|
-
"description": "Turn detection strategy. Controls when the
|
|
78
|
+
"description": "Turn detection strategy. Controls when the agent decides the user has finished speaking. STT vendors with native turn-taking (deepgramflux, assemblyai, speechmatics) always use their built-in detection regardless of this setting."
|
|
57
79
|
},
|
|
58
80
|
"bargeIn": {
|
|
59
81
|
"type": "object",
|
|
@@ -86,16 +108,100 @@
|
|
|
86
108
|
},
|
|
87
109
|
"llm": {
|
|
88
110
|
"type": "object",
|
|
89
|
-
"description": "LLM configuration for the
|
|
90
|
-
"
|
|
111
|
+
"description": "LLM configuration for the agent.",
|
|
112
|
+
"required": ["vendor", "model"],
|
|
113
|
+
"properties": {
|
|
114
|
+
"vendor": {
|
|
115
|
+
"type": "string",
|
|
116
|
+
"enum": [
|
|
117
|
+
"openai",
|
|
118
|
+
"anthropic",
|
|
119
|
+
"google",
|
|
120
|
+
"vertex-gemini",
|
|
121
|
+
"vertex-openai",
|
|
122
|
+
"bedrock",
|
|
123
|
+
"deepseek",
|
|
124
|
+
"azure-openai",
|
|
125
|
+
"groq",
|
|
126
|
+
"huggingface"
|
|
127
|
+
],
|
|
128
|
+
"description": "LLM vendor id. Must match a `@jambonz/llm` registered adapter."
|
|
129
|
+
},
|
|
130
|
+
"model": {
|
|
131
|
+
"type": "string",
|
|
132
|
+
"description": "Vendor-specific model id (e.g. 'gpt-4o', 'claude-sonnet-4-5-20250929')."
|
|
133
|
+
},
|
|
134
|
+
"label": {
|
|
135
|
+
"type": "string",
|
|
136
|
+
"description": "Optional label to disambiguate when the account has multiple credentials for the same vendor."
|
|
137
|
+
},
|
|
138
|
+
"auth": {
|
|
139
|
+
"type": "object",
|
|
140
|
+
"description": "Optional inline credentials. When omitted, feature-server looks up credentials by (vendor, label) from the database.",
|
|
141
|
+
"properties": {
|
|
142
|
+
"apiKey": { "type": "string" }
|
|
143
|
+
},
|
|
144
|
+
"additionalProperties": true
|
|
145
|
+
},
|
|
146
|
+
"connectOptions": {
|
|
147
|
+
"type": "object",
|
|
148
|
+
"description": "SDK-level client options.",
|
|
149
|
+
"properties": {
|
|
150
|
+
"timeout": { "type": "number", "minimum": 0 },
|
|
151
|
+
"maxRetries": { "type": "integer", "minimum": 0 },
|
|
152
|
+
"endpoint": { "type": "string" },
|
|
153
|
+
"baseURL": { "type": "string" }
|
|
154
|
+
},
|
|
155
|
+
"additionalProperties": false
|
|
156
|
+
},
|
|
157
|
+
"llmOptions": {
|
|
158
|
+
"type": "object",
|
|
159
|
+
"description": "Per-call LLM configuration.",
|
|
160
|
+
"properties": {
|
|
161
|
+
"systemPrompt": {
|
|
162
|
+
"type": "string",
|
|
163
|
+
"description": "System prompt for the model. Placed vendor-appropriately (top-level for Anthropic/Bedrock, config.systemInstruction for Gemini, role:'system' for OpenAI-compatibles)."
|
|
164
|
+
},
|
|
165
|
+
"messages": {
|
|
166
|
+
"type": "array",
|
|
167
|
+
"description": "Seed conversation history. A role:'system' entry is extracted into systemPrompt internally.",
|
|
168
|
+
"items": { "$ref": "#/$defs/llmMessage" }
|
|
169
|
+
},
|
|
170
|
+
"initialMessages": {
|
|
171
|
+
"type": "array",
|
|
172
|
+
"description": "Alias of 'messages' (historical).",
|
|
173
|
+
"items": { "$ref": "#/$defs/llmMessage" }
|
|
174
|
+
},
|
|
175
|
+
"maxTokens": {
|
|
176
|
+
"type": "integer",
|
|
177
|
+
"minimum": 1,
|
|
178
|
+
"description": "Maximum tokens the model may generate per turn."
|
|
179
|
+
},
|
|
180
|
+
"temperature": {
|
|
181
|
+
"type": "number",
|
|
182
|
+
"minimum": 0,
|
|
183
|
+
"description": "Sampling temperature."
|
|
184
|
+
},
|
|
185
|
+
"tools": {
|
|
186
|
+
"type": "array",
|
|
187
|
+
"description": "Tool / function definitions available to the model. The MCP-flat shape `{name, description, parameters}` is canonical; the OpenAI-wrapped form `{type:'function', function:{...}}` is also accepted.",
|
|
188
|
+
"items": {
|
|
189
|
+
"type": "object"
|
|
190
|
+
}
|
|
191
|
+
}
|
|
192
|
+
},
|
|
193
|
+
"additionalProperties": false
|
|
194
|
+
}
|
|
195
|
+
},
|
|
196
|
+
"additionalProperties": false
|
|
91
197
|
},
|
|
92
198
|
"actionHook": {
|
|
93
199
|
"$ref": "../components/actionHook",
|
|
94
|
-
"description": "A webhook invoked when the
|
|
200
|
+
"description": "A webhook invoked when the agent ends."
|
|
95
201
|
},
|
|
96
202
|
"eventHook": {
|
|
97
203
|
"$ref": "../components/actionHook",
|
|
98
|
-
"description": "A webhook invoked for
|
|
204
|
+
"description": "A webhook invoked for agent events. Receives event types: 'user_transcript' (user speech recognized), 'llm_response' (assistant reply), 'user_interruption' (barge-in detected), and 'turn_end' (end-of-turn summary with transcript, response, and latency metrics)."
|
|
99
205
|
},
|
|
100
206
|
"toolHook": {
|
|
101
207
|
"$ref": "../components/actionHook",
|
|
@@ -171,15 +277,30 @@
|
|
|
171
277
|
},
|
|
172
278
|
"required": ["url"]
|
|
173
279
|
},
|
|
174
|
-
"description": "External MCP servers that provide tools to the LLM. The
|
|
280
|
+
"description": "External MCP servers that provide tools to the LLM. The agent connects at startup via SSE, discovers available tools, and makes them callable by the LLM."
|
|
175
281
|
}
|
|
176
282
|
},
|
|
177
283
|
"required": [
|
|
178
284
|
"llm"
|
|
179
285
|
],
|
|
286
|
+
"$defs": {
|
|
287
|
+
"llmMessage": {
|
|
288
|
+
"type": "object",
|
|
289
|
+
"description": "A conversation-history message. The library normalizes content to a string; adapters may carry vendor-native shapes internally.",
|
|
290
|
+
"required": ["role", "content"],
|
|
291
|
+
"properties": {
|
|
292
|
+
"role": {
|
|
293
|
+
"type": "string",
|
|
294
|
+
"enum": ["system", "user", "assistant", "tool"]
|
|
295
|
+
},
|
|
296
|
+
"content": {}
|
|
297
|
+
},
|
|
298
|
+
"additionalProperties": true
|
|
299
|
+
}
|
|
300
|
+
},
|
|
180
301
|
"examples": [
|
|
181
302
|
{
|
|
182
|
-
"verb": "
|
|
303
|
+
"verb": "agent",
|
|
183
304
|
"stt": {
|
|
184
305
|
"vendor": "deepgram",
|
|
185
306
|
"language": "en-US"
|
|
@@ -201,10 +322,10 @@
|
|
|
201
322
|
}
|
|
202
323
|
},
|
|
203
324
|
"turnDetection": "stt",
|
|
204
|
-
"actionHook": "/
|
|
325
|
+
"actionHook": "/agent-complete"
|
|
205
326
|
},
|
|
206
327
|
{
|
|
207
|
-
"verb": "
|
|
328
|
+
"verb": "agent",
|
|
208
329
|
"stt": {
|
|
209
330
|
"vendor": "deepgram",
|
|
210
331
|
"language": "en-US"
|
|
@@ -234,7 +355,7 @@
|
|
|
234
355
|
"minSpeechDuration": 0.3,
|
|
235
356
|
"sticky": false
|
|
236
357
|
},
|
|
237
|
-
"actionHook": "/
|
|
358
|
+
"actionHook": "/agent-complete"
|
|
238
359
|
}
|
|
239
360
|
]
|
|
240
361
|
}
|
{jambonz_python_sdk-0.2.0 → jambonz_python_sdk-0.3.1}/src/jambonz_sdk/schema/verbs/dub.schema.json
RENAMED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
"$id": "https://jambonz.org/schema/verbs/dub",
|
|
4
4
|
"minVersion": "0.9.6",
|
|
5
5
|
"title": "Dub",
|
|
6
|
-
"description": "Manages audio dubbing tracks on a call. Allows adding, removing, and controlling auxiliary audio tracks that are mixed into the call audio. Used for background music, coaching whispers, or injecting audio from external sources.",
|
|
6
|
+
"description": "Manages audio dubbing tracks on a call. Allows adding, removing, and controlling auxiliary audio tracks that are mixed into the call audio. Used for background music, coaching whispers, or injecting audio from external sources.\n\n**Track Routing:** Tracks are heard by the party on whose call leg they are created. A dub verb in the main verb stack (A-leg) creates tracks heard by the caller. A dub verb nested in the dial verb's `dub` array creates tracks heard by the callee. When using injectCommand to play/say on a track from a different call leg, pass the target call's `call_sid` as the third argument to `session.injectCommand()` to route the command to the correct leg.",
|
|
7
7
|
"type": "object",
|
|
8
8
|
"properties": {
|
|
9
9
|
"verb": {
|
|
@@ -37,7 +37,8 @@
|
|
|
37
37
|
},
|
|
38
38
|
"channel": {
|
|
39
39
|
"type": "number",
|
|
40
|
-
"
|
|
40
|
+
"enum": [1, 2],
|
|
41
|
+
"description": "Specific audio channel to transcribe. Channel 1 = near-end (local party's audio, i.e. caller on A-leg or callee on B-leg). Channel 2 = far-end (remote party's audio). When transcribe is nested in the dial verb, omitting channel captures both legs mixed; specifying channel: 2 isolates the B-leg's inbound audio."
|
|
41
42
|
}
|
|
42
43
|
},
|
|
43
44
|
"examples": [
|
|
@@ -34,6 +34,7 @@ from jambonz_sdk.types.session import (
|
|
|
34
34
|
WsMessageType,
|
|
35
35
|
)
|
|
36
36
|
from jambonz_sdk.types.verbs import (
|
|
37
|
+
AgentVerb,
|
|
37
38
|
AlertVerb,
|
|
38
39
|
AnswerVerb,
|
|
39
40
|
AnyVerb,
|
|
@@ -56,7 +57,6 @@ from jambonz_sdk.types.verbs import (
|
|
|
56
57
|
MessageVerb,
|
|
57
58
|
OpenaiS2sVerb,
|
|
58
59
|
PauseVerb,
|
|
59
|
-
PipelineVerb,
|
|
60
60
|
PlayVerb,
|
|
61
61
|
RedirectVerb,
|
|
62
62
|
S2sVerb,
|
|
@@ -92,6 +92,7 @@ __all__ = [
|
|
|
92
92
|
"TurnTaking",
|
|
93
93
|
"Vad",
|
|
94
94
|
# Verbs
|
|
95
|
+
"AgentVerb",
|
|
95
96
|
"AlertVerb",
|
|
96
97
|
"AnswerVerb",
|
|
97
98
|
"AnyVerb",
|
|
@@ -114,7 +115,6 @@ __all__ = [
|
|
|
114
115
|
"MessageVerb",
|
|
115
116
|
"OpenaiS2sVerb",
|
|
116
117
|
"PauseVerb",
|
|
117
|
-
"PipelineVerb",
|
|
118
118
|
"PlayVerb",
|
|
119
119
|
"RedirectVerb",
|
|
120
120
|
"S2sVerb",
|
|
@@ -514,10 +514,10 @@ class DialogflowVerb(TypedDict, total=False):
|
|
|
514
514
|
tts: Synthesizer
|
|
515
515
|
|
|
516
516
|
|
|
517
|
-
class
|
|
518
|
-
"""Integrated STT -> LLM -> TTS voice AI
|
|
517
|
+
class AgentVerb(TypedDict, total=False):
|
|
518
|
+
"""Integrated STT -> LLM -> TTS voice AI agent."""
|
|
519
519
|
|
|
520
|
-
verb: str # "
|
|
520
|
+
verb: str # "agent"
|
|
521
521
|
id: str
|
|
522
522
|
stt: Recognizer
|
|
523
523
|
tts: Synthesizer
|
|
@@ -568,5 +568,5 @@ AnyVerb = Union[
|
|
|
568
568
|
ElevenlabsS2sVerb,
|
|
569
569
|
UltravoxS2sVerb,
|
|
570
570
|
DialogflowVerb,
|
|
571
|
-
|
|
571
|
+
AgentVerb,
|
|
572
572
|
]
|