@wildix/wilma-voice-client 0.0.51 → 0.0.53

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.
@@ -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 messages of the voice protocols: the text socket `/v2/voice/ws`, the call socket `/v2/voice/calls/ws` and the call events stream `StreamCallEvents`. Utility method; the generated shapes are the source of truth for building a client or a 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
@@ -40,297 +40,161 @@ declare const DescribeVoiceProtocolCommand_base: {
40
40
  * const command = new DescribeVoiceProtocolCommand(input);
41
41
  * const response = await client.send(command);
42
42
  * // { // DescribeVoiceProtocolOutput
43
- * // connectParams: { // VoiceConnectParams
44
- * // protocolVersion: Number("int"),
45
- * // sessionId: "STRING_VALUE", // required
46
- * // resume: true || false,
47
- * // reconnect: true || false,
48
- * // agentId: "STRING_VALUE", // required
49
- * // agentVersion: Number("int"),
50
- * // agentDraft: true || false,
51
- * // callId: "STRING_VALUE",
52
- * // flowIndex: Number("int"),
53
- * // dialedNumber: "STRING_VALUE",
54
- * // language: "STRING_VALUE",
55
- * // callerName: "STRING_VALUE",
56
- * // callerNumber: "STRING_VALUE",
57
- * // callerEmail: "STRING_VALUE",
58
- * // callerCompany: "STRING_VALUE",
59
- * // voice: "STRING_VALUE",
60
- * // initialMessage: "STRING_VALUE",
61
- * // 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
- * // },
73
- * // },
74
- * // audioWebsocketEvent: { // AudioWebsocketEvent
75
- * // 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
- * // },
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
- * // },
93
- * // },
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
- * // },
105
- * // },
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
- * // },
116
- * // },
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
- * // },
127
- * // },
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
- * // },
145
- * // },
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
- * // },
152
- * // },
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
43
+ * // textSocket: { // VoiceTextProtocolFrames
44
+ * // connectParams: { // VoiceConnectParams
45
+ * // protocolVersion: Number("int"),
158
46
  * // sessionId: "STRING_VALUE", // required
47
+ * // resume: true || false,
159
48
  * // agentId: "STRING_VALUE", // required
160
49
  * // 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
50
+ * // agentDraft: true || false,
51
+ * // callId: "STRING_VALUE",
52
+ * // flowIndex: Number("int"),
53
+ * // dialedNumber: "STRING_VALUE",
54
+ * // language: "STRING_VALUE",
55
+ * // callerName: "STRING_VALUE",
56
+ * // callerNumber: "STRING_VALUE",
57
+ * // callerEmail: "STRING_VALUE",
58
+ * // callerCompany: "STRING_VALUE",
59
+ * // voice: "STRING_VALUE",
60
+ * // initialMessage: "STRING_VALUE",
61
+ * // variables: "STRING_VALUE",
62
+ * // inputMode: "transcription",
63
+ * // user: "STRING_VALUE",
64
+ * // company: "STRING_VALUE",
65
+ * // },
66
+ * // client: { // VoiceTextClientFrames
67
+ * // healthcheck: { // VoiceHealthcheckCommand
68
+ * // type: "STRING_VALUE", // required
172
69
  * // },
173
- * // backgroundSound: "STRING_VALUE",
174
- * // inputAudio: {
175
- * // encoding: "pcm_s16le" || "mulaw" || "alaw" || "opus", // required
176
- * // sampleRate: Number("int"), // required
177
- * // channels: Number("int"),
70
+ * // transcription: { // VoiceTranscriptionEvent
71
+ * // type: "started" || "ended" || "error" || "transcription" || "agentTranscription" || "reply" || "playback" || "interruption" || "complete" || "thinking" || "tool", // required
72
+ * // id: "STRING_VALUE",
73
+ * // text: "STRING_VALUE", // required
74
+ * // confidence: Number("double"),
75
+ * // final: true || false,
76
+ * // language: "STRING_VALUE",
77
+ * // time: Number("long"),
178
78
  * // },
179
- * // outputAudio: {
180
- * // encoding: "pcm_s16le" || "mulaw" || "alaw" || "opus", // required
181
- * // sampleRate: Number("int"), // required
182
- * // channels: Number("int"),
79
+ * // agentTranscription: { // VoiceAgentTranscriptionEvent
80
+ * // type: "started" || "ended" || "error" || "transcription" || "agentTranscription" || "reply" || "playback" || "interruption" || "complete" || "thinking" || "tool", // required
81
+ * // id: "STRING_VALUE",
82
+ * // text: "STRING_VALUE", // required
83
+ * // confidence: Number("double"),
84
+ * // final: true || false,
85
+ * // language: "STRING_VALUE",
86
+ * // time: Number("long"),
87
+ * // },
88
+ * // reply: { // VoiceReplyEvent
89
+ * // type: "started" || "ended" || "error" || "transcription" || "agentTranscription" || "reply" || "playback" || "interruption" || "complete" || "thinking" || "tool", // required
90
+ * // id: "STRING_VALUE",
91
+ * // text: "STRING_VALUE", // required
92
+ * // time: Number("long"),
93
+ * // language: "STRING_VALUE",
94
+ * // confidence: Number("double"),
95
+ * // startTime: Number("long"),
96
+ * // endTime: Number("long"),
97
+ * // },
98
+ * // playback: { // VoicePlaybackEvent
99
+ * // type: "started" || "ended" || "error" || "transcription" || "agentTranscription" || "reply" || "playback" || "interruption" || "complete" || "thinking" || "tool", // required
100
+ * // replyId: "STRING_VALUE",
101
+ * // text: "STRING_VALUE",
102
+ * // complete: true || false, // required
103
+ * // startTime: Number("long"),
104
+ * // endTime: Number("long"),
105
+ * // },
106
+ * // interruption: { // VoiceInterruptionEvent
107
+ * // type: "started" || "ended" || "error" || "transcription" || "agentTranscription" || "reply" || "playback" || "interruption" || "complete" || "thinking" || "tool", // required
108
+ * // replyId: "STRING_VALUE",
109
+ * // playedText: "STRING_VALUE",
110
+ * // originalText: "STRING_VALUE",
111
+ * // time: Number("long"),
112
+ * // },
113
+ * // complete: { // VoiceCompleteEvent
114
+ * // type: "started" || "ended" || "error" || "transcription" || "agentTranscription" || "reply" || "playback" || "interruption" || "complete" || "thinking" || "tool", // required
115
+ * // reason: "STRING_VALUE",
116
+ * // time: Number("long"),
183
117
  * // },
184
118
  * // },
185
- * // },
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
- * // },
194
- * // },
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
- * // },
203
- * // },
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
119
+ * // server: { // VoiceTextServerFrames
120
+ * // started: { // VoiceSessionStartedEvent
121
+ * // type: "started" || "ended" || "error" || "transcription" || "agentTranscription" || "reply" || "playback" || "interruption" || "complete" || "thinking" || "tool", // required
122
+ * // time: Number("long"), // required
123
+ * // sessionId: "STRING_VALUE", // required
124
+ * // agentId: "STRING_VALUE", // required
125
+ * // agentVersion: Number("int"),
126
+ * // traceId: "STRING_VALUE",
127
+ * // agentName: "STRING_VALUE",
128
+ * // category: "STRING_VALUE",
129
+ * // groupId: "STRING_VALUE",
130
+ * // speech: { // VoiceSpeechPayload
131
+ * // engine: "STRING_VALUE", // required
132
+ * // languages: [ // LanguageCodeList // required
133
+ * // "STRING_VALUE",
134
+ * // ],
135
+ * // preferredLanguage: "STRING_VALUE", // required
136
+ * // autoDetect: true || false, // required
137
+ * // },
138
+ * // backgroundSound: "STRING_VALUE",
139
+ * // },
140
+ * // ended: { // VoiceSessionEndedEvent
141
+ * // type: "started" || "ended" || "error" || "transcription" || "agentTranscription" || "reply" || "playback" || "interruption" || "complete" || "thinking" || "tool", // required
142
+ * // reason: "STRING_VALUE",
143
+ * // error: "STRING_VALUE",
144
+ * // time: Number("long"), // required
145
+ * // },
146
+ * // error: { // VoiceErrorEvent
147
+ * // type: "started" || "ended" || "error" || "transcription" || "agentTranscription" || "reply" || "playback" || "interruption" || "complete" || "thinking" || "tool", // required
148
+ * // code: "STRING_VALUE", // required
149
+ * // message: "STRING_VALUE", // required
150
+ * // time: Number("long"), // required
151
+ * // },
152
+ * // say: { // VoiceSayCommand
153
+ * // text: "STRING_VALUE", // required
154
+ * // replyId: "STRING_VALUE", // required
155
+ * // interruptible: true || false,
156
+ * // audio: { // VoiceSayCommandAudioOptions
157
+ * // streamId: "STRING_VALUE", // required
158
+ * // sampleRate: Number("int"), // required
159
+ * // },
160
+ * // type: "say" || "play" || "stop" || "hangup" || "transfer", // required
161
+ * // },
162
+ * // play: { // VoicePlayCommand
163
+ * // replyId: "STRING_VALUE", // required
212
164
  * // streamId: "STRING_VALUE", // required
213
- * // sampleRate: Number("int"), // required
165
+ * // data: "STRING_VALUE", // required
166
+ * // type: "say" || "play" || "stop" || "hangup" || "transfer", // required
167
+ * // },
168
+ * // stop: { // VoiceStopCommand
169
+ * // type: "say" || "play" || "stop" || "hangup" || "transfer", // required
170
+ * // },
171
+ * // hangup: { // VoiceHangupCommand
172
+ * // reason: "STRING_VALUE",
173
+ * // type: "say" || "play" || "stop" || "hangup" || "transfer", // required
174
+ * // },
175
+ * // transfer: { // VoiceTransferCommand
176
+ * // context: "STRING_VALUE", // required
177
+ * // extension: "STRING_VALUE", // required
178
+ * // type: "say" || "play" || "stop" || "hangup" || "transfer", // required
214
179
  * // },
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
222
- * // streamId: "STRING_VALUE", // required
223
- * // data: "STRING_VALUE", // required
224
- * // type: "say" || "play" || "stop" || "hangup" || "transfer", // required
225
- * // },
226
- * // },
227
- * // stopWebsocketCommand: { // StopWebsocketCommand
228
- * // type: "STRING_VALUE", // required
229
- * // command: { // StopCommandData
230
- * // type: "say" || "play" || "stop" || "hangup" || "transfer", // required
231
- * // },
232
- * // },
233
- * // hangupWebsocketCommand: { // HangupWebsocketCommand
234
- * // type: "STRING_VALUE", // required
235
- * // command: { // HangupCommandData
236
- * // reason: "STRING_VALUE",
237
- * // type: "say" || "play" || "stop" || "hangup" || "transfer", // required
238
- * // },
239
- * // },
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
- * // },
247
- * // },
248
- * // callEvent: { // VoiceCallEvent Union: only one key present
249
- * // started: { // VoiceCallStartedEvent
250
- * // sessionId: "STRING_VALUE", // required
251
- * // traceId: "STRING_VALUE",
252
- * // agentId: "STRING_VALUE", // required
253
- * // agentName: "STRING_VALUE",
254
- * // agentVersion: Number("int"),
255
- * // agentDraft: true || false,
256
- * // language: "STRING_VALUE",
257
- * // },
258
- * // transcription: { // VoiceCallTranscriptionEvent
259
- * // id: "STRING_VALUE", // required
260
- * // text: "STRING_VALUE", // required
261
- * // final: true || false, // required
262
- * // language: "STRING_VALUE",
263
- * // time: Number("long"),
264
- * // dropped: "low_confidence" || "other_speaker",
265
- * // },
266
- * // agentTranscription: { // VoiceCallAgentTranscriptionEvent
267
- * // id: "STRING_VALUE", // required
268
- * // text: "STRING_VALUE", // required
269
- * // final: true || false, // required
270
- * // language: "STRING_VALUE",
271
- * // time: Number("long"),
272
- * // },
273
- * // reply: { // VoiceCallReplyEvent
274
- * // id: "STRING_VALUE", // required
275
- * // text: "STRING_VALUE", // required
276
- * // language: "STRING_VALUE",
277
- * // },
278
- * // say: { // VoiceCallSayEvent
279
- * // replyId: "STRING_VALUE", // required
280
- * // text: "STRING_VALUE", // required
281
- * // interruptible: true || false, // required
282
- * // },
283
- * // playback: { // VoiceCallPlaybackEvent
284
- * // replyId: "STRING_VALUE", // required
285
- * // complete: true || false, // required
286
- * // },
287
- * // interruption: { // VoiceCallInterruptionEvent
288
- * // replyId: "STRING_VALUE",
289
- * // playedText: "STRING_VALUE",
290
- * // originalText: "STRING_VALUE",
291
- * // },
292
- * // language: { // VoiceCallLanguageEvent
293
- * // from: "STRING_VALUE",
294
- * // to: "STRING_VALUE", // required
295
- * // reason: "STRING_VALUE", // required
296
- * // },
297
- * // tool: { // VoiceCallToolEvent
298
- * // toolCallId: "STRING_VALUE", // required
299
- * // toolName: "STRING_VALUE", // required
300
- * // phase: "started" || "finished", // required
301
- * // startMessage: "STRING_VALUE",
302
- * // },
303
- * // ended: { // VoiceCallEndedEvent
304
- * // sessionId: "STRING_VALUE", // required
305
- * // reason: "hangup" || "transfer" || "timeout" || "error" || "complete", // required
306
180
  * // },
307
181
  * // },
308
- * // media: { // MediaProtocolFrames
309
- * // pbx: { // MediaPbxFrames
310
- * // start: { // MediaStartFrame
311
- * // type: "start", // required
312
- * // purpose: "agent" || "transcription", // required
182
+ * // callSocket: { // VoiceCallProtocolFrames
183
+ * // client: { // VoiceCallClientFrames
184
+ * // start: { // VoiceCallStartFrame
185
+ * // type: "start" || "vad" || "dtmf" || "playback" || "end", // required
313
186
  * // callId: "STRING_VALUE", // required
314
187
  * // flowIndex: Number("int"), // required
315
188
  * // sessionId: "STRING_VALUE", // required
316
189
  * // resume: true || false, // required
317
190
  * // 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
191
+ * // agent: { // VoiceCallStartAgent
324
192
  * // id: "STRING_VALUE", // required
325
193
  * // draft: true || false,
326
194
  * // version: Number("int"),
327
195
  * // },
328
- * // languages: [ // MediaStartLanguageList
329
- * // "STRING_VALUE",
330
- * // ],
331
- * // preferredLanguage: "STRING_VALUE",
332
- * // autoDetect: true || false,
333
- * // caller: { // MediaStartCaller
196
+ * // language: "STRING_VALUE", // required
197
+ * // caller: { // VoiceCallStartCaller
334
198
  * // name: "STRING_VALUE",
335
199
  * // number: "STRING_VALUE",
336
200
  * // email: "STRING_VALUE",
@@ -339,50 +203,49 @@ declare const DescribeVoiceProtocolCommand_base: {
339
203
  * // dialedNumber: "STRING_VALUE",
340
204
  * // variables: "STRING_VALUE",
341
205
  * // },
342
- * // audio: new Uint8Array(),
343
- * // vad: { // MediaVadFrame
344
- * // type: "vad", // required
345
- * // party: "caller" || "callee", // required
206
+ * // vad: { // VoiceCallVadFrame
207
+ * // type: "start" || "vad" || "dtmf" || "playback" || "end", // required
346
208
  * // speaking: true || false, // required
347
209
  * // energyDb: Number("double"), // required
348
210
  * // atMs: Number("int"), // required
349
211
  * // },
350
- * // dtmf: { // MediaDtmfFrame
351
- * // type: "dtmf", // required
212
+ * // dtmf: { // VoiceCallDtmfFrame
213
+ * // type: "start" || "vad" || "dtmf" || "playback" || "end", // required
352
214
  * // id: "STRING_VALUE", // required
353
215
  * // digits: "STRING_VALUE", // required
354
216
  * // },
355
- * // playback: { // MediaPlaybackFrame
356
- * // type: "playback", // required
217
+ * // playback: { // VoiceCallPlaybackFrame
218
+ * // type: "start" || "vad" || "dtmf" || "playback" || "end", // required
357
219
  * // replyId: "STRING_VALUE", // required
358
220
  * // streamId: "STRING_VALUE", // required
359
221
  * // event: "started" || "finished" || "stopped", // required
360
222
  * // atMs: Number("int"), // required
361
223
  * // playedMs: Number("int"),
362
- * // cause: "cloud" || "caller" || "drop",
224
+ * // dropped: true || false,
363
225
  * // },
364
- * // finish: { // MediaFinishFrame
365
- * // type: "finish", // required
366
- * // reason: "caller-hangup" || "callee-hangup" || "agent-hangup" || "agent-transfer" || "timeout", // required
226
+ * // end: { // VoiceCallEndFrame
227
+ * // type: "start" || "vad" || "dtmf" || "playback" || "end", // required
228
+ * // reason: "caller-hangup" || "agent-hangup" || "agent-transfer" || "timeout", // required
367
229
  * // },
368
230
  * // },
369
- * // cloud: { // MediaCloudFrames
370
- * // started: { // MediaStartedFrame
371
- * // type: "started", // required
372
- * // streamId: "STRING_VALUE", // required
373
- * // agent: { // MediaStartedAgent
231
+ * // server: { // VoiceCallServerFrames
232
+ * // started: { // VoiceCallStartedFrame
233
+ * // type: "started" || "transcription" || "audio.begin" || "audio.end" || "stop" || "duck" || "language" || "transfer" || "hangup" || "error" || "ended", // required
234
+ * // connectionId: "STRING_VALUE", // required
235
+ * // agent: { // VoiceCallStartedAgent
236
+ * // id: "STRING_VALUE", // required
374
237
  * // name: "STRING_VALUE", // required
238
+ * // groupId: "STRING_VALUE",
375
239
  * // },
376
- * // groupId: "STRING_VALUE",
377
240
  * // backgroundSound: "STRING_VALUE",
378
- * // voiceDetection: { // MediaVoiceDetection
379
- * // silenceMs: Number("int"), // required
380
- * // silenceLevelDb: Number("int"), // required
381
- * // speechLevelDb: Number("int"), // required
241
+ * // voiceDetection: { // VoiceDetectionSettings
242
+ * // silenceMs: Number("int"),
243
+ * // silenceLevelDb: Number("int"),
244
+ * // speechLevelDb: Number("int"),
382
245
  * // },
383
246
  * // },
384
- * // transcription: { // MediaTranscriptionFrame
385
- * // type: "transcription", // required
247
+ * // transcription: { // VoiceCallTranscriptionFrame
248
+ * // type: "started" || "transcription" || "audio.begin" || "audio.end" || "stop" || "duck" || "language" || "transfer" || "hangup" || "error" || "ended", // required
386
249
  * // party: "caller" || "callee", // required
387
250
  * // id: "STRING_VALUE", // required
388
251
  * // final: true || false, // required
@@ -392,54 +255,108 @@ declare const DescribeVoiceProtocolCommand_base: {
392
255
  * // language: "STRING_VALUE", // required
393
256
  * // confidence: Number("double"),
394
257
  * // },
395
- * // audioBegin: { // MediaAudioBeginFrame
396
- * // type: "audio.begin", // required
258
+ * // audioBegin: { // VoiceCallAudioBeginFrame
259
+ * // type: "started" || "transcription" || "audio.begin" || "audio.end" || "stop" || "duck" || "language" || "transfer" || "hangup" || "error" || "ended", // required
397
260
  * // replyId: "STRING_VALUE", // required
398
261
  * // streamId: "STRING_VALUE", // required
399
262
  * // sampleRate: Number("int"), // required
400
263
  * // },
401
- * // audio: new Uint8Array(),
402
- * // audioEnd: { // MediaAudioEndFrame
403
- * // type: "audio.end", // required
264
+ * // audioEnd: { // VoiceCallAudioEndFrame
265
+ * // type: "started" || "transcription" || "audio.begin" || "audio.end" || "stop" || "duck" || "language" || "transfer" || "hangup" || "error" || "ended", // required
404
266
  * // streamId: "STRING_VALUE", // required
405
267
  * // },
406
- * // stop: { // MediaStopFrame
407
- * // type: "stop", // required
268
+ * // stop: { // VoiceCallStopFrame
269
+ * // type: "started" || "transcription" || "audio.begin" || "audio.end" || "stop" || "duck" || "language" || "transfer" || "hangup" || "error" || "ended", // required
408
270
  * // },
409
- * // duck: { // MediaDuckFrame
410
- * // type: "duck", // required
271
+ * // duck: { // VoiceCallDuckFrame
272
+ * // type: "started" || "transcription" || "audio.begin" || "audio.end" || "stop" || "duck" || "language" || "transfer" || "hangup" || "error" || "ended", // required
411
273
  * // replyId: "STRING_VALUE", // required
412
274
  * // volumeDb: Number("int"), // required
413
275
  * // rampMs: Number("int"), // required
414
276
  * // },
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
277
+ * // language: { // VoiceCallLanguageFrame
278
+ * // type: "started" || "transcription" || "audio.begin" || "audio.end" || "stop" || "duck" || "language" || "transfer" || "hangup" || "error" || "ended", // required
422
279
  * // language: "STRING_VALUE", // required
423
280
  * // },
424
- * // transfer: { // MediaTransferFrame
425
- * // type: "transfer", // required
281
+ * // transfer: { // VoiceCallTransferFrame
426
282
  * // context: "STRING_VALUE", // required
427
283
  * // extension: "STRING_VALUE", // required
284
+ * // type: "started" || "transcription" || "audio.begin" || "audio.end" || "stop" || "duck" || "language" || "transfer" || "hangup" || "error" || "ended", // required
428
285
  * // },
429
- * // hangup: { // MediaHangupFrame
430
- * // type: "hangup", // required
286
+ * // hangup: { // VoiceCallHangupFrame
287
+ * // type: "started" || "transcription" || "audio.begin" || "audio.end" || "stop" || "duck" || "language" || "transfer" || "hangup" || "error" || "ended", // required
431
288
  * // },
432
- * // error: { // MediaErrorFrame
433
- * // type: "error", // required
289
+ * // error: { // VoiceCallErrorFrame
290
+ * // type: "started" || "transcription" || "audio.begin" || "audio.end" || "stop" || "duck" || "language" || "transfer" || "hangup" || "error" || "ended", // required
434
291
  * // code: "STRING_VALUE", // required
435
292
  * // retryable: true || false, // required
436
293
  * // message: "STRING_VALUE", // required
437
294
  * // },
438
- * // finished: { // MediaFinishedFrame
439
- * // type: "finished", // required
295
+ * // ended: { // VoiceCallEndedFrame
296
+ * // type: "started" || "transcription" || "audio.begin" || "audio.end" || "stop" || "duck" || "language" || "transfer" || "hangup" || "error" || "ended", // required
440
297
  * // },
441
298
  * // },
442
299
  * // },
300
+ * // callEvent: { // VoiceCallEvent Union: only one key present
301
+ * // started: { // VoiceCallStartedEvent
302
+ * // sessionId: "STRING_VALUE", // required
303
+ * // traceId: "STRING_VALUE",
304
+ * // agentId: "STRING_VALUE", // required
305
+ * // agentName: "STRING_VALUE",
306
+ * // agentVersion: Number("int"),
307
+ * // agentDraft: true || false,
308
+ * // language: "STRING_VALUE",
309
+ * // },
310
+ * // transcription: { // VoiceCallTranscriptionEvent
311
+ * // id: "STRING_VALUE", // required
312
+ * // text: "STRING_VALUE", // required
313
+ * // final: true || false, // required
314
+ * // language: "STRING_VALUE",
315
+ * // time: Number("long"),
316
+ * // finalDropReason: "low_confidence" || "other_speaker",
317
+ * // },
318
+ * // agentTranscription: { // VoiceCallAgentTranscriptionEvent
319
+ * // id: "STRING_VALUE", // required
320
+ * // text: "STRING_VALUE", // required
321
+ * // final: true || false, // required
322
+ * // language: "STRING_VALUE",
323
+ * // time: Number("long"),
324
+ * // },
325
+ * // reply: { // VoiceCallReplyEvent
326
+ * // id: "STRING_VALUE", // required
327
+ * // text: "STRING_VALUE", // required
328
+ * // language: "STRING_VALUE",
329
+ * // },
330
+ * // say: { // VoiceCallSayEvent
331
+ * // replyId: "STRING_VALUE", // required
332
+ * // text: "STRING_VALUE", // required
333
+ * // interruptible: true || false, // required
334
+ * // },
335
+ * // playback: { // VoiceCallPlaybackEvent
336
+ * // replyId: "STRING_VALUE", // required
337
+ * // complete: true || false, // required
338
+ * // },
339
+ * // interruption: { // VoiceCallInterruptionEvent
340
+ * // replyId: "STRING_VALUE",
341
+ * // playedText: "STRING_VALUE",
342
+ * // originalText: "STRING_VALUE",
343
+ * // },
344
+ * // language: { // VoiceCallLanguageEvent
345
+ * // from: "STRING_VALUE",
346
+ * // to: "STRING_VALUE", // required
347
+ * // reason: "STRING_VALUE", // required
348
+ * // },
349
+ * // tool: { // VoiceCallToolEvent
350
+ * // toolCallId: "STRING_VALUE", // required
351
+ * // toolName: "STRING_VALUE", // required
352
+ * // phase: "started" || "finished", // required
353
+ * // startMessage: "STRING_VALUE",
354
+ * // },
355
+ * // ended: { // VoiceCallEndedEvent
356
+ * // sessionId: "STRING_VALUE", // required
357
+ * // reason: "hangup" || "transfer" || "timeout" || "error" || "complete", // required
358
+ * // },
359
+ * // },
443
360
  * // };
444
361
  *
445
362
  * ```