jambonz-python-sdk 0.2.0__py3-none-any.whl

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.
Files changed (119) hide show
  1. jambonz_python_sdk-0.2.0.dist-info/METADATA +179 -0
  2. jambonz_python_sdk-0.2.0.dist-info/RECORD +119 -0
  3. jambonz_python_sdk-0.2.0.dist-info/WHEEL +4 -0
  4. jambonz_sdk/__init__.py +52 -0
  5. jambonz_sdk/_signature.py +73 -0
  6. jambonz_sdk/client/__init__.py +15 -0
  7. jambonz_sdk/client/api.py +241 -0
  8. jambonz_sdk/schema/callbacks/amd.schema.json +50 -0
  9. jambonz_sdk/schema/callbacks/base.schema.json +29 -0
  10. jambonz_sdk/schema/callbacks/call-status.schema.json +22 -0
  11. jambonz_sdk/schema/callbacks/conference-status.schema.json +24 -0
  12. jambonz_sdk/schema/callbacks/conference-wait.schema.json +11 -0
  13. jambonz_sdk/schema/callbacks/conference.schema.json +11 -0
  14. jambonz_sdk/schema/callbacks/dequeue.schema.json +19 -0
  15. jambonz_sdk/schema/callbacks/dial-dtmf.schema.json +18 -0
  16. jambonz_sdk/schema/callbacks/dial-hold.schema.json +22 -0
  17. jambonz_sdk/schema/callbacks/dial-refer.schema.json +28 -0
  18. jambonz_sdk/schema/callbacks/dial.schema.json +31 -0
  19. jambonz_sdk/schema/callbacks/enqueue-wait.schema.json +17 -0
  20. jambonz_sdk/schema/callbacks/enqueue.schema.json +27 -0
  21. jambonz_sdk/schema/callbacks/gather-partial.schema.json +54 -0
  22. jambonz_sdk/schema/callbacks/gather.schema.json +60 -0
  23. jambonz_sdk/schema/callbacks/listen.schema.json +21 -0
  24. jambonz_sdk/schema/callbacks/llm.schema.json +30 -0
  25. jambonz_sdk/schema/callbacks/message.schema.json +35 -0
  26. jambonz_sdk/schema/callbacks/pipeline-turn.schema.json +109 -0
  27. jambonz_sdk/schema/callbacks/play.schema.json +36 -0
  28. jambonz_sdk/schema/callbacks/session-new.schema.json +143 -0
  29. jambonz_sdk/schema/callbacks/session-reconnect.schema.json +9 -0
  30. jambonz_sdk/schema/callbacks/session-redirect.schema.json +38 -0
  31. jambonz_sdk/schema/callbacks/sip-refer-event.schema.json +20 -0
  32. jambonz_sdk/schema/callbacks/sip-refer.schema.json +22 -0
  33. jambonz_sdk/schema/callbacks/sip-request.schema.json +27 -0
  34. jambonz_sdk/schema/callbacks/transcribe-translation.schema.json +24 -0
  35. jambonz_sdk/schema/callbacks/transcribe.schema.json +46 -0
  36. jambonz_sdk/schema/callbacks/tts-streaming-event.schema.json +77 -0
  37. jambonz_sdk/schema/callbacks/verb-status.schema.json +57 -0
  38. jambonz_sdk/schema/components/actionHook.schema.json +36 -0
  39. jambonz_sdk/schema/components/actionHookDelayAction.schema.json +37 -0
  40. jambonz_sdk/schema/components/amd.schema.json +68 -0
  41. jambonz_sdk/schema/components/auth.schema.json +18 -0
  42. jambonz_sdk/schema/components/bidirectionalAudio.schema.json +22 -0
  43. jambonz_sdk/schema/components/fillerNoise.schema.json +25 -0
  44. jambonz_sdk/schema/components/llm-base.schema.json +94 -0
  45. jambonz_sdk/schema/components/recognizer-assemblyAiOptions.schema.json +66 -0
  46. jambonz_sdk/schema/components/recognizer-awsOptions.schema.json +52 -0
  47. jambonz_sdk/schema/components/recognizer-azureOptions.schema.json +32 -0
  48. jambonz_sdk/schema/components/recognizer-cobaltOptions.schema.json +34 -0
  49. jambonz_sdk/schema/components/recognizer-customOptions.schema.json +27 -0
  50. jambonz_sdk/schema/components/recognizer-deepgramOptions.schema.json +147 -0
  51. jambonz_sdk/schema/components/recognizer-elevenlabsOptions.schema.json +39 -0
  52. jambonz_sdk/schema/components/recognizer-gladiaOptions.schema.json +8 -0
  53. jambonz_sdk/schema/components/recognizer-googleOptions.schema.json +35 -0
  54. jambonz_sdk/schema/components/recognizer-houndifyOptions.schema.json +53 -0
  55. jambonz_sdk/schema/components/recognizer-ibmOptions.schema.json +54 -0
  56. jambonz_sdk/schema/components/recognizer-nuanceOptions.schema.json +150 -0
  57. jambonz_sdk/schema/components/recognizer-nvidiaOptions.schema.json +39 -0
  58. jambonz_sdk/schema/components/recognizer-openaiOptions.schema.json +59 -0
  59. jambonz_sdk/schema/components/recognizer-sonioxOptions.schema.json +46 -0
  60. jambonz_sdk/schema/components/recognizer-speechmaticsOptions.schema.json +100 -0
  61. jambonz_sdk/schema/components/recognizer-verbioOptions.schema.json +46 -0
  62. jambonz_sdk/schema/components/recognizer.schema.json +216 -0
  63. jambonz_sdk/schema/components/synthesizer.schema.json +82 -0
  64. jambonz_sdk/schema/components/target.schema.json +105 -0
  65. jambonz_sdk/schema/components/vad.schema.json +48 -0
  66. jambonz_sdk/schema/jambonz-app.schema.json +113 -0
  67. jambonz_sdk/schema/verbs/alert.schema.json +34 -0
  68. jambonz_sdk/schema/verbs/answer.schema.json +22 -0
  69. jambonz_sdk/schema/verbs/conference.schema.json +107 -0
  70. jambonz_sdk/schema/verbs/config.schema.json +221 -0
  71. jambonz_sdk/schema/verbs/deepgram_s2s.schema.json +81 -0
  72. jambonz_sdk/schema/verbs/dequeue.schema.json +51 -0
  73. jambonz_sdk/schema/verbs/dial.schema.json +200 -0
  74. jambonz_sdk/schema/verbs/dialogflow.schema.json +148 -0
  75. jambonz_sdk/schema/verbs/dtmf.schema.json +49 -0
  76. jambonz_sdk/schema/verbs/dub.schema.json +103 -0
  77. jambonz_sdk/schema/verbs/elevenlabs_s2s.schema.json +81 -0
  78. jambonz_sdk/schema/verbs/enqueue.schema.json +53 -0
  79. jambonz_sdk/schema/verbs/gather.schema.json +190 -0
  80. jambonz_sdk/schema/verbs/google_s2s.schema.json +42 -0
  81. jambonz_sdk/schema/verbs/hangup.schema.json +36 -0
  82. jambonz_sdk/schema/verbs/leave.schema.json +22 -0
  83. jambonz_sdk/schema/verbs/listen.schema.json +127 -0
  84. jambonz_sdk/schema/verbs/llm.schema.json +44 -0
  85. jambonz_sdk/schema/verbs/message.schema.json +82 -0
  86. jambonz_sdk/schema/verbs/openai_s2s.schema.json +42 -0
  87. jambonz_sdk/schema/verbs/pause.schema.json +36 -0
  88. jambonz_sdk/schema/verbs/pipeline.schema.json +240 -0
  89. jambonz_sdk/schema/verbs/play.schema.json +96 -0
  90. jambonz_sdk/schema/verbs/redirect.schema.json +34 -0
  91. jambonz_sdk/schema/verbs/rest_dial.schema.json +113 -0
  92. jambonz_sdk/schema/verbs/s2s.schema.json +39 -0
  93. jambonz_sdk/schema/verbs/say.schema.json +107 -0
  94. jambonz_sdk/schema/verbs/sip-decline.schema.json +58 -0
  95. jambonz_sdk/schema/verbs/sip-refer.schema.json +58 -0
  96. jambonz_sdk/schema/verbs/sip-request.schema.json +54 -0
  97. jambonz_sdk/schema/verbs/stream.schema.json +103 -0
  98. jambonz_sdk/schema/verbs/tag.schema.json +41 -0
  99. jambonz_sdk/schema/verbs/transcribe.schema.json +57 -0
  100. jambonz_sdk/schema/verbs/ultravox_s2s.schema.json +41 -0
  101. jambonz_sdk/types/__init__.py +139 -0
  102. jambonz_sdk/types/components.py +250 -0
  103. jambonz_sdk/types/rest.py +59 -0
  104. jambonz_sdk/types/session.py +55 -0
  105. jambonz_sdk/types/verbs.py +572 -0
  106. jambonz_sdk/validator.py +107 -0
  107. jambonz_sdk/verb_builder.py +316 -0
  108. jambonz_sdk/verb_builder.pyi +1133 -0
  109. jambonz_sdk/verb_registry.py +102 -0
  110. jambonz_sdk/webhook/__init__.py +10 -0
  111. jambonz_sdk/webhook/middleware.py +63 -0
  112. jambonz_sdk/webhook/response.py +43 -0
  113. jambonz_sdk/websocket/__init__.py +15 -0
  114. jambonz_sdk/websocket/audio_client.py +11 -0
  115. jambonz_sdk/websocket/audio_stream.py +151 -0
  116. jambonz_sdk/websocket/client.py +165 -0
  117. jambonz_sdk/websocket/endpoint.py +193 -0
  118. jambonz_sdk/websocket/router.py +87 -0
  119. jambonz_sdk/websocket/session.py +259 -0
