@wildix/wilma-voice-client 0.0.51 → 0.0.52

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.
@@ -73,12 +73,11 @@ export interface WilmaVoice {
73
73
  * (engine, instructions, capabilities and channels.voice settings). This is a runtime only: there
74
74
  * is no agent/bot CRUD here — agents are authored and versioned in wilma-agents.
75
75
  *
76
- * On the WebSocket (transport host `wilma-voice-ws.wildix.com`), PBX clients transcribe caller
77
- * speech themselves and send `transcription` / `reply` text, while web/app clients connect with
78
- * inputMode=AUDIO and push raw caller `audio` chunks that the service transcribes server-side;
79
- * the service returns `say` / `play` / `stop` / `hangup` / `transfer`. On the PBX media socket
80
- * (`/v2/voice/media/ws`, subprotocol `wilma-media-v2`), the PBX sends raw caller audio and the
81
- * service answers with audio and the text frames listed under DescribeVoiceProtocol `media`.
76
+ * On the WebSocket (transport host `wilma-voice-ws.wildix.com`), the PBX transcribes caller
77
+ * speech itself and sends `transcription` / `reply` text; the service returns `say` / `play` /
78
+ * `stop` / `hangup` / `transfer`. On the call socket
79
+ * (`/v2/voice/calls/ws`), the PBX sends raw caller audio and the
80
+ * service answers with audio and the text frames listed under DescribeVoiceProtocol `callSocket`.
82
81
  * Every WebSocket message shape (connect params, events and commands) is declared as a structure
83
82
  * and enumerated by DescribeVoiceProtocol so the generated SDKs carry the types and
84
83
  * (de)serializers; the WebSocket transport itself is hand-coded. The HTTP Send* operations push
@@ -164,12 +164,11 @@ export interface WilmaVoiceClientResolvedConfig extends WilmaVoiceClientResolved
164
164
  * (engine, instructions, capabilities and channels.voice settings). This is a runtime only: there
165
165
  * is no agent/bot CRUD here — agents are authored and versioned in wilma-agents.
166
166
  *
167
- * On the WebSocket (transport host `wilma-voice-ws.wildix.com`), PBX clients transcribe caller
168
- * speech themselves and send `transcription` / `reply` text, while web/app clients connect with
169
- * inputMode=AUDIO and push raw caller `audio` chunks that the service transcribes server-side;
170
- * the service returns `say` / `play` / `stop` / `hangup` / `transfer`. On the PBX media socket
171
- * (`/v2/voice/media/ws`, subprotocol `wilma-media-v2`), the PBX sends raw caller audio and the
172
- * service answers with audio and the text frames listed under DescribeVoiceProtocol `media`.
167
+ * On the WebSocket (transport host `wilma-voice-ws.wildix.com`), the PBX transcribes caller
168
+ * speech itself and sends `transcription` / `reply` text; the service returns `say` / `play` /
169
+ * `stop` / `hangup` / `transfer`. On the call socket
170
+ * (`/v2/voice/calls/ws`), the PBX sends raw caller audio and the
171
+ * service answers with audio and the text frames listed under DescribeVoiceProtocol `callSocket`.
173
172
  * Every WebSocket message shape (connect params, events and commands) is declared as a structure
174
173
  * and enumerated by DescribeVoiceProtocol so the generated SDKs carry the types and
175
174
  * (de)serializers; the WebSocket transport itself is hand-coded. The HTTP Send* operations push
@@ -27,7 +27,7 @@ declare const DescribeVoiceProtocolCommand_base: {
27
27
  getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
28
28
  };
29
29
  /**
30
- * Describes the WebSocket connect parameters, events and commands of the voice protocol, and the messages of the PBX media socket. Utility method; the generated shapes are the source of truth for building a WebSocket client or server by hand.
30
+ * Describes the WebSocket connect parameters, events and commands of the voice protocol, and the messages of the call socket. Utility method; the generated shapes are the source of truth for building a WebSocket client or server by hand.
31
31
  * @example
32
32
  * Use a bare-bones client and the command you need to make an API call.
33
33
  * ```javascript
@@ -44,7 +44,6 @@ declare const DescribeVoiceProtocolCommand_base: {
44
44
  * // protocolVersion: Number("int"),
45
45
  * // sessionId: "STRING_VALUE", // required
46
46
  * // resume: true || false,
47
- * // reconnect: true || false,
48
47
  * // agentId: "STRING_VALUE", // required
49
48
  * // agentVersion: Number("int"),
50
49
  * // agentDraft: true || false,
@@ -59,191 +58,120 @@ declare const DescribeVoiceProtocolCommand_base: {
59
58
  * // voice: "STRING_VALUE",
60
59
  * // initialMessage: "STRING_VALUE",
61
60
  * // variables: "STRING_VALUE",
62
- * // inputMode: "transcription" || "audio",
63
- * // inputAudio: { // VoiceAudioFormat
64
- * // encoding: "pcm_s16le" || "mulaw" || "alaw" || "opus", // required
65
- * // sampleRate: Number("int"), // required
66
- * // channels: Number("int"),
67
- * // },
68
- * // outputAudio: {
69
- * // encoding: "pcm_s16le" || "mulaw" || "alaw" || "opus", // required
70
- * // sampleRate: Number("int"), // required
71
- * // channels: Number("int"),
72
- * // },
61
+ * // inputMode: "transcription",
62
+ * // user: "STRING_VALUE",
63
+ * // company: "STRING_VALUE",
73
64
  * // },
74
- * // audioWebsocketEvent: { // AudioWebsocketEvent
65
+ * // healthcheckWebsocketFrame: { // VoiceHealthcheckWebsocketFrame
75
66
  * // type: "STRING_VALUE", // required
76
- * // event: { // AudioEvent
77
- * // type: "started" || "ended" || "error" || "audio" || "transcription" || "agentTranscription" || "reply" || "playback" || "interruption" || "complete" || "control", // required
78
- * // data: "STRING_VALUE", // required
79
- * // seq: Number("int"),
80
- * // },
81
67
  * // },
82
- * // transcriptionWebsocketEvent: { // TranscriptionWebsocketEvent
83
- * // type: "STRING_VALUE", // required
84
- * // event: { // TranscriptionEvent
85
- * // type: "started" || "ended" || "error" || "audio" || "transcription" || "agentTranscription" || "reply" || "playback" || "interruption" || "complete" || "control", // required
86
- * // id: "STRING_VALUE", // required
87
- * // text: "STRING_VALUE", // required
88
- * // confidence: Number("double"),
89
- * // final: true || false,
90
- * // language: "STRING_VALUE",
91
- * // time: Number("long"), // required
92
- * // },
68
+ * // transcriptionEvent: { // VoiceTranscriptionEvent
69
+ * // type: "started" || "ended" || "error" || "transcription" || "agentTranscription" || "reply" || "playback" || "interruption" || "complete" || "thinking" || "tool", // required
70
+ * // id: "STRING_VALUE",
71
+ * // text: "STRING_VALUE", // required
72
+ * // confidence: Number("double"),
73
+ * // final: true || false,
74
+ * // language: "STRING_VALUE",
75
+ * // time: Number("long"),
93
76
  * // },
94
- * // agentTranscriptionWebsocketEvent: { // AgentTranscriptionWebsocketEvent
95
- * // type: "STRING_VALUE", // required
96
- * // event: { // AgentTranscriptionEvent
97
- * // type: "started" || "ended" || "error" || "audio" || "transcription" || "agentTranscription" || "reply" || "playback" || "interruption" || "complete" || "control", // required
98
- * // id: "STRING_VALUE", // required
99
- * // text: "STRING_VALUE", // required
100
- * // confidence: Number("double"),
101
- * // final: true || false,
102
- * // language: "STRING_VALUE",
103
- * // time: Number("long"), // required
104
- * // },
77
+ * // agentTranscriptionEvent: { // VoiceAgentTranscriptionEvent
78
+ * // type: "started" || "ended" || "error" || "transcription" || "agentTranscription" || "reply" || "playback" || "interruption" || "complete" || "thinking" || "tool", // required
79
+ * // id: "STRING_VALUE",
80
+ * // text: "STRING_VALUE", // required
81
+ * // confidence: Number("double"),
82
+ * // final: true || false,
83
+ * // language: "STRING_VALUE",
84
+ * // time: Number("long"),
105
85
  * // },
106
- * // replyWebsocketEvent: { // ReplyWebsocketEvent
107
- * // type: "STRING_VALUE", // required
108
- * // event: { // ReplyEvent
109
- * // type: "started" || "ended" || "error" || "audio" || "transcription" || "agentTranscription" || "reply" || "playback" || "interruption" || "complete" || "control", // required
110
- * // id: "STRING_VALUE", // required
111
- * // text: "STRING_VALUE", // required
112
- * // language: "STRING_VALUE",
113
- * // startTime: Number("long"), // required
114
- * // endTime: Number("long"), // required
115
- * // },
86
+ * // replyEvent: { // VoiceReplyEvent
87
+ * // type: "started" || "ended" || "error" || "transcription" || "agentTranscription" || "reply" || "playback" || "interruption" || "complete" || "thinking" || "tool", // required
88
+ * // id: "STRING_VALUE",
89
+ * // text: "STRING_VALUE", // required
90
+ * // time: Number("long"),
91
+ * // language: "STRING_VALUE",
92
+ * // confidence: Number("double"),
93
+ * // startTime: Number("long"),
94
+ * // endTime: Number("long"),
116
95
  * // },
117
- * // playbackWebsocketEvent: { // PlaybackWebsocketEvent
118
- * // type: "STRING_VALUE", // required
119
- * // event: { // PlaybackEvent
120
- * // type: "started" || "ended" || "error" || "audio" || "transcription" || "agentTranscription" || "reply" || "playback" || "interruption" || "complete" || "control", // required
121
- * // replyId: "STRING_VALUE", // required
122
- * // text: "STRING_VALUE", // required
123
- * // complete: true || false, // required
124
- * // startTime: Number("long"), // required
125
- * // endTime: Number("long"),
126
- * // },
96
+ * // playbackEvent: { // VoicePlaybackEvent
97
+ * // type: "started" || "ended" || "error" || "transcription" || "agentTranscription" || "reply" || "playback" || "interruption" || "complete" || "thinking" || "tool", // required
98
+ * // replyId: "STRING_VALUE",
99
+ * // text: "STRING_VALUE",
100
+ * // complete: true || false, // required
101
+ * // startTime: Number("long"),
102
+ * // endTime: Number("long"),
127
103
  * // },
128
- * // interruptionWebsocketEvent: { // InterruptionWebsocketEvent
129
- * // type: "STRING_VALUE", // required
130
- * // event: { // InterruptionEvent
131
- * // type: "started" || "ended" || "error" || "audio" || "transcription" || "agentTranscription" || "reply" || "playback" || "interruption" || "complete" || "control", // required
132
- * // replyId: "STRING_VALUE", // required
133
- * // playedText: "STRING_VALUE", // required
134
- * // originalText: "STRING_VALUE", // required
135
- * // time: Number("long"), // required
136
- * // },
137
- * // },
138
- * // completeWebsocketEvent: { // CompleteWebsocketEvent
139
- * // type: "STRING_VALUE", // required
140
- * // event: { // CompleteEvent
141
- * // type: "started" || "ended" || "error" || "audio" || "transcription" || "agentTranscription" || "reply" || "playback" || "interruption" || "complete" || "control", // required
142
- * // reason: "STRING_VALUE", // required
143
- * // time: Number("long"), // required
144
- * // },
104
+ * // interruptionEvent: { // VoiceInterruptionEvent
105
+ * // type: "started" || "ended" || "error" || "transcription" || "agentTranscription" || "reply" || "playback" || "interruption" || "complete" || "thinking" || "tool", // required
106
+ * // replyId: "STRING_VALUE",
107
+ * // playedText: "STRING_VALUE",
108
+ * // originalText: "STRING_VALUE",
109
+ * // time: Number("long"),
145
110
  * // },
146
- * // controlWebsocketEvent: { // ControlWebsocketEvent
147
- * // type: "STRING_VALUE", // required
148
- * // event: { // ControlEvent
149
- * // type: "started" || "ended" || "error" || "audio" || "transcription" || "agentTranscription" || "reply" || "playback" || "interruption" || "complete" || "control", // required
150
- * // action: "end_of_turn" || "clear" || "keepalive", // required
151
- * // },
111
+ * // completeEvent: { // VoiceCompleteEvent
112
+ * // type: "started" || "ended" || "error" || "transcription" || "agentTranscription" || "reply" || "playback" || "interruption" || "complete" || "thinking" || "tool", // required
113
+ * // reason: "STRING_VALUE",
114
+ * // time: Number("long"),
152
115
  * // },
153
- * // sessionStartedWebsocketEvent: { // SessionStartedWebsocketEvent
154
- * // type: "STRING_VALUE", // required
155
- * // event: { // SessionStartedEvent
156
- * // type: "started" || "ended" || "error" || "audio" || "transcription" || "agentTranscription" || "reply" || "playback" || "interruption" || "complete" || "control", // required
157
- * // time: Number("long"), // required
158
- * // sessionId: "STRING_VALUE", // required
159
- * // agentId: "STRING_VALUE", // required
160
- * // agentVersion: Number("int"),
161
- * // traceId: "STRING_VALUE",
162
- * // agentName: "STRING_VALUE",
163
- * // category: "STRING_VALUE",
164
- * // groupId: "STRING_VALUE",
165
- * // speech: { // VoiceSpeechPayload
166
- * // engine: "STRING_VALUE", // required
167
- * // languages: [ // LanguageCodeList // required
168
- * // "STRING_VALUE",
169
- * // ],
170
- * // preferredLanguage: "STRING_VALUE", // required
171
- * // autoDetect: true || false, // required
172
- * // },
173
- * // backgroundSound: "STRING_VALUE",
174
- * // inputAudio: {
175
- * // encoding: "pcm_s16le" || "mulaw" || "alaw" || "opus", // required
176
- * // sampleRate: Number("int"), // required
177
- * // channels: Number("int"),
178
- * // },
179
- * // outputAudio: {
180
- * // encoding: "pcm_s16le" || "mulaw" || "alaw" || "opus", // required
181
- * // sampleRate: Number("int"), // required
182
- * // channels: Number("int"),
183
- * // },
116
+ * // sessionStartedEvent: { // VoiceSessionStartedEvent
117
+ * // type: "started" || "ended" || "error" || "transcription" || "agentTranscription" || "reply" || "playback" || "interruption" || "complete" || "thinking" || "tool", // required
118
+ * // time: Number("long"), // required
119
+ * // sessionId: "STRING_VALUE", // required
120
+ * // agentId: "STRING_VALUE", // required
121
+ * // agentVersion: Number("int"),
122
+ * // traceId: "STRING_VALUE",
123
+ * // agentName: "STRING_VALUE",
124
+ * // category: "STRING_VALUE",
125
+ * // groupId: "STRING_VALUE",
126
+ * // speech: { // VoiceSpeechPayload
127
+ * // engine: "STRING_VALUE", // required
128
+ * // languages: [ // LanguageCodeList // required
129
+ * // "STRING_VALUE",
130
+ * // ],
131
+ * // preferredLanguage: "STRING_VALUE", // required
132
+ * // autoDetect: true || false, // required
184
133
  * // },
134
+ * // backgroundSound: "STRING_VALUE",
185
135
  * // },
186
- * // sessionEndedWebsocketEvent: { // SessionEndedWebsocketEvent
187
- * // type: "STRING_VALUE", // required
188
- * // event: { // SessionEndedEvent
189
- * // type: "started" || "ended" || "error" || "audio" || "transcription" || "agentTranscription" || "reply" || "playback" || "interruption" || "complete" || "control", // required
190
- * // reason: "STRING_VALUE",
191
- * // error: "STRING_VALUE",
192
- * // time: Number("long"), // required
193
- * // },
136
+ * // sessionEndedEvent: { // VoiceSessionEndedEvent
137
+ * // type: "started" || "ended" || "error" || "transcription" || "agentTranscription" || "reply" || "playback" || "interruption" || "complete" || "thinking" || "tool", // required
138
+ * // reason: "STRING_VALUE",
139
+ * // error: "STRING_VALUE",
140
+ * // time: Number("long"), // required
194
141
  * // },
195
- * // errorWebsocketEvent: { // ErrorWebsocketEvent
196
- * // type: "STRING_VALUE", // required
197
- * // event: { // VoiceErrorEvent
198
- * // type: "started" || "ended" || "error" || "audio" || "transcription" || "agentTranscription" || "reply" || "playback" || "interruption" || "complete" || "control", // required
199
- * // code: "STRING_VALUE", // required
200
- * // message: "STRING_VALUE", // required
201
- * // time: Number("long"), // required
202
- * // },
142
+ * // errorEvent: { // VoiceErrorEvent
143
+ * // type: "started" || "ended" || "error" || "transcription" || "agentTranscription" || "reply" || "playback" || "interruption" || "complete" || "thinking" || "tool", // required
144
+ * // code: "STRING_VALUE", // required
145
+ * // message: "STRING_VALUE", // required
146
+ * // time: Number("long"), // required
203
147
  * // },
204
- * // sayWebsocketCommand: { // SayWebsocketCommand
205
- * // type: "STRING_VALUE", // required
206
- * // command: { // SayCommandData
207
- * // text: "STRING_VALUE", // required
208
- * // replyId: "STRING_VALUE", // required
209
- * // interruptible: true || false,
210
- * // voice: "STRING_VALUE",
211
- * // audio: { // SayCommandAudioOptions
212
- * // streamId: "STRING_VALUE", // required
213
- * // sampleRate: Number("int"), // required
214
- * // },
215
- * // type: "say" || "play" || "stop" || "hangup" || "transfer", // required
216
- * // },
217
- * // },
218
- * // playWebsocketCommand: { // PlayWebsocketCommand
219
- * // type: "STRING_VALUE", // required
220
- * // command: { // PlayCommandData
221
- * // replyId: "STRING_VALUE", // required
148
+ * // sayCommand: { // VoiceSayCommandData
149
+ * // text: "STRING_VALUE", // required
150
+ * // replyId: "STRING_VALUE", // required
151
+ * // interruptible: true || false,
152
+ * // audio: { // VoiceSayCommandAudioOptions
222
153
  * // streamId: "STRING_VALUE", // required
223
- * // data: "STRING_VALUE", // required
224
- * // type: "say" || "play" || "stop" || "hangup" || "transfer", // required
154
+ * // sampleRate: Number("int"), // required
225
155
  * // },
156
+ * // type: "say" || "play" || "stop" || "hangup" || "transfer", // required
226
157
  * // },
227
- * // stopWebsocketCommand: { // StopWebsocketCommand
228
- * // type: "STRING_VALUE", // required
229
- * // command: { // StopCommandData
230
- * // type: "say" || "play" || "stop" || "hangup" || "transfer", // required
231
- * // },
158
+ * // playCommand: { // VoicePlayCommandData
159
+ * // replyId: "STRING_VALUE", // required
160
+ * // streamId: "STRING_VALUE", // required
161
+ * // data: "STRING_VALUE", // required
162
+ * // type: "say" || "play" || "stop" || "hangup" || "transfer", // required
232
163
  * // },
233
- * // hangupWebsocketCommand: { // HangupWebsocketCommand
234
- * // type: "STRING_VALUE", // required
235
- * // command: { // HangupCommandData
236
- * // reason: "STRING_VALUE",
237
- * // type: "say" || "play" || "stop" || "hangup" || "transfer", // required
238
- * // },
164
+ * // stopCommand: { // VoiceStopCommandData
165
+ * // type: "say" || "play" || "stop" || "hangup" || "transfer", // required
239
166
  * // },
240
- * // transferWebsocketCommand: { // TransferWebsocketCommand
241
- * // type: "STRING_VALUE", // required
242
- * // command: { // TransferCommandData
243
- * // context: "STRING_VALUE", // required
244
- * // extension: "STRING_VALUE", // required
245
- * // type: "say" || "play" || "stop" || "hangup" || "transfer", // required
246
- * // },
167
+ * // hangupCommand: { // VoiceHangupCommandData
168
+ * // reason: "STRING_VALUE",
169
+ * // type: "say" || "play" || "stop" || "hangup" || "transfer", // required
170
+ * // },
171
+ * // transferCommand: { // VoiceTransferCommandData
172
+ * // context: "STRING_VALUE", // required
173
+ * // extension: "STRING_VALUE", // required
174
+ * // type: "say" || "play" || "stop" || "hangup" || "transfer", // required
247
175
  * // },
248
176
  * // callEvent: { // VoiceCallEvent Union: only one key present
249
177
  * // started: { // VoiceCallStartedEvent
@@ -261,7 +189,7 @@ declare const DescribeVoiceProtocolCommand_base: {
261
189
  * // final: true || false, // required
262
190
  * // language: "STRING_VALUE",
263
191
  * // time: Number("long"),
264
- * // dropped: "low_confidence" || "other_speaker",
192
+ * // finalDropReason: "low_confidence" || "other_speaker",
265
193
  * // },
266
194
  * // agentTranscription: { // VoiceCallAgentTranscriptionEvent
267
195
  * // id: "STRING_VALUE", // required
@@ -305,140 +233,116 @@ declare const DescribeVoiceProtocolCommand_base: {
305
233
  * // reason: "hangup" || "transfer" || "timeout" || "error" || "complete", // required
306
234
  * // },
307
235
  * // },
308
- * // media: { // MediaProtocolFrames
309
- * // pbx: { // MediaPbxFrames
310
- * // start: { // MediaStartFrame
311
- * // type: "start", // required
312
- * // purpose: "agent" || "transcription", // required
313
- * // callId: "STRING_VALUE", // required
314
- * // flowIndex: Number("int"), // required
315
- * // sessionId: "STRING_VALUE", // required
316
- * // resume: true || false, // required
317
- * // resumeAtMs: Number("int"), // required
318
- * // audio: { // MediaAudioFormat
319
- * // encoding: "pcm_s16le", // required
320
- * // sampleRate: Number("int"), // required
321
- * // channels: Number("int"), // required
322
- * // },
323
- * // agent: { // MediaStartAgent
324
- * // id: "STRING_VALUE", // required
325
- * // draft: true || false,
326
- * // version: Number("int"),
327
- * // },
328
- * // languages: [ // MediaStartLanguageList
329
- * // "STRING_VALUE",
330
- * // ],
331
- * // preferredLanguage: "STRING_VALUE",
332
- * // autoDetect: true || false,
333
- * // caller: { // MediaStartCaller
334
- * // name: "STRING_VALUE",
335
- * // number: "STRING_VALUE",
336
- * // email: "STRING_VALUE",
337
- * // company: "STRING_VALUE",
338
- * // },
339
- * // dialedNumber: "STRING_VALUE",
340
- * // variables: "STRING_VALUE",
341
- * // },
342
- * // audio: new Uint8Array(),
343
- * // vad: { // MediaVadFrame
344
- * // type: "vad", // required
345
- * // party: "caller" || "callee", // required
346
- * // speaking: true || false, // required
347
- * // energyDb: Number("double"), // required
348
- * // atMs: Number("int"), // required
349
- * // },
350
- * // dtmf: { // MediaDtmfFrame
351
- * // type: "dtmf", // required
236
+ * // callSocket: { // VoiceCallProtocolFrames
237
+ * // start: { // VoiceCallStartFrame
238
+ * // type: "start" || "vad" || "dtmf" || "playback" || "end", // required
239
+ * // callId: "STRING_VALUE", // required
240
+ * // flowIndex: Number("int"), // required
241
+ * // sessionId: "STRING_VALUE", // required
242
+ * // resume: true || false, // required
243
+ * // resumeAtMs: Number("int"), // required
244
+ * // agent: { // VoiceCallStartAgent
352
245
  * // id: "STRING_VALUE", // required
353
- * // digits: "STRING_VALUE", // required
354
- * // },
355
- * // playback: { // MediaPlaybackFrame
356
- * // type: "playback", // required
357
- * // replyId: "STRING_VALUE", // required
358
- * // streamId: "STRING_VALUE", // required
359
- * // event: "started" || "finished" || "stopped", // required
360
- * // atMs: Number("int"), // required
361
- * // playedMs: Number("int"),
362
- * // cause: "cloud" || "caller" || "drop",
246
+ * // draft: true || false,
247
+ * // version: Number("int"),
363
248
  * // },
364
- * // finish: { // MediaFinishFrame
365
- * // type: "finish", // required
366
- * // reason: "caller-hangup" || "callee-hangup" || "agent-hangup" || "agent-transfer" || "timeout", // required
249
+ * // language: "STRING_VALUE", // required
250
+ * // caller: { // VoiceCallStartCaller
251
+ * // name: "STRING_VALUE",
252
+ * // number: "STRING_VALUE",
253
+ * // email: "STRING_VALUE",
254
+ * // company: "STRING_VALUE",
367
255
  * // },
256
+ * // dialedNumber: "STRING_VALUE",
257
+ * // variables: "STRING_VALUE",
368
258
  * // },
369
- * // cloud: { // MediaCloudFrames
370
- * // started: { // MediaStartedFrame
371
- * // type: "started", // required
372
- * // streamId: "STRING_VALUE", // required
373
- * // agent: { // MediaStartedAgent
374
- * // name: "STRING_VALUE", // required
375
- * // },
376
- * // groupId: "STRING_VALUE",
377
- * // backgroundSound: "STRING_VALUE",
378
- * // voiceDetection: { // MediaVoiceDetection
379
- * // silenceMs: Number("int"), // required
380
- * // silenceLevelDb: Number("int"), // required
381
- * // speechLevelDb: Number("int"), // required
382
- * // },
383
- * // },
384
- * // transcription: { // MediaTranscriptionFrame
385
- * // type: "transcription", // required
386
- * // party: "caller" || "callee", // required
387
- * // id: "STRING_VALUE", // required
388
- * // final: true || false, // required
389
- * // text: "STRING_VALUE", // required
390
- * // startMs: Number("int"), // required
391
- * // endMs: Number("int"), // required
392
- * // language: "STRING_VALUE", // required
393
- * // confidence: Number("double"),
394
- * // },
395
- * // audioBegin: { // MediaAudioBeginFrame
396
- * // type: "audio.begin", // required
397
- * // replyId: "STRING_VALUE", // required
398
- * // streamId: "STRING_VALUE", // required
399
- * // sampleRate: Number("int"), // required
400
- * // },
401
- * // audio: new Uint8Array(),
402
- * // audioEnd: { // MediaAudioEndFrame
403
- * // type: "audio.end", // required
404
- * // streamId: "STRING_VALUE", // required
405
- * // },
406
- * // stop: { // MediaStopFrame
407
- * // type: "stop", // required
408
- * // },
409
- * // duck: { // MediaDuckFrame
410
- * // type: "duck", // required
411
- * // replyId: "STRING_VALUE", // required
412
- * // volumeDb: Number("int"), // required
413
- * // rampMs: Number("int"), // required
414
- * // },
415
- * // restore: { // MediaRestoreFrame
416
- * // type: "restore", // required
417
- * // replyId: "STRING_VALUE", // required
418
- * // rampMs: Number("int"), // required
419
- * // },
420
- * // language: { // MediaLanguageFrame
421
- * // type: "language", // required
422
- * // language: "STRING_VALUE", // required
423
- * // },
424
- * // transfer: { // MediaTransferFrame
425
- * // type: "transfer", // required
426
- * // context: "STRING_VALUE", // required
427
- * // extension: "STRING_VALUE", // required
428
- * // },
429
- * // hangup: { // MediaHangupFrame
430
- * // type: "hangup", // required
431
- * // },
432
- * // error: { // MediaErrorFrame
433
- * // type: "error", // required
434
- * // code: "STRING_VALUE", // required
435
- * // retryable: true || false, // required
436
- * // message: "STRING_VALUE", // required
437
- * // },
438
- * // finished: { // MediaFinishedFrame
439
- * // type: "finished", // required
259
+ * // vad: { // VoiceCallVadFrame
260
+ * // type: "start" || "vad" || "dtmf" || "playback" || "end", // required
261
+ * // speaking: true || false, // required
262
+ * // energyDb: Number("double"), // required
263
+ * // atMs: Number("int"), // required
264
+ * // },
265
+ * // dtmf: { // VoiceCallDtmfFrame
266
+ * // type: "start" || "vad" || "dtmf" || "playback" || "end", // required
267
+ * // id: "STRING_VALUE", // required
268
+ * // digits: "STRING_VALUE", // required
269
+ * // },
270
+ * // playback: { // VoiceCallPlaybackFrame
271
+ * // type: "start" || "vad" || "dtmf" || "playback" || "end", // required
272
+ * // replyId: "STRING_VALUE", // required
273
+ * // streamId: "STRING_VALUE", // required
274
+ * // event: "started" || "finished" || "stopped", // required
275
+ * // atMs: Number("int"), // required
276
+ * // playedMs: Number("int"),
277
+ * // dropped: true || false,
278
+ * // },
279
+ * // end: { // VoiceCallEndFrame
280
+ * // type: "start" || "vad" || "dtmf" || "playback" || "end", // required
281
+ * // reason: "caller-hangup" || "agent-hangup" || "agent-transfer" || "timeout", // required
282
+ * // },
283
+ * // started: { // VoiceCallStartedFrame
284
+ * // type: "started" || "transcription" || "audio.begin" || "audio.end" || "stop" || "duck" || "language" || "transfer" || "hangup" || "error" || "ended", // required
285
+ * // connectionId: "STRING_VALUE", // required
286
+ * // agentName: "STRING_VALUE", // required
287
+ * // groupId: "STRING_VALUE",
288
+ * // backgroundSound: "STRING_VALUE",
289
+ * // voiceDetection: { // VoiceDetectionSettings
290
+ * // silenceMs: Number("int"),
291
+ * // silenceLevelDb: Number("int"),
292
+ * // speechLevelDb: Number("int"),
440
293
  * // },
441
294
  * // },
295
+ * // transcription: { // VoiceCallTranscriptionFrame
296
+ * // type: "started" || "transcription" || "audio.begin" || "audio.end" || "stop" || "duck" || "language" || "transfer" || "hangup" || "error" || "ended", // required
297
+ * // party: "caller" || "callee", // required
298
+ * // id: "STRING_VALUE", // required
299
+ * // final: true || false, // required
300
+ * // text: "STRING_VALUE", // required
301
+ * // startMs: Number("int"), // required
302
+ * // endMs: Number("int"), // required
303
+ * // language: "STRING_VALUE", // required
304
+ * // confidence: Number("double"),
305
+ * // },
306
+ * // audioBegin: { // VoiceCallAudioBeginFrame
307
+ * // type: "started" || "transcription" || "audio.begin" || "audio.end" || "stop" || "duck" || "language" || "transfer" || "hangup" || "error" || "ended", // required
308
+ * // replyId: "STRING_VALUE", // required
309
+ * // streamId: "STRING_VALUE", // required
310
+ * // sampleRate: Number("int"), // required
311
+ * // },
312
+ * // audioEnd: { // VoiceCallAudioEndFrame
313
+ * // type: "started" || "transcription" || "audio.begin" || "audio.end" || "stop" || "duck" || "language" || "transfer" || "hangup" || "error" || "ended", // required
314
+ * // streamId: "STRING_VALUE", // required
315
+ * // },
316
+ * // stop: { // VoiceCallStopFrame
317
+ * // type: "started" || "transcription" || "audio.begin" || "audio.end" || "stop" || "duck" || "language" || "transfer" || "hangup" || "error" || "ended", // required
318
+ * // },
319
+ * // duck: { // VoiceCallDuckFrame
320
+ * // type: "started" || "transcription" || "audio.begin" || "audio.end" || "stop" || "duck" || "language" || "transfer" || "hangup" || "error" || "ended", // required
321
+ * // replyId: "STRING_VALUE", // required
322
+ * // volumeDb: Number("int"), // required
323
+ * // rampMs: Number("int"), // required
324
+ * // },
325
+ * // language: { // VoiceCallLanguageFrame
326
+ * // type: "started" || "transcription" || "audio.begin" || "audio.end" || "stop" || "duck" || "language" || "transfer" || "hangup" || "error" || "ended", // required
327
+ * // language: "STRING_VALUE", // required
328
+ * // },
329
+ * // transfer: { // VoiceCallTransferFrame
330
+ * // context: "STRING_VALUE", // required
331
+ * // extension: "STRING_VALUE", // required
332
+ * // type: "started" || "transcription" || "audio.begin" || "audio.end" || "stop" || "duck" || "language" || "transfer" || "hangup" || "error" || "ended", // required
333
+ * // },
334
+ * // hangup: { // VoiceCallHangupFrame
335
+ * // type: "started" || "transcription" || "audio.begin" || "audio.end" || "stop" || "duck" || "language" || "transfer" || "hangup" || "error" || "ended", // required
336
+ * // },
337
+ * // error: { // VoiceCallErrorFrame
338
+ * // type: "started" || "transcription" || "audio.begin" || "audio.end" || "stop" || "duck" || "language" || "transfer" || "hangup" || "error" || "ended", // required
339
+ * // code: "STRING_VALUE", // required
340
+ * // retryable: true || false, // required
341
+ * // message: "STRING_VALUE", // required
342
+ * // },
343
+ * // ended: { // VoiceCallEndedFrame
344
+ * // type: "started" || "transcription" || "audio.begin" || "audio.end" || "stop" || "duck" || "language" || "transfer" || "hangup" || "error" || "ended", // required
345
+ * // },
442
346
  * // },
443
347
  * // };
444
348
  *