@wildix/wilma-voice-client 0.0.25 → 0.0.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/WilmaVoice.js +4 -0
- package/dist-cjs/commands/ListVoicesCommand.js +20 -0
- package/dist-cjs/commands/TextToSpeechCommand.js +20 -0
- package/dist-cjs/commands/index.js +2 -0
- package/dist-cjs/models/enums.js +5 -1
- package/dist-cjs/schemas/schemas_0.js +95 -16
- package/dist-es/WilmaVoice.js +4 -0
- package/dist-es/commands/ListVoicesCommand.js +16 -0
- package/dist-es/commands/TextToSpeechCommand.js +16 -0
- package/dist-es/commands/index.js +2 -0
- package/dist-es/models/enums.js +4 -0
- package/dist-es/schemas/schemas_0.js +93 -14
- package/dist-types/WilmaVoice.d.ts +14 -0
- package/dist-types/WilmaVoiceClient.d.ts +4 -2
- package/dist-types/commands/DescribeVoiceProtocolCommand.d.ts +12 -0
- package/dist-types/commands/ListVoicesCommand.d.ts +87 -0
- package/dist-types/commands/SendSayCommand.d.ts +1 -0
- package/dist-types/commands/TextToSpeechCommand.d.ts +103 -0
- package/dist-types/commands/index.d.ts +2 -0
- package/dist-types/models/enums.d.ts +18 -0
- package/dist-types/models/models_0.d.ts +205 -2
- package/dist-types/schemas/schemas_0.d.ts +9 -0
- package/package.json +2 -2
|
@@ -13,6 +13,9 @@ const _HCD = "HangupCommandData";
|
|
|
13
13
|
const _HWC = "HangupWebsocketCommand";
|
|
14
14
|
const _IE = "InterruptionEvent";
|
|
15
15
|
const _IWE = "InterruptionWebsocketEvent";
|
|
16
|
+
const _LV = "ListVoices";
|
|
17
|
+
const _LVI = "ListVoicesInput";
|
|
18
|
+
const _LVO = "ListVoicesOutput";
|
|
16
19
|
const _NFE = "NotFoundException";
|
|
17
20
|
const _PCD = "PlayCommandData";
|
|
18
21
|
const _PE = "PlaybackEvent";
|
|
@@ -20,6 +23,7 @@ const _PWC = "PlayWebsocketCommand";
|
|
|
20
23
|
const _PWE = "PlaybackWebsocketEvent";
|
|
21
24
|
const _RE = "ReplyEvent";
|
|
22
25
|
const _RWE = "ReplyWebsocketEvent";
|
|
26
|
+
const _SC = "SpeechCredential";
|
|
23
27
|
const _SCAO = "SayCommandAudioOptions";
|
|
24
28
|
const _SCD = "SayCommandData";
|
|
25
29
|
const _SCDt = "StopCommandData";
|
|
@@ -46,19 +50,30 @@ const _SWC = "SayWebsocketCommand";
|
|
|
46
50
|
const _SWCt = "StopWebsocketCommand";
|
|
47
51
|
const _TCD = "TransferCommandData";
|
|
48
52
|
const _TE = "TranscriptionEvent";
|
|
53
|
+
const _TTS = "TextToSpeech";
|
|
54
|
+
const _TTSI = "TextToSpeechInput";
|
|
55
|
+
const _TTSO = "TextToSpeechOutput";
|
|
49
56
|
const _TWC = "TransferWebsocketCommand";
|
|
50
57
|
const _TWE = "TranscriptionWebsocketEvent";
|
|
58
|
+
const _V = "Voice";
|
|
51
59
|
const _VAF = "VoiceAudioFormat";
|
|
52
60
|
const _VCP = "VoiceConnectParams";
|
|
53
61
|
const _VE = "ValidationException";
|
|
54
62
|
const _VEE = "VoiceErrorEvent";
|
|
55
|
-
const
|
|
63
|
+
const _VL = "VoiceList";
|
|
64
|
+
const _VP = "VoicePronunciation";
|
|
65
|
+
const _VPL = "VoicePronunciationList";
|
|
66
|
+
const _VSP = "VoiceSpeechPayload";
|
|
67
|
+
const _a = "as";
|
|
56
68
|
const _aD = "agentDraft";
|
|
69
|
+
const _aDu = "autoDetect";
|
|
57
70
|
const _aI = "agentId";
|
|
58
71
|
const _aN = "agentName";
|
|
59
72
|
const _aV = "agentVersion";
|
|
60
73
|
const _aWE = "audioWebsocketEvent";
|
|
74
|
+
const _ac = "action";
|
|
61
75
|
const _au = "audio";
|
|
76
|
+
const _bS = "backgroundSound";
|
|
62
77
|
const _c = "client";
|
|
63
78
|
const _cC = "callerCompany";
|
|
64
79
|
const _cE = "callerEmail";
|
|
@@ -75,17 +90,20 @@ const _cod = "code";
|
|
|
75
90
|
const _com = "complete";
|
|
76
91
|
const _con = "context";
|
|
77
92
|
const _conf = "confidence";
|
|
93
|
+
const _cr = "credential";
|
|
78
94
|
const _d = "data";
|
|
79
95
|
const _e = "error";
|
|
80
96
|
const _eT = "endTime";
|
|
81
97
|
const _eWE = "errorWebsocketEvent";
|
|
82
98
|
const _en = "encoding";
|
|
99
|
+
const _eng = "engine";
|
|
83
100
|
const _ev = "event";
|
|
84
101
|
const _ex = "extension";
|
|
85
102
|
const _f = "final";
|
|
86
103
|
const _gI = "groupId";
|
|
87
104
|
const _h = "http";
|
|
88
105
|
const _hE = "httpError";
|
|
106
|
+
const _hQ = "httpQuery";
|
|
89
107
|
const _hWC = "hangupWebsocketCommand";
|
|
90
108
|
const _i = "id";
|
|
91
109
|
const _iA = "inputAudio";
|
|
@@ -94,13 +112,20 @@ const _iMn = "inputMode";
|
|
|
94
112
|
const _iWE = "interruptionWebsocketEvent";
|
|
95
113
|
const _in = "interruptible";
|
|
96
114
|
const _l = "language";
|
|
115
|
+
const _la = "languages";
|
|
97
116
|
const _m = "message";
|
|
117
|
+
const _n = "name";
|
|
118
|
+
const _o = "options";
|
|
98
119
|
const _oA = "outputAudio";
|
|
99
120
|
const _oT = "originalText";
|
|
121
|
+
const _p = "phrase";
|
|
122
|
+
const _pL = "preferredLanguage";
|
|
100
123
|
const _pT = "playedText";
|
|
101
124
|
const _pV = "protocolVersion";
|
|
102
125
|
const _pWC = "playWebsocketCommand";
|
|
103
126
|
const _pWE = "playbackWebsocketEvent";
|
|
127
|
+
const _pr = "provider";
|
|
128
|
+
const _pro = "pronunciations";
|
|
104
129
|
const _r = "reason";
|
|
105
130
|
const _rI = "replyId";
|
|
106
131
|
const _rWE = "replyWebsocketEvent";
|
|
@@ -114,16 +139,21 @@ const _sT = "startTime";
|
|
|
114
139
|
const _sWC = "sayWebsocketCommand";
|
|
115
140
|
const _sWCt = "stopWebsocketCommand";
|
|
116
141
|
const _se = "seq";
|
|
142
|
+
const _sea = "search";
|
|
143
|
+
const _sp = "speech";
|
|
117
144
|
const _t = "type";
|
|
118
145
|
const _tI = "traceId";
|
|
119
146
|
const _tWC = "transferWebsocketCommand";
|
|
120
147
|
const _tWE = "transcriptionWebsocketEvent";
|
|
121
148
|
const _te = "text";
|
|
122
149
|
const _ti = "time";
|
|
123
|
-
const
|
|
150
|
+
const _u = "uri";
|
|
151
|
+
const _v = "voices";
|
|
124
152
|
const _va = "variables";
|
|
153
|
+
const _vo = "voice";
|
|
125
154
|
const n0 = "smithy.framework";
|
|
126
155
|
const n1 = "wildix.wilma.voice";
|
|
156
|
+
const n2 = "wildix.wilma.agents";
|
|
127
157
|
import { TypeRegistry } from "@smithy/core/schema";
|
|
128
158
|
import { ForbiddenException, NotFoundException, ValidationException } from "../models/errors";
|
|
129
159
|
import { WilmaVoiceServiceException } from "../models/WilmaVoiceServiceException";
|
|
@@ -153,6 +183,12 @@ export const errorTypeRegistries = [
|
|
|
153
183
|
_s_registry,
|
|
154
184
|
n0_registry,
|
|
155
185
|
];
|
|
186
|
+
var SpeechCredential = [0, n1, _SC, 8, 0];
|
|
187
|
+
export var VoicePronunciation$ = [3, n2, _VP,
|
|
188
|
+
0,
|
|
189
|
+
[_p, _a, _en],
|
|
190
|
+
[0, 0, 0], 2
|
|
191
|
+
];
|
|
156
192
|
export var AudioEvent$ = [3, n1, _AE,
|
|
157
193
|
0,
|
|
158
194
|
[_t, _d, _se],
|
|
@@ -175,7 +211,7 @@ export var CompleteWebsocketEvent$ = [3, n1, _CWE,
|
|
|
175
211
|
];
|
|
176
212
|
export var ControlEvent$ = [3, n1, _CEo,
|
|
177
213
|
0,
|
|
178
|
-
[_t,
|
|
214
|
+
[_t, _ac],
|
|
179
215
|
[0, 0], 2
|
|
180
216
|
];
|
|
181
217
|
export var ControlWebsocketEvent$ = [3, n1, _CWEo,
|
|
@@ -218,6 +254,16 @@ export var InterruptionWebsocketEvent$ = [3, n1, _IWE,
|
|
|
218
254
|
[_t, _ev],
|
|
219
255
|
[0, () => InterruptionEvent$], 2
|
|
220
256
|
];
|
|
257
|
+
export var ListVoicesInput$ = [3, n1, _LVI,
|
|
258
|
+
0,
|
|
259
|
+
[_pr, _l, _sea, _cr],
|
|
260
|
+
[[0, { [_hQ]: _pr }], [0, { [_hQ]: _l }], [0, { [_hQ]: _sea }], [() => SpeechCredential, { [_hQ]: _cr }]], 1
|
|
261
|
+
];
|
|
262
|
+
export var ListVoicesOutput$ = [3, n1, _LVO,
|
|
263
|
+
0,
|
|
264
|
+
[_v],
|
|
265
|
+
[() => VoiceList], 1
|
|
266
|
+
];
|
|
221
267
|
export var PlaybackEvent$ = [3, n1, _PE,
|
|
222
268
|
0,
|
|
223
269
|
[_t, _rI, _te, _com, _sT, _eT],
|
|
@@ -240,8 +286,8 @@ export var PlayWebsocketCommand$ = [3, n1, _PWC,
|
|
|
240
286
|
];
|
|
241
287
|
export var ReplyEvent$ = [3, n1, _RE,
|
|
242
288
|
0,
|
|
243
|
-
[_t, _i, _te, _sT, _eT],
|
|
244
|
-
[0, 0, 0, 1, 1], 5
|
|
289
|
+
[_t, _i, _te, _sT, _eT, _l],
|
|
290
|
+
[0, 0, 0, 1, 1, 0], 5
|
|
245
291
|
];
|
|
246
292
|
export var ReplyWebsocketEvent$ = [3, n1, _RWE,
|
|
247
293
|
0,
|
|
@@ -255,8 +301,8 @@ export var SayCommandAudioOptions$ = [3, n1, _SCAO,
|
|
|
255
301
|
];
|
|
256
302
|
export var SayCommandData$ = [3, n1, _SCD,
|
|
257
303
|
0,
|
|
258
|
-
[_te, _rI, _t, _in, _au],
|
|
259
|
-
[0, 0, 0, 2, () => SayCommandAudioOptions$], 3
|
|
304
|
+
[_te, _rI, _t, _in, _vo, _au],
|
|
305
|
+
[0, 0, 0, 2, 0, () => SayCommandAudioOptions$], 3
|
|
260
306
|
];
|
|
261
307
|
export var SayWebsocketCommand$ = [3, n1, _SWC,
|
|
262
308
|
0,
|
|
@@ -285,8 +331,8 @@ export var SendPlayOutput$ = [3, n1, _SPO,
|
|
|
285
331
|
];
|
|
286
332
|
export var SendSayInput$ = [3, n1, _SSI,
|
|
287
333
|
0,
|
|
288
|
-
[_te, _rI, _sIe, _in, _au],
|
|
289
|
-
[0, 0, [0, 1], 2, () => SayCommandAudioOptions$], 3
|
|
334
|
+
[_te, _rI, _sIe, _in, _vo, _au],
|
|
335
|
+
[0, 0, [0, 1], 2, 0, () => SayCommandAudioOptions$], 3
|
|
290
336
|
];
|
|
291
337
|
export var SendSayOutput$ = [3, n1, _SSO,
|
|
292
338
|
0,
|
|
@@ -325,8 +371,8 @@ export var SessionEndedWebsocketEvent$ = [3, n1, _SEWE,
|
|
|
325
371
|
];
|
|
326
372
|
export var SessionStartedEvent$ = [3, n1, _SSE,
|
|
327
373
|
0,
|
|
328
|
-
[_t, _ti, _sIe, _aI, _aV, _tI, _aN, _ca, _gI, _iA, _oA],
|
|
329
|
-
[0, 1, 0, 0, 1, 0, 0, 0, 0, () => VoiceAudioFormat$, () => VoiceAudioFormat$], 4
|
|
374
|
+
[_t, _ti, _sIe, _aI, _aV, _tI, _aN, _ca, _gI, _sp, _bS, _iA, _oA],
|
|
375
|
+
[0, 1, 0, 0, 1, 0, 0, 0, 0, () => VoiceSpeechPayload$, 0, () => VoiceAudioFormat$, () => VoiceAudioFormat$], 4
|
|
330
376
|
];
|
|
331
377
|
export var SessionStartedWebsocketEvent$ = [3, n1, _SSWE,
|
|
332
378
|
0,
|
|
@@ -343,10 +389,20 @@ export var StopWebsocketCommand$ = [3, n1, _SWCt,
|
|
|
343
389
|
[_t, _co],
|
|
344
390
|
[0, () => StopCommandData$], 2
|
|
345
391
|
];
|
|
392
|
+
export var TextToSpeechInput$ = [3, n1, _TTSI,
|
|
393
|
+
0,
|
|
394
|
+
[_vo, _l, _te, _pro],
|
|
395
|
+
[0, 0, 0, () => VoicePronunciationList], 3
|
|
396
|
+
];
|
|
397
|
+
export var TextToSpeechOutput$ = [3, n1, _TTSO,
|
|
398
|
+
0,
|
|
399
|
+
[_au],
|
|
400
|
+
[[21, 16]], 1
|
|
401
|
+
];
|
|
346
402
|
export var TranscriptionEvent$ = [3, n1, _TE,
|
|
347
403
|
0,
|
|
348
|
-
[_t, _i, _te, _ti, _conf, _f],
|
|
349
|
-
[0, 0, 0, 1, 1, 2], 4
|
|
404
|
+
[_t, _i, _te, _ti, _conf, _f, _l],
|
|
405
|
+
[0, 0, 0, 1, 1, 2, 0], 4
|
|
350
406
|
];
|
|
351
407
|
export var TranscriptionWebsocketEvent$ = [3, n1, _TWE,
|
|
352
408
|
0,
|
|
@@ -363,6 +419,11 @@ export var TransferWebsocketCommand$ = [3, n1, _TWC,
|
|
|
363
419
|
[_t, _co],
|
|
364
420
|
[0, () => TransferCommandData$], 2
|
|
365
421
|
];
|
|
422
|
+
export var Voice$ = [3, n1, _V,
|
|
423
|
+
0,
|
|
424
|
+
[_u, _n, _o],
|
|
425
|
+
[0, 0, 15], 2
|
|
426
|
+
];
|
|
366
427
|
export var VoiceAudioFormat$ = [3, n1, _VAF,
|
|
367
428
|
0,
|
|
368
429
|
[_en, _sR, _ch],
|
|
@@ -370,7 +431,7 @@ export var VoiceAudioFormat$ = [3, n1, _VAF,
|
|
|
370
431
|
];
|
|
371
432
|
export var VoiceConnectParams$ = [3, n1, _VCP,
|
|
372
433
|
0,
|
|
373
|
-
[_sIe, _aI, _pV, _aV, _aD, _cI, _l, _cN, _cNa, _cE, _cC,
|
|
434
|
+
[_sIe, _aI, _pV, _aV, _aD, _cI, _l, _cN, _cNa, _cE, _cC, _vo, _iM, _va, _iMn, _iA, _oA],
|
|
374
435
|
[0, 0, 1, 1, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, () => VoiceAudioFormat$, () => VoiceAudioFormat$], 2
|
|
375
436
|
];
|
|
376
437
|
export var VoiceErrorEvent$ = [3, n1, _VEE,
|
|
@@ -378,9 +439,24 @@ export var VoiceErrorEvent$ = [3, n1, _VEE,
|
|
|
378
439
|
[_t, _cod, _m, _ti],
|
|
379
440
|
[0, 0, 0, 1], 4
|
|
380
441
|
];
|
|
442
|
+
export var VoiceSpeechPayload$ = [3, n1, _VSP,
|
|
443
|
+
0,
|
|
444
|
+
[_eng, _la, _pL, _aDu],
|
|
445
|
+
[0, 64 | 0, 0, 2], 4
|
|
446
|
+
];
|
|
447
|
+
var LanguageCodeList = 64 | 0;
|
|
448
|
+
var VoicePronunciationList = [1, n2, _VPL,
|
|
449
|
+
0, () => VoicePronunciation$
|
|
450
|
+
];
|
|
451
|
+
var VoiceList = [1, n1, _VL,
|
|
452
|
+
0, () => Voice$
|
|
453
|
+
];
|
|
381
454
|
export var DescribeVoiceProtocol$ = [9, n1, _DVP,
|
|
382
455
|
{ [_h]: ["POST", "/v2/voice/describe", 200] }, () => DescribeVoiceProtocolInput$, () => DescribeVoiceProtocolOutput$
|
|
383
456
|
];
|
|
457
|
+
export var ListVoices$ = [9, n1, _LV,
|
|
458
|
+
{ [_h]: ["GET", "/v2/voice/voices", 200] }, () => ListVoicesInput$, () => ListVoicesOutput$
|
|
459
|
+
];
|
|
384
460
|
export var SendHangup$ = [9, n1, _SH,
|
|
385
461
|
{ [_h]: ["POST", "/v2/voice/sessions/{sessionId}/hangup", 200] }, () => SendHangupInput$, () => SendHangupOutput$
|
|
386
462
|
];
|
|
@@ -396,3 +472,6 @@ export var SendStop$ = [9, n1, _SSe,
|
|
|
396
472
|
export var SendTransfer$ = [9, n1, _ST,
|
|
397
473
|
{ [_h]: ["POST", "/v2/voice/sessions/{sessionId}/transfer", 200] }, () => SendTransferInput$, () => SendTransferOutput$
|
|
398
474
|
];
|
|
475
|
+
export var TextToSpeech$ = [9, n1, _TTS,
|
|
476
|
+
{ [_h]: ["POST", "/v2/voice/text-to-speech", 200] }, () => TextToSpeechInput$, () => TextToSpeechOutput$
|
|
477
|
+
];
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
import type { HttpHandlerOptions as __HttpHandlerOptions } from "@smithy/types";
|
|
2
2
|
import { type DescribeVoiceProtocolCommandInput, type DescribeVoiceProtocolCommandOutput } from "./commands/DescribeVoiceProtocolCommand";
|
|
3
|
+
import { type ListVoicesCommandInput, type ListVoicesCommandOutput } from "./commands/ListVoicesCommand";
|
|
3
4
|
import { type SendHangupCommandInput, type SendHangupCommandOutput } from "./commands/SendHangupCommand";
|
|
4
5
|
import { type SendPlayCommandInput, type SendPlayCommandOutput } from "./commands/SendPlayCommand";
|
|
5
6
|
import { type SendSayCommandInput, type SendSayCommandOutput } from "./commands/SendSayCommand";
|
|
6
7
|
import { type SendStopCommandInput, type SendStopCommandOutput } from "./commands/SendStopCommand";
|
|
7
8
|
import { type SendTransferCommandInput, type SendTransferCommandOutput } from "./commands/SendTransferCommand";
|
|
9
|
+
import { type TextToSpeechCommandInput, type TextToSpeechCommandOutput } from "./commands/TextToSpeechCommand";
|
|
8
10
|
import { WilmaVoiceClient } from "./WilmaVoiceClient";
|
|
9
11
|
export interface WilmaVoice {
|
|
10
12
|
/**
|
|
@@ -14,6 +16,12 @@ export interface WilmaVoice {
|
|
|
14
16
|
describeVoiceProtocol(args: DescribeVoiceProtocolCommandInput, options?: __HttpHandlerOptions): Promise<DescribeVoiceProtocolCommandOutput>;
|
|
15
17
|
describeVoiceProtocol(args: DescribeVoiceProtocolCommandInput, cb: (err: any, data?: DescribeVoiceProtocolCommandOutput) => void): void;
|
|
16
18
|
describeVoiceProtocol(args: DescribeVoiceProtocolCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: DescribeVoiceProtocolCommandOutput) => void): void;
|
|
19
|
+
/**
|
|
20
|
+
* @see {@link ListVoicesCommand}
|
|
21
|
+
*/
|
|
22
|
+
listVoices(args: ListVoicesCommandInput, options?: __HttpHandlerOptions): Promise<ListVoicesCommandOutput>;
|
|
23
|
+
listVoices(args: ListVoicesCommandInput, cb: (err: any, data?: ListVoicesCommandOutput) => void): void;
|
|
24
|
+
listVoices(args: ListVoicesCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: ListVoicesCommandOutput) => void): void;
|
|
17
25
|
/**
|
|
18
26
|
* @see {@link SendHangupCommand}
|
|
19
27
|
*/
|
|
@@ -44,6 +52,12 @@ export interface WilmaVoice {
|
|
|
44
52
|
sendTransfer(args: SendTransferCommandInput, options?: __HttpHandlerOptions): Promise<SendTransferCommandOutput>;
|
|
45
53
|
sendTransfer(args: SendTransferCommandInput, cb: (err: any, data?: SendTransferCommandOutput) => void): void;
|
|
46
54
|
sendTransfer(args: SendTransferCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: SendTransferCommandOutput) => void): void;
|
|
55
|
+
/**
|
|
56
|
+
* @see {@link TextToSpeechCommand}
|
|
57
|
+
*/
|
|
58
|
+
textToSpeech(args: TextToSpeechCommandInput, options?: __HttpHandlerOptions): Promise<TextToSpeechCommandOutput>;
|
|
59
|
+
textToSpeech(args: TextToSpeechCommandInput, cb: (err: any, data?: TextToSpeechCommandOutput) => void): void;
|
|
60
|
+
textToSpeech(args: TextToSpeechCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: TextToSpeechCommandOutput) => void): void;
|
|
47
61
|
}
|
|
48
62
|
/**
|
|
49
63
|
* Voice-session runtime for the Wilma agent platform. Runs a wilma-agents agent on the voice
|
|
@@ -6,22 +6,24 @@ import { type RetryInputConfig, type RetryResolvedConfig } from "@smithy/core/re
|
|
|
6
6
|
import type { BodyLengthCalculator as __BodyLengthCalculator, CheckOptionalClientConfig as __CheckOptionalClientConfig, ChecksumConstructor as __ChecksumConstructor, Decoder as __Decoder, Encoder as __Encoder, HashConstructor as __HashConstructor, HttpHandlerOptions as __HttpHandlerOptions, Logger as __Logger, Provider as __Provider, StreamCollector as __StreamCollector, UrlParser as __UrlParser, UserAgent as __UserAgent } from "@smithy/types";
|
|
7
7
|
import { type HttpAuthSchemeInputConfig, type HttpAuthSchemeResolvedConfig } from "./auth/httpAuthSchemeProvider";
|
|
8
8
|
import type { DescribeVoiceProtocolCommandInput, DescribeVoiceProtocolCommandOutput } from "./commands/DescribeVoiceProtocolCommand";
|
|
9
|
+
import type { ListVoicesCommandInput, ListVoicesCommandOutput } from "./commands/ListVoicesCommand";
|
|
9
10
|
import type { SendHangupCommandInput, SendHangupCommandOutput } from "./commands/SendHangupCommand";
|
|
10
11
|
import type { SendPlayCommandInput, SendPlayCommandOutput } from "./commands/SendPlayCommand";
|
|
11
12
|
import type { SendSayCommandInput, SendSayCommandOutput } from "./commands/SendSayCommand";
|
|
12
13
|
import type { SendStopCommandInput, SendStopCommandOutput } from "./commands/SendStopCommand";
|
|
13
14
|
import type { SendTransferCommandInput, SendTransferCommandOutput } from "./commands/SendTransferCommand";
|
|
15
|
+
import type { TextToSpeechCommandInput, TextToSpeechCommandOutput } from "./commands/TextToSpeechCommand";
|
|
14
16
|
import { type ClientInputEndpointParameters, type ClientResolvedEndpointParameters, type EndpointParameters } from "./endpoint/EndpointParameters";
|
|
15
17
|
import { type RuntimeExtension, type RuntimeExtensionsConfig } from "./runtimeExtensions";
|
|
16
18
|
export { __Client };
|
|
17
19
|
/**
|
|
18
20
|
* @public
|
|
19
21
|
*/
|
|
20
|
-
export type ServiceInputTypes = DescribeVoiceProtocolCommandInput | SendHangupCommandInput | SendPlayCommandInput | SendSayCommandInput | SendStopCommandInput | SendTransferCommandInput;
|
|
22
|
+
export type ServiceInputTypes = DescribeVoiceProtocolCommandInput | ListVoicesCommandInput | SendHangupCommandInput | SendPlayCommandInput | SendSayCommandInput | SendStopCommandInput | SendTransferCommandInput | TextToSpeechCommandInput;
|
|
21
23
|
/**
|
|
22
24
|
* @public
|
|
23
25
|
*/
|
|
24
|
-
export type ServiceOutputTypes = DescribeVoiceProtocolCommandOutput | SendHangupCommandOutput | SendPlayCommandOutput | SendSayCommandOutput | SendStopCommandOutput | SendTransferCommandOutput;
|
|
26
|
+
export type ServiceOutputTypes = DescribeVoiceProtocolCommandOutput | ListVoicesCommandOutput | SendHangupCommandOutput | SendPlayCommandOutput | SendSayCommandOutput | SendStopCommandOutput | SendTransferCommandOutput | TextToSpeechCommandOutput;
|
|
25
27
|
/**
|
|
26
28
|
* @public
|
|
27
29
|
*/
|
|
@@ -83,6 +83,7 @@ declare const DescribeVoiceProtocolCommand_base: {
|
|
|
83
83
|
* // text: "STRING_VALUE", // required
|
|
84
84
|
* // confidence: Number("double"),
|
|
85
85
|
* // final: true || false,
|
|
86
|
+
* // language: "STRING_VALUE",
|
|
86
87
|
* // time: Number("long"), // required
|
|
87
88
|
* // },
|
|
88
89
|
* // },
|
|
@@ -92,6 +93,7 @@ declare const DescribeVoiceProtocolCommand_base: {
|
|
|
92
93
|
* // type: "started" || "ended" || "error" || "audio" || "transcription" || "reply" || "playback" || "interruption" || "complete" || "control", // required
|
|
93
94
|
* // id: "STRING_VALUE", // required
|
|
94
95
|
* // text: "STRING_VALUE", // required
|
|
96
|
+
* // language: "STRING_VALUE",
|
|
95
97
|
* // startTime: Number("long"), // required
|
|
96
98
|
* // endTime: Number("long"), // required
|
|
97
99
|
* // },
|
|
@@ -144,6 +146,15 @@ declare const DescribeVoiceProtocolCommand_base: {
|
|
|
144
146
|
* // agentName: "STRING_VALUE",
|
|
145
147
|
* // category: "STRING_VALUE",
|
|
146
148
|
* // groupId: "STRING_VALUE",
|
|
149
|
+
* // speech: { // VoiceSpeechPayload
|
|
150
|
+
* // engine: "STRING_VALUE", // required
|
|
151
|
+
* // languages: [ // LanguageCodeList // required
|
|
152
|
+
* // "STRING_VALUE",
|
|
153
|
+
* // ],
|
|
154
|
+
* // preferredLanguage: "STRING_VALUE", // required
|
|
155
|
+
* // autoDetect: true || false, // required
|
|
156
|
+
* // },
|
|
157
|
+
* // backgroundSound: "STRING_VALUE",
|
|
147
158
|
* // inputAudio: {
|
|
148
159
|
* // encoding: "pcm_s16le" || "mulaw" || "alaw" || "opus", // required
|
|
149
160
|
* // sampleRate: Number("int"), // required
|
|
@@ -180,6 +191,7 @@ declare const DescribeVoiceProtocolCommand_base: {
|
|
|
180
191
|
* // text: "STRING_VALUE", // required
|
|
181
192
|
* // replyId: "STRING_VALUE", // required
|
|
182
193
|
* // interruptible: true || false,
|
|
194
|
+
* // voice: "STRING_VALUE",
|
|
183
195
|
* // audio: { // SayCommandAudioOptions
|
|
184
196
|
* // streamId: "STRING_VALUE", // required
|
|
185
197
|
* // sampleRate: Number("int"), // required
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
3
|
+
import type { ListVoicesInput, ListVoicesOutput } from "../models/models_0";
|
|
4
|
+
import type { ServiceInputTypes, ServiceOutputTypes, WilmaVoiceClientResolvedConfig } from "../WilmaVoiceClient";
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export type { __MetadataBearer };
|
|
9
|
+
export { $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*
|
|
13
|
+
* The input for {@link ListVoicesCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface ListVoicesCommandInput extends ListVoicesInput {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link ListVoicesCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface ListVoicesCommandOutput extends ListVoicesOutput, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const ListVoicesCommand_base: {
|
|
25
|
+
new (input: ListVoicesCommandInput): import("@smithy/core/client").CommandImpl<ListVoicesCommandInput, ListVoicesCommandOutput, WilmaVoiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (input: ListVoicesCommandInput): import("@smithy/core/client").CommandImpl<ListVoicesCommandInput, ListVoicesCommandOutput, WilmaVoiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* Lists the voices a synthesis provider offers, read from the provider's own API and cached per company, provider, credential and language. Answers a URI per voice, so a picker stores what it selected rather than composing one.
|
|
31
|
+
* @example
|
|
32
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
33
|
+
* ```javascript
|
|
34
|
+
* import { WilmaVoiceClient, ListVoicesCommand } from "@wildix/wilma-voice-client"; // ES Modules import
|
|
35
|
+
* // const { WilmaVoiceClient, ListVoicesCommand } = require("@wildix/wilma-voice-client"); // CommonJS import
|
|
36
|
+
* // import type { WilmaVoiceClientConfig } from "@wildix/wilma-voice-client";
|
|
37
|
+
* const config = {}; // type is WilmaVoiceClientConfig
|
|
38
|
+
* const client = new WilmaVoiceClient(config);
|
|
39
|
+
* const input = { // ListVoicesInput
|
|
40
|
+
* provider: "STRING_VALUE", // required
|
|
41
|
+
* language: "STRING_VALUE",
|
|
42
|
+
* search: "STRING_VALUE",
|
|
43
|
+
* credential: "STRING_VALUE",
|
|
44
|
+
* };
|
|
45
|
+
* const command = new ListVoicesCommand(input);
|
|
46
|
+
* const response = await client.send(command);
|
|
47
|
+
* // { // ListVoicesOutput
|
|
48
|
+
* // voices: [ // VoiceList // required
|
|
49
|
+
* // { // Voice
|
|
50
|
+
* // uri: "STRING_VALUE", // required
|
|
51
|
+
* // name: "STRING_VALUE", // required
|
|
52
|
+
* // options: "DOCUMENT_VALUE",
|
|
53
|
+
* // },
|
|
54
|
+
* // ],
|
|
55
|
+
* // };
|
|
56
|
+
*
|
|
57
|
+
* ```
|
|
58
|
+
*
|
|
59
|
+
* @param ListVoicesCommandInput - {@link ListVoicesCommandInput}
|
|
60
|
+
* @returns {@link ListVoicesCommandOutput}
|
|
61
|
+
* @see {@link ListVoicesCommandInput} for command's `input` shape.
|
|
62
|
+
* @see {@link ListVoicesCommandOutput} for command's `response` shape.
|
|
63
|
+
* @see {@link WilmaVoiceClientResolvedConfig | config} for WilmaVoiceClient's `config` shape.
|
|
64
|
+
*
|
|
65
|
+
* @throws {@link ValidationException} (client fault)
|
|
66
|
+
*
|
|
67
|
+
* @throws {@link ForbiddenException} (client fault)
|
|
68
|
+
*
|
|
69
|
+
* @throws {@link WilmaVoiceServiceException}
|
|
70
|
+
* <p>Base exception class for all service exceptions from WilmaVoice service.</p>
|
|
71
|
+
*
|
|
72
|
+
*
|
|
73
|
+
* @public
|
|
74
|
+
*/
|
|
75
|
+
export declare class ListVoicesCommand extends ListVoicesCommand_base {
|
|
76
|
+
/** @internal type navigation helper, not in runtime. */
|
|
77
|
+
protected static __types: {
|
|
78
|
+
api: {
|
|
79
|
+
input: ListVoicesInput;
|
|
80
|
+
output: ListVoicesOutput;
|
|
81
|
+
};
|
|
82
|
+
sdk: {
|
|
83
|
+
input: ListVoicesCommandInput;
|
|
84
|
+
output: ListVoicesCommandOutput;
|
|
85
|
+
};
|
|
86
|
+
};
|
|
87
|
+
}
|
|
@@ -40,6 +40,7 @@ declare const SendSayCommand_base: {
|
|
|
40
40
|
* text: "STRING_VALUE", // required
|
|
41
41
|
* replyId: "STRING_VALUE", // required
|
|
42
42
|
* interruptible: true || false,
|
|
43
|
+
* voice: "STRING_VALUE",
|
|
43
44
|
* audio: { // SayCommandAudioOptions
|
|
44
45
|
* streamId: "STRING_VALUE", // required
|
|
45
46
|
* sampleRate: Number("int"), // required
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/core/client";
|
|
2
|
+
import { Uint8ArrayBlobAdapter } from "@smithy/core/serde";
|
|
3
|
+
import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
4
|
+
import type { TextToSpeechInput, TextToSpeechOutput } from "../models/models_0";
|
|
5
|
+
import type { ServiceInputTypes, ServiceOutputTypes, WilmaVoiceClientResolvedConfig } from "../WilmaVoiceClient";
|
|
6
|
+
/**
|
|
7
|
+
* @public
|
|
8
|
+
*/
|
|
9
|
+
export type { __MetadataBearer };
|
|
10
|
+
export { $Command };
|
|
11
|
+
/**
|
|
12
|
+
* @public
|
|
13
|
+
*
|
|
14
|
+
* The input for {@link TextToSpeechCommand}.
|
|
15
|
+
*/
|
|
16
|
+
export interface TextToSpeechCommandInput extends TextToSpeechInput {
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* @public
|
|
20
|
+
*/
|
|
21
|
+
export type TextToSpeechCommandOutputType = Omit<TextToSpeechOutput, "audio"> & {
|
|
22
|
+
audio: Uint8ArrayBlobAdapter;
|
|
23
|
+
};
|
|
24
|
+
/**
|
|
25
|
+
* @public
|
|
26
|
+
*
|
|
27
|
+
* The output of {@link TextToSpeechCommand}.
|
|
28
|
+
*/
|
|
29
|
+
export interface TextToSpeechCommandOutput extends TextToSpeechCommandOutputType, __MetadataBearer {
|
|
30
|
+
}
|
|
31
|
+
declare const TextToSpeechCommand_base: {
|
|
32
|
+
new (input: TextToSpeechCommandInput): import("@smithy/core/client").CommandImpl<TextToSpeechCommandInput, TextToSpeechCommandOutput, WilmaVoiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
33
|
+
new (input: TextToSpeechCommandInput): import("@smithy/core/client").CommandImpl<TextToSpeechCommandInput, TextToSpeechCommandOutput, WilmaVoiceClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
34
|
+
getEndpointParameterInstructions(): import("@smithy/types").EndpointParameterInstructions;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Synthesizes one phrase and returns MP3.
|
|
38
|
+
*
|
|
39
|
+
* NOT NAMED FOR THE PREVIEW IT SERVES. Auditioning an unsaved voice in the console is the first
|
|
40
|
+
* caller, but nothing about the operation is preview-specific — it is the platform's
|
|
41
|
+
* text-to-speech, reachable by anything holding the scope, and a name naming one caller's screen
|
|
42
|
+
* would have to be worked around by the second one.
|
|
43
|
+
*
|
|
44
|
+
* EVERYTHING TRAVELS IN THE REQUEST and the operation reads no stored record — not the agent, and
|
|
45
|
+
* no dictionary behind it. The settings being auditioned are unsaved form state, and the rules
|
|
46
|
+
* that apply are the ones on `pronunciations`, so what is heard here is what the call would say.
|
|
47
|
+
* @example
|
|
48
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
49
|
+
* ```javascript
|
|
50
|
+
* import { WilmaVoiceClient, TextToSpeechCommand } from "@wildix/wilma-voice-client"; // ES Modules import
|
|
51
|
+
* // const { WilmaVoiceClient, TextToSpeechCommand } = require("@wildix/wilma-voice-client"); // CommonJS import
|
|
52
|
+
* // import type { WilmaVoiceClientConfig } from "@wildix/wilma-voice-client";
|
|
53
|
+
* const config = {}; // type is WilmaVoiceClientConfig
|
|
54
|
+
* const client = new WilmaVoiceClient(config);
|
|
55
|
+
* const input = { // TextToSpeechInput
|
|
56
|
+
* voice: "STRING_VALUE", // required
|
|
57
|
+
* language: "STRING_VALUE", // required
|
|
58
|
+
* text: "STRING_VALUE", // required
|
|
59
|
+
* pronunciations: [ // VoicePronunciationList
|
|
60
|
+
* { // VoicePronunciation
|
|
61
|
+
* phrase: "STRING_VALUE", // required
|
|
62
|
+
* as: "STRING_VALUE", // required
|
|
63
|
+
* encoding: "alias" || "ipa",
|
|
64
|
+
* },
|
|
65
|
+
* ],
|
|
66
|
+
* };
|
|
67
|
+
* const command = new TextToSpeechCommand(input);
|
|
68
|
+
* const response = await client.send(command);
|
|
69
|
+
* // { // TextToSpeechOutput
|
|
70
|
+
* // audio: new Uint8Array(), // required
|
|
71
|
+
* // };
|
|
72
|
+
*
|
|
73
|
+
* ```
|
|
74
|
+
*
|
|
75
|
+
* @param TextToSpeechCommandInput - {@link TextToSpeechCommandInput}
|
|
76
|
+
* @returns {@link TextToSpeechCommandOutput}
|
|
77
|
+
* @see {@link TextToSpeechCommandInput} for command's `input` shape.
|
|
78
|
+
* @see {@link TextToSpeechCommandOutput} for command's `response` shape.
|
|
79
|
+
* @see {@link WilmaVoiceClientResolvedConfig | config} for WilmaVoiceClient's `config` shape.
|
|
80
|
+
*
|
|
81
|
+
* @throws {@link ValidationException} (client fault)
|
|
82
|
+
*
|
|
83
|
+
* @throws {@link ForbiddenException} (client fault)
|
|
84
|
+
*
|
|
85
|
+
* @throws {@link WilmaVoiceServiceException}
|
|
86
|
+
* <p>Base exception class for all service exceptions from WilmaVoice service.</p>
|
|
87
|
+
*
|
|
88
|
+
*
|
|
89
|
+
* @public
|
|
90
|
+
*/
|
|
91
|
+
export declare class TextToSpeechCommand extends TextToSpeechCommand_base {
|
|
92
|
+
/** @internal type navigation helper, not in runtime. */
|
|
93
|
+
protected static __types: {
|
|
94
|
+
api: {
|
|
95
|
+
input: TextToSpeechInput;
|
|
96
|
+
output: TextToSpeechOutput;
|
|
97
|
+
};
|
|
98
|
+
sdk: {
|
|
99
|
+
input: TextToSpeechCommandInput;
|
|
100
|
+
output: TextToSpeechCommandOutput;
|
|
101
|
+
};
|
|
102
|
+
};
|
|
103
|
+
}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
export * from "./DescribeVoiceProtocolCommand";
|
|
2
|
+
export * from "./ListVoicesCommand";
|
|
2
3
|
export * from "./SendHangupCommand";
|
|
3
4
|
export * from "./SendPlayCommand";
|
|
4
5
|
export * from "./SendSayCommand";
|
|
5
6
|
export * from "./SendStopCommand";
|
|
6
7
|
export * from "./SendTransferCommand";
|
|
8
|
+
export * from "./TextToSpeechCommand";
|
|
@@ -1,3 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @public
|
|
3
|
+
* @enum
|
|
4
|
+
*/
|
|
5
|
+
export declare const VoicePronunciationEncoding: {
|
|
6
|
+
/**
|
|
7
|
+
* A respelling substituted into the text before it reaches the provider. The only encoding version 1 applies.
|
|
8
|
+
*/
|
|
9
|
+
readonly ALIAS: "alias";
|
|
10
|
+
/**
|
|
11
|
+
* Phonetic transcription. Declared so IPA can be enabled per provider later; ignored by the runtime today.
|
|
12
|
+
*/
|
|
13
|
+
readonly IPA: "ipa";
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* @public
|
|
17
|
+
*/
|
|
18
|
+
export type VoicePronunciationEncoding = (typeof VoicePronunciationEncoding)[keyof typeof VoicePronunciationEncoding];
|
|
1
19
|
/**
|
|
2
20
|
* @public
|
|
3
21
|
* @enum
|