@@ -0,0 +1,1133 @@
1
+ """Auto-generated type stubs for VerbBuilder.
2
+
3
+ DO NOT EDIT — regenerate with: python scripts/generate_stubs.py
4
+ """
5
+
6
+ from typing import Any, Self
7
+
8
+ from jambonz_sdk.types.verbs import AnyVerb
9
+
10
+ class VerbBuilder:
11
+ _verbs: list[AnyVerb]
12
+
13
+ def __init__(self) -> None: ...
14
+ def to_list(self) -> list[AnyVerb]: ...
15
+
16
+ def say(
17
+ self,
18
+ id: str = ...,
19
+ text: str | list[Any] = ...,
20
+ instructions: str = ...,
21
+ stream: bool = ...,
22
+ loop: int | float | str = ...,
23
+ synthesizer: dict[str, Any] = ...,
24
+ earlyMedia: bool = ...,
25
+ disableTtsCache: bool = ...,
26
+ closeStreamOnEmpty: bool = ...,
27
+ **kwargs: Any,
28
+ ) -> Self:
29
+ """Speak text using TTS.
30
+
31
+ Args:
32
+ id: str
33
+ text: str | list[Any]
34
+ instructions: str
35
+ stream: bool
36
+ loop: int | float | str
37
+ synthesizer: dict[str, Any]
38
+ earlyMedia: bool
39
+ disableTtsCache: bool
40
+ closeStreamOnEmpty: bool
41
+
42
+ Returns:
43
+ self for chaining.
44
+ """
45
+ ...
46
+
47
+ def play(
48
+ self,
49
+ id: str = ...,
50
+ url: str | list[Any] = ...,
51
+ loop: int | float | str = ...,
52
+ earlyMedia: bool = ...,
53
+ seekOffset: int | float | str = ...,
54
+ timeoutSecs: int | float | str = ...,
55
+ actionHook: dict[str, Any] | str = ...,
56
+ **kwargs: Any,
57
+ ) -> Self:
58
+ """Play an audio file from a URL.
59
+
60
+ Required: url
61
+
62
+ Args:
63
+ id: str
64
+ url: str | list[Any] (required)
65
+ loop: int | float | str
66
+ earlyMedia: bool
67
+ seekOffset: int | float | str
68
+ timeoutSecs: int | float | str
69
+ actionHook: dict[str, Any] | str
70
+
71
+ Returns:
72
+ self for chaining.
73
+ """
74
+ ...
75
+
76
+ def gather(
77
+ self,
78
+ id: str = ...,
79
+ actionHook: dict[str, Any] | str = ...,
80
+ finishOnKey: str = ...,
81
+ input: list[Any] = ...,
82
+ numDigits: int | float = ...,
83
+ minDigits: int | float = ...,
84
+ maxDigits: int | float = ...,
85
+ interDigitTimeout: int | float = ...,
86
+ partialResultHook: dict[str, Any] | str = ...,
87
+ speechTimeout: int | float = ...,
88
+ listenDuringPrompt: bool = ...,
89
+ dtmfBargein: bool = ...,
90
+ bargein: bool = ...,
91
+ minBargeinWordCount: int | float = ...,
92
+ timeout: int | float = ...,
93
+ recognizer: dict[str, Any] = ...,
94
+ play: dict[str, Any] = ...,
95
+ say: dict[str, Any] = ...,
96
+ fillerNoise: dict[str, Any] = ...,
97
+ actionHookDelayAction: dict[str, Any] = ...,
98
+ **kwargs: Any,
99
+ ) -> Self:
100
+ """Collect speech (STT) and/or DTMF input.
101
+
102
+ Args:
103
+ id: str
104
+ actionHook: dict[str, Any] | str
105
+ finishOnKey: str
106
+ input: list[Any]
107
+ numDigits: int | float
108
+ minDigits: int | float
109
+ maxDigits: int | float
110
+ interDigitTimeout: int | float
111
+ partialResultHook: dict[str, Any] | str
112
+ speechTimeout: int | float
113
+ listenDuringPrompt: bool
114
+ dtmfBargein: bool
115
+ bargein: bool
116
+ minBargeinWordCount: int | float
117
+ timeout: int | float
118
+ recognizer: dict[str, Any]
119
+ play: dict[str, Any]
120
+ say: dict[str, Any]
121
+ fillerNoise: dict[str, Any]
122
+ actionHookDelayAction: dict[str, Any]
123
+
124
+ Returns:
125
+ self for chaining.
126
+ """
127
+ ...
128
+
129
+ def openai_s2s(
130
+ self,
131
+ id: str = ...,
132
+ vendor: str = ...,
133
+ model: str = ...,
134
+ auth: dict[str, Any] = ...,
135
+ connectOptions: dict[str, Any] = ...,
136
+ mcpServers: list[Any] = ...,
137
+ actionHook: dict[str, Any] | str = ...,
138
+ eventHook: dict[str, Any] | str = ...,
139
+ toolHook: dict[str, Any] | str = ...,
140
+ events: list[Any] = ...,
141
+ llmOptions: dict[str, Any] = ...,
142
+ **kwargs: Any,
143
+ ) -> Self:
144
+ """Connect caller to OpenAI for real-time voice conversation.
145
+
146
+ Required: llmOptions, vendor
147
+
148
+ Args:
149
+ id: str
150
+ vendor: str (required)
151
+ model: str
152
+ auth: dict[str, Any]
153
+ connectOptions: dict[str, Any]
154
+ mcpServers: list[Any]
155
+ actionHook: dict[str, Any] | str
156
+ eventHook: dict[str, Any] | str
157
+ toolHook: dict[str, Any] | str
158
+ events: list[Any]
159
+ llmOptions: dict[str, Any] (required)
160
+
161
+ Returns:
162
+ self for chaining.
163
+ """
164
+ ...
165
+
166
+ def google_s2s(
167
+ self,
168
+ id: str = ...,
169
+ vendor: str = ...,
170
+ model: str = ...,
171
+ auth: dict[str, Any] = ...,
172
+ connectOptions: dict[str, Any] = ...,
173
+ mcpServers: list[Any] = ...,
174
+ actionHook: dict[str, Any] | str = ...,
175
+ eventHook: dict[str, Any] | str = ...,
176
+ toolHook: dict[str, Any] | str = ...,
177
+ events: list[Any] = ...,
178
+ llmOptions: dict[str, Any] = ...,
179
+ **kwargs: Any,
180
+ ) -> Self:
181
+ """Connect caller to Google for real-time voice conversation.
182
+
183
+ Required: llmOptions, vendor
184
+
185
+ Args:
186
+ id: str
187
+ vendor: str (required)
188
+ model: str
189
+ auth: dict[str, Any]
190
+ connectOptions: dict[str, Any]
191
+ mcpServers: list[Any]
192
+ actionHook: dict[str, Any] | str
193
+ eventHook: dict[str, Any] | str
194
+ toolHook: dict[str, Any] | str
195
+ events: list[Any]
196
+ llmOptions: dict[str, Any] (required)
197
+
198
+ Returns:
199
+ self for chaining.
200
+ """
201
+ ...
202
+
203
+ def deepgram_s2s(
204
+ self,
205
+ id: str = ...,
206
+ vendor: str = ...,
207
+ model: str = ...,
208
+ auth: dict[str, Any] = ...,
209
+ connectOptions: dict[str, Any] = ...,
210
+ mcpServers: list[Any] = ...,
211
+ actionHook: dict[str, Any] | str = ...,
212
+ eventHook: dict[str, Any] | str = ...,
213
+ toolHook: dict[str, Any] | str = ...,
214
+ events: list[Any] = ...,
215
+ llmOptions: dict[str, Any] = ...,
216
+ **kwargs: Any,
217
+ ) -> Self:
218
+ """Connect caller to Deepgram for real-time voice conversation.
219
+
220
+ Required: llmOptions, vendor
221
+
222
+ Args:
223
+ id: str
224
+ vendor: str (required)
225
+ model: str
226
+ auth: dict[str, Any]
227
+ connectOptions: dict[str, Any]
228
+ mcpServers: list[Any]
229
+ actionHook: dict[str, Any] | str
230
+ eventHook: dict[str, Any] | str
231
+ toolHook: dict[str, Any] | str
232
+ events: list[Any]
233
+ llmOptions: dict[str, Any] (required)
234
+
235
+ Returns:
236
+ self for chaining.
237
+ """
238
+ ...
239
+
240
+ def elevenlabs_s2s(
241
+ self,
242
+ id: str = ...,
243
+ vendor: str = ...,
244
+ model: str = ...,
245
+ auth: dict[str, Any] = ...,
246
+ connectOptions: dict[str, Any] = ...,
247
+ mcpServers: list[Any] = ...,
248
+ actionHook: dict[str, Any] | str = ...,
249
+ eventHook: dict[str, Any] | str = ...,
250
+ toolHook: dict[str, Any] | str = ...,
251
+ events: list[Any] = ...,
252
+ llmOptions: dict[str, Any] = ...,
253
+ **kwargs: Any,
254
+ ) -> Self:
255
+ """Connect caller to ElevenLabs Conversational AI agent.
256
+
257
+ Required: llmOptions, vendor
258
+
259
+ Args:
260
+ id: str
261
+ vendor: str (required)
262
+ model: str
263
+ auth: dict[str, Any]
264
+ connectOptions: dict[str, Any]
265
+ mcpServers: list[Any]
266
+ actionHook: dict[str, Any] | str
267
+ eventHook: dict[str, Any] | str
268
+ toolHook: dict[str, Any] | str
269
+ events: list[Any]
270
+ llmOptions: dict[str, Any] (required)
271
+
272
+ Returns:
273
+ self for chaining.
274
+ """
275
+ ...
276
+
277
+ def ultravox_s2s(
278
+ self,
279
+ id: str = ...,
280
+ vendor: str = ...,
281
+ model: str = ...,
282
+ auth: dict[str, Any] = ...,
283
+ connectOptions: dict[str, Any] = ...,
284
+ mcpServers: list[Any] = ...,
285
+ actionHook: dict[str, Any] | str = ...,
286
+ eventHook: dict[str, Any] | str = ...,
287
+ toolHook: dict[str, Any] | str = ...,
288
+ events: list[Any] = ...,
289
+ llmOptions: dict[str, Any] = ...,
290
+ **kwargs: Any,
291
+ ) -> Self:
292
+ """Connect caller to Ultravox for real-time voice conversation.
293
+
294
+ Required: llmOptions, vendor
295
+
296
+ Args:
297
+ id: str
298
+ vendor: str (required)
299
+ model: str
300
+ auth: dict[str, Any]
301
+ connectOptions: dict[str, Any]
302
+ mcpServers: list[Any]
303
+ actionHook: dict[str, Any] | str
304
+ eventHook: dict[str, Any] | str
305
+ toolHook: dict[str, Any] | str
306
+ events: list[Any]
307
+ llmOptions: dict[str, Any] (required)
308
+
309
+ Returns:
310
+ self for chaining.
311
+ """
312
+ ...
313
+
314
+ def s2s(
315
+ self,
316
+ id: str = ...,
317
+ vendor: str = ...,
318
+ model: str = ...,
319
+ auth: dict[str, Any] = ...,
320
+ connectOptions: dict[str, Any] = ...,
321
+ mcpServers: list[Any] = ...,
322
+ actionHook: dict[str, Any] | str = ...,
323
+ eventHook: dict[str, Any] | str = ...,
324
+ toolHook: dict[str, Any] | str = ...,
325
+ events: list[Any] = ...,
326
+ llmOptions: dict[str, Any] = ...,
327
+ **kwargs: Any,
328
+ ) -> Self:
329
+ """Generic S2S verb (use when vendor is determined at runtime).
330
+
331
+ Required: llmOptions, vendor
332
+
333
+ Args:
334
+ id: str
335
+ vendor: str (required)
336
+ model: str
337
+ auth: dict[str, Any]
338
+ connectOptions: dict[str, Any]
339
+ mcpServers: list[Any]
340
+ actionHook: dict[str, Any] | str
341
+ eventHook: dict[str, Any] | str
342
+ toolHook: dict[str, Any] | str
343
+ events: list[Any]
344
+ llmOptions: dict[str, Any] (required)
345
+
346
+ Returns:
347
+ self for chaining.
348
+ """
349
+ ...
350
+
351
+ def llm(
352
+ self,
353
+ id: str = ...,
354
+ vendor: str = ...,
355
+ model: str = ...,
356
+ auth: dict[str, Any] = ...,
357
+ connectOptions: dict[str, Any] = ...,
358
+ mcpServers: list[Any] = ...,
359
+ actionHook: dict[str, Any] | str = ...,
360
+ eventHook: dict[str, Any] | str = ...,
361
+ toolHook: dict[str, Any] | str = ...,
362
+ events: list[Any] = ...,
363
+ llmOptions: dict[str, Any] = ...,
364
+ **kwargs: Any,
365
+ ) -> Self:
366
+ """Legacy LLM verb (prefer s2s or vendor-specific shortcuts).
367
+
368
+ Required: llmOptions, vendor
369
+
370
+ Args:
371
+ id: str
372
+ vendor: str (required)
373
+ model: str
374
+ auth: dict[str, Any]
375
+ connectOptions: dict[str, Any]
376
+ mcpServers: list[Any]
377
+ actionHook: dict[str, Any] | str
378
+ eventHook: dict[str, Any] | str
379
+ toolHook: dict[str, Any] | str
380
+ events: list[Any]
381
+ llmOptions: dict[str, Any] (required)
382
+
383
+ Returns:
384
+ self for chaining.
385
+ """
386
+ ...
387
+
388
+ def dialogflow(
389
+ self,
390
+ id: str = ...,
391
+ credentials: dict[str, Any] | str = ...,
392
+ project: str = ...,
393
+ agent: str = ...,
394
+ environment: str = ...,
395
+ region: str = ...,
396
+ model: str = ...,
397
+ lang: str = ...,
398
+ actionHook: dict[str, Any] | str = ...,
399
+ eventHook: dict[str, Any] | str = ...,
400
+ events: list[Any] = ...,
401
+ welcomeEvent: str = ...,
402
+ welcomeEventParams: dict[str, Any] = ...,
403
+ noInputTimeout: int | float = ...,
404
+ noInputEvent: str = ...,
405
+ passDtmfAsTextInput: bool = ...,
406
+ thinkingMusic: str = ...,
407
+ tts: dict[str, Any] = ...,
408
+ bargein: bool = ...,
409
+ queryInput: dict[str, Any] = ...,
410
+ **kwargs: Any,
411
+ ) -> Self:
412
+ """Connect caller to Google Dialogflow agent.
413
+
414
+ Required: credentials, lang, project
415
+
416
+ Args:
417
+ id: str
418
+ credentials: dict[str, Any] | str (required)
419
+ project: str (required)
420
+ agent: str
421
+ environment: str
422
+ region: str
423
+ model: str
424
+ lang: str (required)
425
+ actionHook: dict[str, Any] | str
426
+ eventHook: dict[str, Any] | str
427
+ events: list[Any]
428
+ welcomeEvent: str
429
+ welcomeEventParams: dict[str, Any]
430
+ noInputTimeout: int | float
431
+ noInputEvent: str
432
+ passDtmfAsTextInput: bool
433
+ thinkingMusic: str
434
+ tts: dict[str, Any]
435
+ bargein: bool
436
+ queryInput: dict[str, Any]
437
+
438
+ Returns:
439
+ self for chaining.
440
+ """
441
+ ...
442
+
443
+ def pipeline(
444
+ self,
445
+ id: str = ...,
446
+ stt: dict[str, Any] = ...,
447
+ tts: dict[str, Any] = ...,
448
+ llm: dict[str, Any] = ...,
449
+ turnDetection: str | dict[str, Any] = ...,
450
+ bargeIn: dict[str, Any] = ...,
451
+ actionHook: dict[str, Any] | str = ...,
452
+ eventHook: dict[str, Any] | str = ...,
453
+ toolHook: dict[str, Any] | str = ...,
454
+ greeting: bool = ...,
455
+ earlyGeneration: bool = ...,
456
+ noiseIsolation: str | dict[str, Any] = ...,
457
+ mcpServers: list[Any] = ...,
458
+ noResponseTimeout: int | float = ...,
459
+ **kwargs: Any,
460
+ ) -> Self:
461
+ """Integrated STT → LLM → TTS voice AI pipeline.
462
+
463
+ Required: llm
464
+
465
+ Args:
466
+ id: str
467
+ stt: dict[str, Any]
468
+ tts: dict[str, Any]
469
+ llm: dict[str, Any] (required)
470
+ turnDetection: str | dict[str, Any]
471
+ bargeIn: dict[str, Any]
472
+ actionHook: dict[str, Any] | str
473
+ eventHook: dict[str, Any] | str
474
+ toolHook: dict[str, Any] | str
475
+ greeting: bool
476
+ earlyGeneration: bool
477
+ noiseIsolation: str | dict[str, Any]
478
+ mcpServers: list[Any]
479
+ noResponseTimeout: int | float
480
+
481
+ Returns:
482
+ self for chaining.
483
+ """
484
+ ...
485
+
486
+ def listen(
487
+ self,
488
+ id: str = ...,
489
+ actionHook: dict[str, Any] | str = ...,
490
+ auth: dict[str, Any] = ...,
491
+ finishOnKey: str = ...,
492
+ maxLength: int | float = ...,
493
+ metadata: dict[str, Any] = ...,
494
+ mixType: str = ...,
495
+ passDtmf: bool = ...,
496
+ playBeep: bool = ...,
497
+ disableBidirectionalAudio: bool = ...,
498
+ bidirectionalAudio: dict[str, Any] = ...,
499
+ sampleRate: int | float = ...,
500
+ timeout: int | float = ...,
501
+ transcribe: dict[str, Any] = ...,
502
+ url: str = ...,
503
+ wsAuth: dict[str, Any] = ...,
504
+ earlyMedia: bool = ...,
505
+ channel: int | float = ...,
506
+ **kwargs: Any,
507
+ ) -> Self:
508
+ """Stream real-time audio to a websocket endpoint.
509
+
510
+ Required: url
511
+
512
+ Args:
513
+ id: str
514
+ actionHook: dict[str, Any] | str
515
+ auth: dict[str, Any]
516
+ finishOnKey: str
517
+ maxLength: int | float
518
+ metadata: dict[str, Any]
519
+ mixType: str
520
+ passDtmf: bool
521
+ playBeep: bool
522
+ disableBidirectionalAudio: bool
523
+ bidirectionalAudio: dict[str, Any]
524
+ sampleRate: int | float
525
+ timeout: int | float
526
+ transcribe: dict[str, Any]
527
+ url: str (required)
528
+ wsAuth: dict[str, Any]
529
+ earlyMedia: bool
530
+ channel: int | float
531
+
532
+ Returns:
533
+ self for chaining.
534
+ """
535
+ ...
536
+
537
+ def stream(
538
+ self,
539
+ id: str = ...,
540
+ actionHook: dict[str, Any] | str = ...,
541
+ auth: dict[str, Any] = ...,
542
+ finishOnKey: str = ...,
543
+ maxLength: int | float = ...,
544
+ metadata: dict[str, Any] = ...,
545
+ mixType: str = ...,
546
+ passDtmf: bool = ...,
547
+ playBeep: bool = ...,
548
+ disableBidirectionalAudio: bool = ...,
549
+ bidirectionalAudio: dict[str, Any] = ...,
550
+ sampleRate: int | float = ...,
551
+ timeout: int | float = ...,
552
+ transcribe: dict[str, Any] = ...,
553
+ url: str = ...,
554
+ wsAuth: dict[str, Any] = ...,
555
+ earlyMedia: bool = ...,
556
+ channel: int | float = ...,
557
+ **kwargs: Any,
558
+ ) -> Self:
559
+ """Stream real-time audio (preferred alias for listen).
560
+
561
+ Required: url
562
+
563
+ Args:
564
+ id: str
565
+ actionHook: dict[str, Any] | str
566
+ auth: dict[str, Any]
567
+ finishOnKey: str
568
+ maxLength: int | float
569
+ metadata: dict[str, Any]
570
+ mixType: str
571
+ passDtmf: bool
572
+ playBeep: bool
573
+ disableBidirectionalAudio: bool
574
+ bidirectionalAudio: dict[str, Any]
575
+ sampleRate: int | float
576
+ timeout: int | float
577
+ transcribe: dict[str, Any]
578
+ url: str (required)
579
+ wsAuth: dict[str, Any]
580
+ earlyMedia: bool
581
+ channel: int | float
582
+
583
+ Returns:
584
+ self for chaining.
585
+ """
586
+ ...
587
+
588
+ def transcribe(
589
+ self,
590
+ id: str = ...,
591
+ transcriptionHook: str = ...,
592
+ translationHook: str = ...,
593
+ recognizer: dict[str, Any] = ...,
594
+ earlyMedia: bool = ...,
595
+ channel: int | float = ...,
596
+ **kwargs: Any,
597
+ ) -> Self:
598
+ """Enable real-time call transcription.
599
+
600
+ Args:
601
+ id: str
602
+ transcriptionHook: str
603
+ translationHook: str
604
+ recognizer: dict[str, Any]
605
+ earlyMedia: bool
606
+ channel: int | float
607
+
608
+ Returns:
609
+ self for chaining.
610
+ """
611
+ ...
612
+
613
+ def dial(
614
+ self,
615
+ id: str = ...,
616
+ actionHook: dict[str, Any] | str = ...,
617
+ onHoldHook: dict[str, Any] | str = ...,
618
+ answerOnBridge: bool = ...,
619
+ callerId: str = ...,
620
+ callerName: str = ...,
621
+ confirmHook: dict[str, Any] | str = ...,
622
+ referHook: dict[str, Any] | str = ...,
623
+ dialMusic: str = ...,
624
+ dtmfCapture: dict[str, Any] = ...,
625
+ dtmfHook: dict[str, Any] | str = ...,
626
+ headers: dict[str, Any] = ...,
627
+ anchorMedia: bool = ...,
628
+ exitMediaPath: bool = ...,
629
+ boostAudioSignal: int | float | str = ...,
630
+ listen: dict[str, Any] = ...,
631
+ stream: dict[str, Any] = ...,
632
+ target: list[Any] = ...,
633
+ timeLimit: int | float = ...,
634
+ timeout: int | float = ...,
635
+ proxy: str = ...,
636
+ transcribe: dict[str, Any] = ...,
637
+ amd: dict[str, Any] = ...,
638
+ dub: list[Any] = ...,
639
+ tag: dict[str, Any] = ...,
640
+ forwardPAI: bool = ...,
641
+ **kwargs: Any,
642
+ ) -> Self:
643
+ """Place outbound call and bridge to current caller.
644
+
645
+ Required: target
646
+
647
+ Args:
648
+ id: str
649
+ actionHook: dict[str, Any] | str
650
+ onHoldHook: dict[str, Any] | str
651
+ answerOnBridge: bool
652
+ callerId: str
653
+ callerName: str
654
+ confirmHook: dict[str, Any] | str
655
+ referHook: dict[str, Any] | str
656
+ dialMusic: str
657
+ dtmfCapture: dict[str, Any]
658
+ dtmfHook: dict[str, Any] | str
659
+ headers: dict[str, Any]
660
+ anchorMedia: bool
661
+ exitMediaPath: bool
662
+ boostAudioSignal: int | float | str
663
+ listen: dict[str, Any]
664
+ stream: dict[str, Any]
665
+ target: list[Any] (required)
666
+ timeLimit: int | float
667
+ timeout: int | float
668
+ proxy: str
669
+ transcribe: dict[str, Any]
670
+ amd: dict[str, Any]
671
+ dub: list[Any]
672
+ tag: dict[str, Any]
673
+ forwardPAI: bool
674
+
675
+ Returns:
676
+ self for chaining.
677
+ """
678
+ ...
679
+
680
+ def conference(
681
+ self,
682
+ id: str = ...,
683
+ name: str = ...,
684
+ beep: bool = ...,
685
+ memberTag: str = ...,
686
+ speakOnlyTo: str = ...,
687
+ startConferenceOnEnter: bool = ...,
688
+ endConferenceOnExit: bool = ...,
689
+ endConferenceDuration: int | float = ...,
690
+ maxParticipants: int | float = ...,
691
+ joinMuted: bool = ...,
692
+ actionHook: dict[str, Any] | str = ...,
693
+ waitHook: dict[str, Any] | str = ...,
694
+ statusEvents: list[Any] = ...,
695
+ statusHook: dict[str, Any] | str = ...,
696
+ enterHook: dict[str, Any] | str = ...,
697
+ record: dict[str, Any] = ...,
698
+ listen: dict[str, Any] = ...,
699
+ distributeDtmf: bool = ...,
700
+ **kwargs: Any,
701
+ ) -> Self:
702
+ """Place caller into a multi-party conference room.
703
+
704
+ Required: name
705
+
706
+ Args:
707
+ id: str
708
+ name: str (required)
709
+ beep: bool
710
+ memberTag: str
711
+ speakOnlyTo: str
712
+ startConferenceOnEnter: bool
713
+ endConferenceOnExit: bool
714
+ endConferenceDuration: int | float
715
+ maxParticipants: int | float
716
+ joinMuted: bool
717
+ actionHook: dict[str, Any] | str
718
+ waitHook: dict[str, Any] | str
719
+ statusEvents: list[Any]
720
+ statusHook: dict[str, Any] | str
721
+ enterHook: dict[str, Any] | str
722
+ record: dict[str, Any]
723
+ listen: dict[str, Any]
724
+ distributeDtmf: bool
725
+
726
+ Returns:
727
+ self for chaining.
728
+ """
729
+ ...
730
+
731
+ def enqueue(
732
+ self,
733
+ id: str = ...,
734
+ name: str = ...,
735
+ actionHook: dict[str, Any] | str = ...,
736
+ waitHook: dict[str, Any] | str = ...,
737
+ priority: int | float = ...,
738
+ _: dict[str, Any] = ...,
739
+ **kwargs: Any,
740
+ ) -> Self:
741
+ """Place caller into a named call queue.
742
+
743
+ Required: name
744
+
745
+ Args:
746
+ id: str
747
+ name: str (required)
748
+ actionHook: dict[str, Any] | str
749
+ waitHook: dict[str, Any] | str
750
+ priority: int | float
751
+ _: dict[str, Any]
752
+
753
+ Returns:
754
+ self for chaining.
755
+ """
756
+ ...
757
+
758
+ def dequeue(
759
+ self,
760
+ id: str = ...,
761
+ name: str = ...,
762
+ actionHook: dict[str, Any] | str = ...,
763
+ timeout: int | float = ...,
764
+ beep: bool = ...,
765
+ callSid: str = ...,
766
+ **kwargs: Any,
767
+ ) -> Self:
768
+ """Remove caller from a queue and bridge.
769
+
770
+ Required: name
771
+
772
+ Args:
773
+ id: str
774
+ name: str (required)
775
+ actionHook: dict[str, Any] | str
776
+ timeout: int | float
777
+ beep: bool
778
+ callSid: str
779
+
780
+ Returns:
781
+ self for chaining.
782
+ """
783
+ ...
784
+
785
+ def hangup(
786
+ self,
787
+ id: str = ...,
788
+ headers: dict[str, Any] = ...,
789
+ **kwargs: Any,
790
+ ) -> Self:
791
+ """Terminate the call.
792
+
793
+ Args:
794
+ id: str
795
+ headers: dict[str, Any]
796
+
797
+ Returns:
798
+ self for chaining.
799
+ """
800
+ ...
801
+
802
+ def redirect(
803
+ self,
804
+ id: str = ...,
805
+ actionHook: dict[str, Any] | str = ...,
806
+ statusHook: dict[str, Any] | str = ...,
807
+ **kwargs: Any,
808
+ ) -> Self:
809
+ """Transfer control to a different webhook URL.
810
+
811
+ Required: actionHook
812
+
813
+ Args:
814
+ id: str
815
+ actionHook: dict[str, Any] | str (required)
816
+ statusHook: dict[str, Any] | str
817
+
818
+ Returns:
819
+ self for chaining.
820
+ """
821
+ ...
822
+
823
+ def pause(
824
+ self,
825
+ id: str = ...,
826
+ length: int | float = ...,
827
+ **kwargs: Any,
828
+ ) -> Self:
829
+ """Pause execution for a specified duration.
830
+
831
+ Required: length
832
+
833
+ Args:
834
+ id: str
835
+ length: int | float (required)
836
+
837
+ Returns:
838
+ self for chaining.
839
+ """
840
+ ...
841
+
842
+ def sip_decline(
843
+ self,
844
+ id: str = ...,
845
+ status: int | float = ...,
846
+ reason: str = ...,
847
+ headers: dict[str, Any] = ...,
848
+ **kwargs: Any,
849
+ ) -> Self:
850
+ """Reject incoming call with a SIP error response.
851
+
852
+ Required: status
853
+
854
+ Args:
855
+ id: str
856
+ status: int | float (required)
857
+ reason: str
858
+ headers: dict[str, Any]
859
+
860
+ Returns:
861
+ self for chaining.
862
+ """
863
+ ...
864
+
865
+ def sip_request(
866
+ self,
867
+ id: str = ...,
868
+ method: str = ...,
869
+ body: str = ...,
870
+ headers: dict[str, Any] = ...,
871
+ actionHook: dict[str, Any] | str = ...,
872
+ **kwargs: Any,
873
+ ) -> Self:
874
+ """Send a SIP request within the current dialog.
875
+
876
+ Required: method
877
+
878
+ Args:
879
+ id: str
880
+ method: str (required)
881
+ body: str
882
+ headers: dict[str, Any]
883
+ actionHook: dict[str, Any] | str
884
+
885
+ Returns:
886
+ self for chaining.
887
+ """
888
+ ...
889
+
890
+ def sip_refer(
891
+ self,
892
+ id: str = ...,
893
+ referTo: str = ...,
894
+ referredBy: str = ...,
895
+ referredByDisplayName: str = ...,
896
+ headers: dict[str, Any] = ...,
897
+ actionHook: dict[str, Any] | str = ...,
898
+ eventHook: dict[str, Any] | str = ...,
899
+ **kwargs: Any,
900
+ ) -> Self:
901
+ """Send a SIP REFER for call transfer.
902
+
903
+ Required: referTo
904
+
905
+ Args:
906
+ id: str
907
+ referTo: str (required)
908
+ referredBy: str
909
+ referredByDisplayName: str
910
+ headers: dict[str, Any]
911
+ actionHook: dict[str, Any] | str
912
+ eventHook: dict[str, Any] | str
913
+
914
+ Returns:
915
+ self for chaining.
916
+ """
917
+ ...
918
+
919
+ def config(
920
+ self,
921
+ id: str = ...,
922
+ synthesizer: dict[str, Any] = ...,
923
+ recognizer: dict[str, Any] = ...,
924
+ bargeIn: dict[str, Any] = ...,
925
+ ttsStream: dict[str, Any] = ...,
926
+ record: dict[str, Any] = ...,
927
+ listen: dict[str, Any] = ...,
928
+ stream: dict[str, Any] = ...,
929
+ transcribe: dict[str, Any] = ...,
930
+ amd: dict[str, Any] = ...,
931
+ fillerNoise: dict[str, Any] = ...,
932
+ notifyEvents: bool = ...,
933
+ notifySttLatency: bool = ...,
934
+ reset: str | list[Any] = ...,
935
+ onHoldMusic: str = ...,
936
+ actionHookDelayAction: dict[str, Any] = ...,
937
+ sipRequestWithinDialogHook: dict[str, Any] | str = ...,
938
+ boostAudioSignal: int | float | str = ...,
939
+ vad: dict[str, Any] = ...,
940
+ referHook: dict[str, Any] | str = ...,
941
+ earlyMedia: bool = ...,
942
+ autoStreamTts: bool = ...,
943
+ disableTtsCache: bool = ...,
944
+ trackTtsPlayout: bool = ...,
945
+ noiseIsolation: dict[str, Any] = ...,
946
+ turnTaking: dict[str, Any] = ...,
947
+ **kwargs: Any,
948
+ ) -> Self:
949
+ """Set session-level defaults.
950
+
951
+ Args:
952
+ id: str
953
+ synthesizer: dict[str, Any]
954
+ recognizer: dict[str, Any]
955
+ bargeIn: dict[str, Any]
956
+ ttsStream: dict[str, Any]
957
+ record: dict[str, Any]
958
+ listen: dict[str, Any]
959
+ stream: dict[str, Any]
960
+ transcribe: dict[str, Any]
961
+ amd: dict[str, Any]
962
+ fillerNoise: dict[str, Any]
963
+ notifyEvents: bool
964
+ notifySttLatency: bool
965
+ reset: str | list[Any]
966
+ onHoldMusic: str
967
+ actionHookDelayAction: dict[str, Any]
968
+ sipRequestWithinDialogHook: dict[str, Any] | str
969
+ boostAudioSignal: int | float | str
970
+ vad: dict[str, Any]
971
+ referHook: dict[str, Any] | str
972
+ earlyMedia: bool
973
+ autoStreamTts: bool
974
+ disableTtsCache: bool
975
+ trackTtsPlayout: bool
976
+ noiseIsolation: dict[str, Any]
977
+ turnTaking: dict[str, Any]
978
+
979
+ Returns:
980
+ self for chaining.
981
+ """
982
+ ...
983
+
984
+ def tag(
985
+ self,
986
+ id: str = ...,
987
+ data: dict[str, Any] = ...,
988
+ **kwargs: Any,
989
+ ) -> Self:
990
+ """Attach metadata to the call.
991
+
992
+ Required: data
993
+
994
+ Args:
995
+ id: str
996
+ data: dict[str, Any] (required)
997
+
998
+ Returns:
999
+ self for chaining.
1000
+ """
1001
+ ...
1002
+
1003
+ def dtmf(
1004
+ self,
1005
+ id: str = ...,
1006
+ dtmf: str = ...,
1007
+ duration: int | float = ...,
1008
+ **kwargs: Any,
1009
+ ) -> Self:
1010
+ """Send DTMF tones.
1011
+
1012
+ Required: dtmf
1013
+
1014
+ Args:
1015
+ id: str
1016
+ dtmf: str (required)
1017
+ duration: int | float
1018
+
1019
+ Returns:
1020
+ self for chaining.
1021
+ """
1022
+ ...
1023
+
1024
+ def dub(
1025
+ self,
1026
+ id: str = ...,
1027
+ action: str = ...,
1028
+ track: str = ...,
1029
+ play: str = ...,
1030
+ say: str | dict[str, Any] = ...,
1031
+ loop: bool = ...,
1032
+ gain: int | float | str = ...,
1033
+ **kwargs: Any,
1034
+ ) -> Self:
1035
+ """Manage audio dubbing tracks.
1036
+
1037
+ Required: action, track
1038
+
1039
+ Args:
1040
+ id: str
1041
+ action: str (required)
1042
+ track: str (required)
1043
+ play: str
1044
+ say: str | dict[str, Any]
1045
+ loop: bool
1046
+ gain: int | float | str
1047
+
1048
+ Returns:
1049
+ self for chaining.
1050
+ """
1051
+ ...
1052
+
1053
+ def message(
1054
+ self,
1055
+ id: str = ...,
1056
+ carrier: str = ...,
1057
+ account_sid: str = ...,
1058
+ message_sid: str = ...,
1059
+ to: str = ...,
1060
+ from_: str = ...,
1061
+ text: str = ...,
1062
+ media: str | list[Any] = ...,
1063
+ actionHook: dict[str, Any] | str = ...,
1064
+ **kwargs: Any,
1065
+ ) -> Self:
1066
+ """Send SMS/MMS message.
1067
+
1068
+ Required: from, to
1069
+
1070
+ Args:
1071
+ id: str
1072
+ carrier: str
1073
+ account_sid: str
1074
+ message_sid: str
1075
+ to: str (required)
1076
+ from_: str (required)
1077
+ text: str
1078
+ media: str | list[Any]
1079
+ actionHook: dict[str, Any] | str
1080
+
1081
+ Returns:
1082
+ self for chaining.
1083
+ """
1084
+ ...
1085
+
1086
+ def alert(
1087
+ self,
1088
+ id: str = ...,
1089
+ message: str = ...,
1090
+ **kwargs: Any,
1091
+ ) -> Self:
1092
+ """Send SIP 180 with Alert-Info header.
1093
+
1094
+ Required: message
1095
+
1096
+ Args:
1097
+ id: str
1098
+ message: str (required)
1099
+
1100
+ Returns:
1101
+ self for chaining.
1102
+ """
1103
+ ...
1104
+
1105
+ def answer(
1106
+ self,
1107
+ id: str = ...,
1108
+ **kwargs: Any,
1109
+ ) -> Self:
1110
+ """Explicitly answer the call.
1111
+
1112
+ Args:
1113
+ id: str
1114
+
1115
+ Returns:
1116
+ self for chaining.
1117
+ """
1118
+ ...
1119
+
1120
+ def leave(
1121
+ self,
1122
+ id: str = ...,
1123
+ **kwargs: Any,
1124
+ ) -> Self:
1125
+ """Leave a conference or queue.
1126
+
1127
+ Args:
1128
+ id: str
1129
+
1130
+ Returns:
1131
+ self for chaining.
1132
+ """
1133
+ ...