@aws-sdk/client-polly 3.1012.0 → 3.1014.0
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/README.md +7 -0
- package/dist-cjs/index.js +45 -3
- package/dist-cjs/models/errors.js +50 -1
- package/dist-cjs/runtimeConfig.browser.js +5 -0
- package/dist-cjs/runtimeConfig.js +8 -1
- package/dist-cjs/runtimeConfig.native.js +4 -0
- package/dist-cjs/schemas/schemas_0.js +120 -2
- package/dist-es/Polly.js +2 -0
- package/dist-es/PollyClient.js +7 -3
- package/dist-es/commands/StartSpeechSynthesisStreamCommand.js +25 -0
- package/dist-es/commands/index.js +1 -0
- package/dist-es/models/enums.js +13 -0
- package/dist-es/models/errors.js +46 -0
- package/dist-es/runtimeConfig.browser.js +6 -1
- package/dist-es/runtimeConfig.js +9 -2
- package/dist-es/runtimeConfig.native.js +4 -0
- package/dist-es/schemas/schemas_0.js +119 -1
- package/dist-types/Polly.d.ts +7 -0
- package/dist-types/PollyClient.d.ts +18 -5
- package/dist-types/commands/StartSpeechSynthesisStreamCommand.d.ts +147 -0
- package/dist-types/commands/index.d.ts +1 -0
- package/dist-types/models/enums.d.ts +37 -0
- package/dist-types/models/errors.d.ts +63 -0
- package/dist-types/models/models_0.d.ts +336 -3
- package/dist-types/runtimeConfig.browser.d.ts +2 -0
- package/dist-types/runtimeConfig.d.ts +3 -1
- package/dist-types/runtimeConfig.native.d.ts +2 -0
- package/dist-types/schemas/schemas_0.d.ts +16 -1
- package/dist-types/ts3.4/Polly.d.ts +17 -0
- package/dist-types/ts3.4/PollyClient.d.ts +22 -0
- package/dist-types/ts3.4/commands/StartSpeechSynthesisStreamCommand.d.ts +51 -0
- package/dist-types/ts3.4/commands/index.d.ts +1 -0
- package/dist-types/ts3.4/models/enums.d.ts +17 -0
- package/dist-types/ts3.4/models/errors.d.ts +28 -0
- package/dist-types/ts3.4/models/models_0.d.ts +153 -0
- package/dist-types/ts3.4/runtimeConfig.browser.d.ts +2 -0
- package/dist-types/ts3.4/runtimeConfig.d.ts +3 -1
- package/dist-types/ts3.4/runtimeConfig.native.d.ts +2 -0
- package/dist-types/ts3.4/schemas/schemas_0.d.ts +16 -0
- package/package.json +17 -12
|
@@ -2,8 +2,9 @@ import packageInfo from "../package.json";
|
|
|
2
2
|
import { Sha256 } from "@aws-crypto/sha256-browser";
|
|
3
3
|
import { createDefaultUserAgentProvider } from "@aws-sdk/util-user-agent-browser";
|
|
4
4
|
import { DEFAULT_USE_DUALSTACK_ENDPOINT, DEFAULT_USE_FIPS_ENDPOINT } from "@smithy/config-resolver";
|
|
5
|
+
import { eventStreamSerdeProvider } from "@smithy/eventstream-serde-browser";
|
|
5
6
|
import { FetchHttpHandler as RequestHandler, streamCollector } from "@smithy/fetch-http-handler";
|
|
6
|
-
import { invalidProvider } from "@smithy/invalid-dependency";
|
|
7
|
+
import { invalidFunction, invalidProvider } from "@smithy/invalid-dependency";
|
|
7
8
|
import { loadConfigsForDefaultMode } from "@smithy/smithy-client";
|
|
8
9
|
import { calculateBodyLength } from "@smithy/util-body-length-browser";
|
|
9
10
|
import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-browser";
|
|
@@ -21,6 +22,10 @@ export const getRuntimeConfig = (config) => {
|
|
|
21
22
|
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
22
23
|
credentialDefaultProvider: config?.credentialDefaultProvider ?? ((_) => () => Promise.reject(new Error("Credential is missing"))),
|
|
23
24
|
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
25
|
+
eventStreamPayloadHandlerProvider: config?.eventStreamPayloadHandlerProvider ?? (() => ({
|
|
26
|
+
handle: invalidFunction("event stream request is not supported in browser."),
|
|
27
|
+
})),
|
|
28
|
+
eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider,
|
|
24
29
|
maxAttempts: config?.maxAttempts ?? DEFAULT_MAX_ATTEMPTS,
|
|
25
30
|
region: config?.region ?? invalidProvider("Region is missing"),
|
|
26
31
|
requestHandler: RequestHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
package/dist-es/runtimeConfig.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import packageInfo from "../package.json";
|
|
2
2
|
import { emitWarningIfUnsupportedVersion as awsCheckVersion, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS } from "@aws-sdk/core";
|
|
3
3
|
import { defaultProvider as credentialDefaultProvider } from "@aws-sdk/credential-provider-node";
|
|
4
|
+
import { eventStreamPayloadHandlerProvider } from "@aws-sdk/eventstream-handler-node";
|
|
4
5
|
import { createDefaultUserAgentProvider, NODE_APP_ID_CONFIG_OPTIONS } from "@aws-sdk/util-user-agent-node";
|
|
5
6
|
import { NODE_REGION_CONFIG_FILE_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, } from "@smithy/config-resolver";
|
|
7
|
+
import { eventStreamSerdeProvider } from "@smithy/eventstream-serde-node";
|
|
6
8
|
import { Hash } from "@smithy/hash-node";
|
|
7
9
|
import { NODE_MAX_ATTEMPT_CONFIG_OPTIONS, NODE_RETRY_MODE_CONFIG_OPTIONS } from "@smithy/middleware-retry";
|
|
8
10
|
import { loadConfig as loadNodeConfig } from "@smithy/node-config-provider";
|
|
9
|
-
import {
|
|
11
|
+
import { NodeHttp2Handler as RequestHandler, streamCollector } from "@smithy/node-http-handler";
|
|
10
12
|
import { emitWarningIfUnsupportedVersion, loadConfigsForDefaultMode } from "@smithy/smithy-client";
|
|
11
13
|
import { calculateBodyLength } from "@smithy/util-body-length-node";
|
|
12
14
|
import { resolveDefaultsModeConfig } from "@smithy/util-defaults-mode-node";
|
|
@@ -31,9 +33,14 @@ export const getRuntimeConfig = (config) => {
|
|
|
31
33
|
bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
|
|
32
34
|
credentialDefaultProvider: config?.credentialDefaultProvider ?? credentialDefaultProvider,
|
|
33
35
|
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: packageInfo.version }),
|
|
36
|
+
eventStreamPayloadHandlerProvider: config?.eventStreamPayloadHandlerProvider ?? eventStreamPayloadHandlerProvider,
|
|
37
|
+
eventStreamSerdeProvider: config?.eventStreamSerdeProvider ?? eventStreamSerdeProvider,
|
|
34
38
|
maxAttempts: config?.maxAttempts ?? loadNodeConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
35
39
|
region: config?.region ?? loadNodeConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
|
|
36
|
-
requestHandler: RequestHandler.create(config?.requestHandler ??
|
|
40
|
+
requestHandler: RequestHandler.create(config?.requestHandler ?? (async () => ({
|
|
41
|
+
...await defaultConfigProvider(),
|
|
42
|
+
disableConcurrentStreams: true
|
|
43
|
+
}))),
|
|
37
44
|
retryMode: config?.retryMode ??
|
|
38
45
|
loadNodeConfig({
|
|
39
46
|
...NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { Sha256 } from "@aws-crypto/sha256-js";
|
|
2
|
+
import { invalidFunction } from "@smithy/invalid-dependency";
|
|
2
3
|
import { getRuntimeConfig as getBrowserRuntimeConfig } from "./runtimeConfig.browser";
|
|
3
4
|
export const getRuntimeConfig = (config) => {
|
|
4
5
|
const browserDefaults = getBrowserRuntimeConfig(config);
|
|
@@ -6,6 +7,9 @@ export const getRuntimeConfig = (config) => {
|
|
|
6
7
|
...browserDefaults,
|
|
7
8
|
...config,
|
|
8
9
|
runtime: "react-native",
|
|
10
|
+
eventStreamPayloadHandlerProvider: config?.eventStreamPayloadHandlerProvider ?? (() => ({
|
|
11
|
+
handle: invalidFunction("event stream request is not supported in ReactNative."),
|
|
12
|
+
})),
|
|
9
13
|
sha256: config?.sha256 ?? Sha256,
|
|
10
14
|
};
|
|
11
15
|
};
|
|
@@ -1,8 +1,12 @@
|
|
|
1
1
|
const _A = "Alphabet";
|
|
2
|
+
const _AC = "AudioChunk";
|
|
3
|
+
const _AE = "AudioEvent";
|
|
2
4
|
const _ALC = "AdditionalLanguageCodes";
|
|
3
5
|
const _AS = "AudioStream";
|
|
6
|
+
const _ASc = "ActionStream";
|
|
4
7
|
const _At = "Attributes";
|
|
5
8
|
const _C = "Content";
|
|
9
|
+
const _CSE = "CloseStreamEvent";
|
|
6
10
|
const _CT = "CreationTime";
|
|
7
11
|
const _CT_ = "Content-Type";
|
|
8
12
|
const _CTo = "ContentType";
|
|
@@ -14,6 +18,9 @@ const _DVI = "DescribeVoicesInput";
|
|
|
14
18
|
const _DVO = "DescribeVoicesOutput";
|
|
15
19
|
const _E = "Engine";
|
|
16
20
|
const _ENSE = "EngineNotSupportedException";
|
|
21
|
+
const _ES = "EventStream";
|
|
22
|
+
const _F = "Force";
|
|
23
|
+
const _FSC = "FlushStreamConfiguration";
|
|
17
24
|
const _G = "Gender";
|
|
18
25
|
const _GL = "GetLexicon";
|
|
19
26
|
const _GLI = "GetLexiconInput";
|
|
@@ -67,14 +74,21 @@ const _PLI = "PutLexiconInput";
|
|
|
67
74
|
const _PLO = "PutLexiconOutput";
|
|
68
75
|
const _RC = "RequestCharacters";
|
|
69
76
|
const _S = "Size";
|
|
77
|
+
const _SCE = "StreamClosedEvent";
|
|
70
78
|
const _SE = "SupportedEngines";
|
|
71
79
|
const _SFE = "ServiceFailureException";
|
|
72
80
|
const _SMNSFTTE = "SsmlMarksNotSupportedForTextTypeException";
|
|
73
81
|
const _SMT = "SpeechMarkTypes";
|
|
82
|
+
const _SQEE = "ServiceQuotaExceededException";
|
|
74
83
|
const _SR = "SampleRate";
|
|
75
84
|
const _SS = "SynthesizeSpeech";
|
|
76
85
|
const _SSI = "SynthesizeSpeechInput";
|
|
77
86
|
const _SSO = "SynthesizeSpeechOutput";
|
|
87
|
+
const _SSSS = "StartSpeechSynthesisStream";
|
|
88
|
+
const _SSSSAS = "StartSpeechSynthesisStreamActionStream";
|
|
89
|
+
const _SSSSES = "StartSpeechSynthesisStreamEventStream";
|
|
90
|
+
const _SSSSI = "StartSpeechSynthesisStreamInput";
|
|
91
|
+
const _SSSSO = "StartSpeechSynthesisStreamOutput";
|
|
78
92
|
const _SSST = "StartSpeechSynthesisTask";
|
|
79
93
|
const _SSSTI = "StartSpeechSynthesisTaskInput";
|
|
80
94
|
const _SSSTO = "StartSpeechSynthesisTaskOutput";
|
|
@@ -84,31 +98,53 @@ const _STNFE = "SynthesisTaskNotFoundException";
|
|
|
84
98
|
const _STy = "SynthesisTasks";
|
|
85
99
|
const _St = "Status";
|
|
86
100
|
const _T = "Text";
|
|
101
|
+
const _TE = "ThrottlingException";
|
|
102
|
+
const _TEe = "TextEvent";
|
|
87
103
|
const _TI = "TaskId";
|
|
88
104
|
const _TLEE = "TextLengthExceededException";
|
|
105
|
+
const _TR = "ThrottlingReason";
|
|
106
|
+
const _TRL = "ThrottlingReasonList";
|
|
89
107
|
const _TS = "TaskStatus";
|
|
90
108
|
const _TSR = "TaskStatusReason";
|
|
91
109
|
const _TT = "TextType";
|
|
92
110
|
const _UPAE = "UnsupportedPlsAlphabetException";
|
|
93
111
|
const _UPLE = "UnsupportedPlsLanguageException";
|
|
94
112
|
const _V = "Voices";
|
|
113
|
+
const _VE = "ValidationException";
|
|
114
|
+
const _VEF = "ValidationExceptionField";
|
|
115
|
+
const _VEFL = "ValidationExceptionFieldList";
|
|
95
116
|
const _VI = "VoiceId";
|
|
96
117
|
const _VL = "VoiceList";
|
|
97
118
|
const _Vo = "Voice";
|
|
119
|
+
const _aQE = "awsQueryError";
|
|
98
120
|
const _c = "client";
|
|
99
121
|
const _e = "error";
|
|
122
|
+
const _eP = "eventPayload";
|
|
123
|
+
const _f = "fields";
|
|
100
124
|
const _h = "http";
|
|
101
125
|
const _hE = "httpError";
|
|
102
126
|
const _hH = "httpHeader";
|
|
103
127
|
const _hQ = "httpQuery";
|
|
104
128
|
const _m = "message";
|
|
129
|
+
const _n = "name";
|
|
130
|
+
const _qC = "quotaCode";
|
|
131
|
+
const _r = "reason";
|
|
132
|
+
const _re = "resource";
|
|
105
133
|
const _s = "smithy.ts.sdk.synthetic.com.amazonaws.polly";
|
|
134
|
+
const _sC = "serviceCode";
|
|
106
135
|
const _se = "server";
|
|
107
136
|
const _st = "streaming";
|
|
137
|
+
const _tR = "throttlingReasons";
|
|
138
|
+
const _xaE = "x-amzn-Engine";
|
|
139
|
+
const _xaL = "x-amzn-LanguageCode";
|
|
140
|
+
const _xaL_ = "x-amzn-LexiconNames";
|
|
141
|
+
const _xaO = "x-amzn-OutputFormat";
|
|
108
142
|
const _xaR = "x-amzn-RequestCharacters";
|
|
143
|
+
const _xaS = "x-amzn-SampleRate";
|
|
144
|
+
const _xaV = "x-amzn-VoiceId";
|
|
109
145
|
const n0 = "com.amazonaws.polly";
|
|
110
146
|
import { TypeRegistry } from "@smithy/core/schema";
|
|
111
|
-
import { EngineNotSupportedException, InvalidLexiconException, InvalidNextTokenException, InvalidS3BucketException, InvalidS3KeyException, InvalidSampleRateException, InvalidSnsTopicArnException, InvalidSsmlException, InvalidTaskIdException, LanguageNotSupportedException, LexiconNotFoundException, LexiconSizeExceededException, MarksNotSupportedForFormatException, MaxLexemeLengthExceededException, MaxLexiconsNumberExceededException, ServiceFailureException, SsmlMarksNotSupportedForTextTypeException, SynthesisTaskNotFoundException, TextLengthExceededException, UnsupportedPlsAlphabetException, UnsupportedPlsLanguageException, } from "../models/errors";
|
|
147
|
+
import { EngineNotSupportedException, InvalidLexiconException, InvalidNextTokenException, InvalidS3BucketException, InvalidS3KeyException, InvalidSampleRateException, InvalidSnsTopicArnException, InvalidSsmlException, InvalidTaskIdException, LanguageNotSupportedException, LexiconNotFoundException, LexiconSizeExceededException, MarksNotSupportedForFormatException, MaxLexemeLengthExceededException, MaxLexiconsNumberExceededException, ServiceFailureException, ServiceQuotaExceededException, SsmlMarksNotSupportedForTextTypeException, SynthesisTaskNotFoundException, TextLengthExceededException, ThrottlingException, UnsupportedPlsAlphabetException, UnsupportedPlsLanguageException, ValidationException, } from "../models/errors";
|
|
112
148
|
import { PollyServiceException } from "../models/PollyServiceException";
|
|
113
149
|
const _s_registry = TypeRegistry.for(_s);
|
|
114
150
|
export var PollyServiceException$ = [-3, _s, "PollyServiceException", 0, [], []];
|
|
@@ -210,6 +246,12 @@ export var ServiceFailureException$ = [-3, n0, _SFE,
|
|
|
210
246
|
[0]
|
|
211
247
|
];
|
|
212
248
|
n0_registry.registerError(ServiceFailureException$, ServiceFailureException);
|
|
249
|
+
export var ServiceQuotaExceededException$ = [-3, n0, _SQEE,
|
|
250
|
+
{ [_e]: _c, [_hE]: 402 },
|
|
251
|
+
[_m, _qC, _sC],
|
|
252
|
+
[0, 0, 0], 3
|
|
253
|
+
];
|
|
254
|
+
n0_registry.registerError(ServiceQuotaExceededException$, ServiceQuotaExceededException);
|
|
213
255
|
export var SsmlMarksNotSupportedForTextTypeException$ = [-3, n0, _SMNSFTTE,
|
|
214
256
|
{ [_e]: _c, [_hE]: 400 },
|
|
215
257
|
[_m],
|
|
@@ -228,6 +270,12 @@ export var TextLengthExceededException$ = [-3, n0, _TLEE,
|
|
|
228
270
|
[0]
|
|
229
271
|
];
|
|
230
272
|
n0_registry.registerError(TextLengthExceededException$, TextLengthExceededException);
|
|
273
|
+
export var ThrottlingException$ = [-3, n0, _TE,
|
|
274
|
+
{ [_aQE]: [`Throttling`, 400], [_e]: _c, [_hE]: 400 },
|
|
275
|
+
[_m, _tR],
|
|
276
|
+
[0, () => ThrottlingReasonList]
|
|
277
|
+
];
|
|
278
|
+
n0_registry.registerError(ThrottlingException$, ThrottlingException);
|
|
231
279
|
export var UnsupportedPlsAlphabetException$ = [-3, n0, _UPAE,
|
|
232
280
|
{ [_e]: _c, [_hE]: 400 },
|
|
233
281
|
[_m],
|
|
@@ -240,12 +288,28 @@ export var UnsupportedPlsLanguageException$ = [-3, n0, _UPLE,
|
|
|
240
288
|
[0]
|
|
241
289
|
];
|
|
242
290
|
n0_registry.registerError(UnsupportedPlsLanguageException$, UnsupportedPlsLanguageException);
|
|
291
|
+
export var ValidationException$ = [-3, n0, _VE,
|
|
292
|
+
{ [_e]: _c, [_hE]: 400 },
|
|
293
|
+
[_m, _r, _f],
|
|
294
|
+
[0, 0, () => ValidationExceptionFieldList], 2
|
|
295
|
+
];
|
|
296
|
+
n0_registry.registerError(ValidationException$, ValidationException);
|
|
243
297
|
export const errorTypeRegistries = [
|
|
244
298
|
_s_registry,
|
|
245
299
|
n0_registry,
|
|
246
300
|
];
|
|
247
301
|
var AudioStream = [0, n0, _AS, { [_st]: 1 }, 42];
|
|
248
302
|
var LexiconContent = [0, n0, _LC, 8, 0];
|
|
303
|
+
export var AudioEvent$ = [3, n0, _AE,
|
|
304
|
+
0,
|
|
305
|
+
[_AC],
|
|
306
|
+
[[21, { [_eP]: 1 }]]
|
|
307
|
+
];
|
|
308
|
+
export var CloseStreamEvent$ = [3, n0, _CSE,
|
|
309
|
+
0,
|
|
310
|
+
[],
|
|
311
|
+
[]
|
|
312
|
+
];
|
|
249
313
|
export var DeleteLexiconInput$ = [3, n0, _DLI,
|
|
250
314
|
0,
|
|
251
315
|
[_N],
|
|
@@ -266,6 +330,11 @@ export var DescribeVoicesOutput$ = [3, n0, _DVO,
|
|
|
266
330
|
[_V, _NT],
|
|
267
331
|
[() => VoiceList, 0]
|
|
268
332
|
];
|
|
333
|
+
export var FlushStreamConfiguration$ = [3, n0, _FSC,
|
|
334
|
+
0,
|
|
335
|
+
[_F],
|
|
336
|
+
[2]
|
|
337
|
+
];
|
|
269
338
|
export var GetLexiconInput$ = [3, n0, _GLI,
|
|
270
339
|
0,
|
|
271
340
|
[_N],
|
|
@@ -331,6 +400,16 @@ export var PutLexiconOutput$ = [3, n0, _PLO,
|
|
|
331
400
|
[],
|
|
332
401
|
[]
|
|
333
402
|
];
|
|
403
|
+
export var StartSpeechSynthesisStreamInput$ = [3, n0, _SSSSI,
|
|
404
|
+
0,
|
|
405
|
+
[_E, _OF, _VI, _LCa, _LN, _SR, _ASc],
|
|
406
|
+
[[0, { [_hH]: _xaE }], [0, { [_hH]: _xaO }], [0, { [_hH]: _xaV }], [0, { [_hH]: _xaL }], [64 | 0, { [_hH]: _xaL_ }], [0, { [_hH]: _xaS }], [() => StartSpeechSynthesisStreamActionStream$, 16]], 3
|
|
407
|
+
];
|
|
408
|
+
export var StartSpeechSynthesisStreamOutput$ = [3, n0, _SSSSO,
|
|
409
|
+
0,
|
|
410
|
+
[_ES],
|
|
411
|
+
[[() => StartSpeechSynthesisStreamEventStream$, 16]]
|
|
412
|
+
];
|
|
334
413
|
export var StartSpeechSynthesisTaskInput$ = [3, n0, _SSSTI,
|
|
335
414
|
0,
|
|
336
415
|
[_OF, _OSBN, _T, _VI, _E, _LCa, _LN, _OSKP, _SR, _STA, _SMT, _TT],
|
|
@@ -341,6 +420,11 @@ export var StartSpeechSynthesisTaskOutput$ = [3, n0, _SSSTO,
|
|
|
341
420
|
[_ST],
|
|
342
421
|
[() => SynthesisTask$]
|
|
343
422
|
];
|
|
423
|
+
export var StreamClosedEvent$ = [3, n0, _SCE,
|
|
424
|
+
0,
|
|
425
|
+
[_RC],
|
|
426
|
+
[1]
|
|
427
|
+
];
|
|
344
428
|
export var SynthesisTask$ = [3, n0, _ST,
|
|
345
429
|
0,
|
|
346
430
|
[_E, _TI, _TS, _TSR, _OU, _CT, _RC, _STA, _LN, _OF, _SR, _SMT, _TT, _VI, _LCa],
|
|
@@ -356,6 +440,21 @@ export var SynthesizeSpeechOutput$ = [3, n0, _SSO,
|
|
|
356
440
|
[_AS, _CTo, _RC],
|
|
357
441
|
[[() => AudioStream, 16], [0, { [_hH]: _CT_ }], [1, { [_hH]: _xaR }]]
|
|
358
442
|
];
|
|
443
|
+
export var TextEvent$ = [3, n0, _TEe,
|
|
444
|
+
0,
|
|
445
|
+
[_T, _TT, _FSC],
|
|
446
|
+
[0, 0, () => FlushStreamConfiguration$], 1
|
|
447
|
+
];
|
|
448
|
+
export var ThrottlingReason$ = [3, n0, _TR,
|
|
449
|
+
0,
|
|
450
|
+
[_r, _re],
|
|
451
|
+
[0, 0]
|
|
452
|
+
];
|
|
453
|
+
export var ValidationExceptionField$ = [3, n0, _VEF,
|
|
454
|
+
0,
|
|
455
|
+
[_n, _m],
|
|
456
|
+
[0, 0], 2
|
|
457
|
+
];
|
|
359
458
|
export var Voice$ = [3, n0, _Vo,
|
|
360
459
|
0,
|
|
361
460
|
[_G, _I, _LCa, _LNa, _N, _ALC, _SE],
|
|
@@ -371,9 +470,25 @@ var SpeechMarkTypeList = 64 | 0;
|
|
|
371
470
|
var SynthesisTasks = [1, n0, _STy,
|
|
372
471
|
0, () => SynthesisTask$
|
|
373
472
|
];
|
|
473
|
+
var ThrottlingReasonList = [1, n0, _TRL,
|
|
474
|
+
0, () => ThrottlingReason$
|
|
475
|
+
];
|
|
476
|
+
var ValidationExceptionFieldList = [1, n0, _VEFL,
|
|
477
|
+
0, () => ValidationExceptionField$
|
|
478
|
+
];
|
|
374
479
|
var VoiceList = [1, n0, _VL,
|
|
375
480
|
0, () => Voice$
|
|
376
481
|
];
|
|
482
|
+
export var StartSpeechSynthesisStreamActionStream$ = [4, n0, _SSSSAS,
|
|
483
|
+
{ [_st]: 1 },
|
|
484
|
+
[_TEe, _CSE],
|
|
485
|
+
[() => TextEvent$, () => CloseStreamEvent$]
|
|
486
|
+
];
|
|
487
|
+
export var StartSpeechSynthesisStreamEventStream$ = [4, n0, _SSSSES,
|
|
488
|
+
{ [_st]: 1 },
|
|
489
|
+
[_AE, _SCE, _VE, _SQEE, _SFE, _TE],
|
|
490
|
+
[[() => AudioEvent$, 0], () => StreamClosedEvent$, [() => ValidationException$, 0], [() => ServiceQuotaExceededException$, 0], [() => ServiceFailureException$, 0], [() => ThrottlingException$, 0]]
|
|
491
|
+
];
|
|
377
492
|
export var DeleteLexicon$ = [9, n0, _DL,
|
|
378
493
|
{ [_h]: ["DELETE", "/v1/lexicons/{Name}", 200] }, () => DeleteLexiconInput$, () => DeleteLexiconOutput$
|
|
379
494
|
];
|
|
@@ -395,6 +510,9 @@ export var ListSpeechSynthesisTasks$ = [9, n0, _LSST,
|
|
|
395
510
|
export var PutLexicon$ = [9, n0, _PL,
|
|
396
511
|
{ [_h]: ["PUT", "/v1/lexicons/{Name}", 200] }, () => PutLexiconInput$, () => PutLexiconOutput$
|
|
397
512
|
];
|
|
513
|
+
export var StartSpeechSynthesisStream$ = [9, n0, _SSSS,
|
|
514
|
+
{ [_h]: ["POST", "/v1/synthesisStream", 200] }, () => StartSpeechSynthesisStreamInput$, () => StartSpeechSynthesisStreamOutput$
|
|
515
|
+
];
|
|
398
516
|
export var StartSpeechSynthesisTask$ = [9, n0, _SSST,
|
|
399
517
|
{ [_h]: ["POST", "/v1/synthesisTasks", 200] }, () => StartSpeechSynthesisTaskInput$, () => StartSpeechSynthesisTaskOutput$
|
|
400
518
|
];
|
package/dist-types/Polly.d.ts
CHANGED
|
@@ -6,6 +6,7 @@ import { GetSpeechSynthesisTaskCommandInput, GetSpeechSynthesisTaskCommandOutput
|
|
|
6
6
|
import { ListLexiconsCommandInput, ListLexiconsCommandOutput } from "./commands/ListLexiconsCommand";
|
|
7
7
|
import { ListSpeechSynthesisTasksCommandInput, ListSpeechSynthesisTasksCommandOutput } from "./commands/ListSpeechSynthesisTasksCommand";
|
|
8
8
|
import { PutLexiconCommandInput, PutLexiconCommandOutput } from "./commands/PutLexiconCommand";
|
|
9
|
+
import { StartSpeechSynthesisStreamCommandInput, StartSpeechSynthesisStreamCommandOutput } from "./commands/StartSpeechSynthesisStreamCommand";
|
|
9
10
|
import { StartSpeechSynthesisTaskCommandInput, StartSpeechSynthesisTaskCommandOutput } from "./commands/StartSpeechSynthesisTaskCommand";
|
|
10
11
|
import { SynthesizeSpeechCommandInput, SynthesizeSpeechCommandOutput } from "./commands/SynthesizeSpeechCommand";
|
|
11
12
|
import { PollyClient } from "./PollyClient";
|
|
@@ -55,6 +56,12 @@ export interface Polly {
|
|
|
55
56
|
putLexicon(args: PutLexiconCommandInput, options?: __HttpHandlerOptions): Promise<PutLexiconCommandOutput>;
|
|
56
57
|
putLexicon(args: PutLexiconCommandInput, cb: (err: any, data?: PutLexiconCommandOutput) => void): void;
|
|
57
58
|
putLexicon(args: PutLexiconCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: PutLexiconCommandOutput) => void): void;
|
|
59
|
+
/**
|
|
60
|
+
* @see {@link StartSpeechSynthesisStreamCommand}
|
|
61
|
+
*/
|
|
62
|
+
startSpeechSynthesisStream(args: StartSpeechSynthesisStreamCommandInput, options?: __HttpHandlerOptions): Promise<StartSpeechSynthesisStreamCommandOutput>;
|
|
63
|
+
startSpeechSynthesisStream(args: StartSpeechSynthesisStreamCommandInput, cb: (err: any, data?: StartSpeechSynthesisStreamCommandOutput) => void): void;
|
|
64
|
+
startSpeechSynthesisStream(args: StartSpeechSynthesisStreamCommandInput, options: __HttpHandlerOptions, cb: (err: any, data?: StartSpeechSynthesisStreamCommandOutput) => void): void;
|
|
58
65
|
/**
|
|
59
66
|
* @see {@link StartSpeechSynthesisTaskCommand}
|
|
60
67
|
*/
|
|
@@ -1,11 +1,14 @@
|
|
|
1
|
+
import { type EventStreamInputConfig, type EventStreamResolvedConfig } from "@aws-sdk/middleware-eventstream";
|
|
1
2
|
import { type HostHeaderInputConfig, type HostHeaderResolvedConfig } from "@aws-sdk/middleware-host-header";
|
|
2
3
|
import { type UserAgentInputConfig, type UserAgentResolvedConfig } from "@aws-sdk/middleware-user-agent";
|
|
4
|
+
import { EventStreamPayloadHandlerProvider as __EventStreamPayloadHandlerProvider } from "@aws-sdk/types";
|
|
3
5
|
import { type RegionInputConfig, type RegionResolvedConfig } from "@smithy/config-resolver";
|
|
6
|
+
import { type EventStreamSerdeInputConfig, type EventStreamSerdeResolvedConfig } from "@smithy/eventstream-serde-config-resolver";
|
|
4
7
|
import { type EndpointInputConfig, type EndpointResolvedConfig } from "@smithy/middleware-endpoint";
|
|
5
8
|
import { type RetryInputConfig, type RetryResolvedConfig } from "@smithy/middleware-retry";
|
|
6
9
|
import type { HttpHandlerUserInput as __HttpHandlerUserInput } from "@smithy/protocol-http";
|
|
7
10
|
import { type DefaultsMode as __DefaultsMode, type SmithyConfiguration as __SmithyConfiguration, type SmithyResolvedConfiguration as __SmithyResolvedConfiguration, Client as __Client } from "@smithy/smithy-client";
|
|
8
|
-
import { type BodyLengthCalculator as __BodyLengthCalculator, type CheckOptionalClientConfig as __CheckOptionalClientConfig, type ChecksumConstructor as __ChecksumConstructor, type Decoder as __Decoder, type Encoder as __Encoder, type HashConstructor as __HashConstructor, type HttpHandlerOptions as __HttpHandlerOptions, type Logger as __Logger, type Provider as __Provider, type SdkStreamMixinInjector as __SdkStreamMixinInjector, type StreamCollector as __StreamCollector, type UrlParser as __UrlParser, AwsCredentialIdentityProvider, Provider, UserAgent as __UserAgent } from "@smithy/types";
|
|
11
|
+
import { type BodyLengthCalculator as __BodyLengthCalculator, type CheckOptionalClientConfig as __CheckOptionalClientConfig, type ChecksumConstructor as __ChecksumConstructor, type Decoder as __Decoder, type Encoder as __Encoder, type EventStreamSerdeProvider as __EventStreamSerdeProvider, type HashConstructor as __HashConstructor, type HttpHandlerOptions as __HttpHandlerOptions, type Logger as __Logger, type Provider as __Provider, type SdkStreamMixinInjector as __SdkStreamMixinInjector, type StreamCollector as __StreamCollector, type UrlParser as __UrlParser, AwsCredentialIdentityProvider, Provider, UserAgent as __UserAgent } from "@smithy/types";
|
|
9
12
|
import { type HttpAuthSchemeInputConfig, type HttpAuthSchemeResolvedConfig } from "./auth/httpAuthSchemeProvider";
|
|
10
13
|
import { DeleteLexiconCommandInput, DeleteLexiconCommandOutput } from "./commands/DeleteLexiconCommand";
|
|
11
14
|
import { DescribeVoicesCommandInput, DescribeVoicesCommandOutput } from "./commands/DescribeVoicesCommand";
|
|
@@ -14,6 +17,7 @@ import { GetSpeechSynthesisTaskCommandInput, GetSpeechSynthesisTaskCommandOutput
|
|
|
14
17
|
import { ListLexiconsCommandInput, ListLexiconsCommandOutput } from "./commands/ListLexiconsCommand";
|
|
15
18
|
import { ListSpeechSynthesisTasksCommandInput, ListSpeechSynthesisTasksCommandOutput } from "./commands/ListSpeechSynthesisTasksCommand";
|
|
16
19
|
import { PutLexiconCommandInput, PutLexiconCommandOutput } from "./commands/PutLexiconCommand";
|
|
20
|
+
import { StartSpeechSynthesisStreamCommandInput, StartSpeechSynthesisStreamCommandOutput } from "./commands/StartSpeechSynthesisStreamCommand";
|
|
17
21
|
import { StartSpeechSynthesisTaskCommandInput, StartSpeechSynthesisTaskCommandOutput } from "./commands/StartSpeechSynthesisTaskCommand";
|
|
18
22
|
import { SynthesizeSpeechCommandInput, SynthesizeSpeechCommandOutput } from "./commands/SynthesizeSpeechCommand";
|
|
19
23
|
import { ClientInputEndpointParameters, ClientResolvedEndpointParameters, EndpointParameters } from "./endpoint/EndpointParameters";
|
|
@@ -22,11 +26,11 @@ export { __Client };
|
|
|
22
26
|
/**
|
|
23
27
|
* @public
|
|
24
28
|
*/
|
|
25
|
-
export type ServiceInputTypes = DeleteLexiconCommandInput | DescribeVoicesCommandInput | GetLexiconCommandInput | GetSpeechSynthesisTaskCommandInput | ListLexiconsCommandInput | ListSpeechSynthesisTasksCommandInput | PutLexiconCommandInput | StartSpeechSynthesisTaskCommandInput | SynthesizeSpeechCommandInput;
|
|
29
|
+
export type ServiceInputTypes = DeleteLexiconCommandInput | DescribeVoicesCommandInput | GetLexiconCommandInput | GetSpeechSynthesisTaskCommandInput | ListLexiconsCommandInput | ListSpeechSynthesisTasksCommandInput | PutLexiconCommandInput | StartSpeechSynthesisStreamCommandInput | StartSpeechSynthesisTaskCommandInput | SynthesizeSpeechCommandInput;
|
|
26
30
|
/**
|
|
27
31
|
* @public
|
|
28
32
|
*/
|
|
29
|
-
export type ServiceOutputTypes = DeleteLexiconCommandOutput | DescribeVoicesCommandOutput | GetLexiconCommandOutput | GetSpeechSynthesisTaskCommandOutput | ListLexiconsCommandOutput | ListSpeechSynthesisTasksCommandOutput | PutLexiconCommandOutput | StartSpeechSynthesisTaskCommandOutput | SynthesizeSpeechCommandOutput;
|
|
33
|
+
export type ServiceOutputTypes = DeleteLexiconCommandOutput | DescribeVoicesCommandOutput | GetLexiconCommandOutput | GetSpeechSynthesisTaskCommandOutput | ListLexiconsCommandOutput | ListSpeechSynthesisTasksCommandOutput | PutLexiconCommandOutput | StartSpeechSynthesisStreamCommandOutput | StartSpeechSynthesisTaskCommandOutput | SynthesizeSpeechCommandOutput;
|
|
30
34
|
/**
|
|
31
35
|
* @public
|
|
32
36
|
*/
|
|
@@ -150,10 +154,19 @@ export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHand
|
|
|
150
154
|
* Optional extensions
|
|
151
155
|
*/
|
|
152
156
|
extensions?: RuntimeExtension[];
|
|
157
|
+
/**
|
|
158
|
+
* The function that provides necessary utilities for generating and parsing event stream
|
|
159
|
+
*/
|
|
160
|
+
eventStreamSerdeProvider?: __EventStreamSerdeProvider;
|
|
153
161
|
/**
|
|
154
162
|
* The {@link @smithy/smithy-client#DefaultsMode} that will be used to determine how certain default configuration options are resolved in the SDK.
|
|
155
163
|
*/
|
|
156
164
|
defaultsMode?: __DefaultsMode | __Provider<__DefaultsMode>;
|
|
165
|
+
/**
|
|
166
|
+
* The function that provides necessary utilities for handling request event stream.
|
|
167
|
+
* @internal
|
|
168
|
+
*/
|
|
169
|
+
eventStreamPayloadHandlerProvider?: __EventStreamPayloadHandlerProvider;
|
|
157
170
|
/**
|
|
158
171
|
* The internal function that inject utilities to runtime-specific stream to help users consume the data
|
|
159
172
|
* @internal
|
|
@@ -163,7 +176,7 @@ export interface ClientDefaults extends Partial<__SmithyConfiguration<__HttpHand
|
|
|
163
176
|
/**
|
|
164
177
|
* @public
|
|
165
178
|
*/
|
|
166
|
-
export type PollyClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & UserAgentInputConfig & RetryInputConfig & RegionInputConfig & HostHeaderInputConfig & EndpointInputConfig<EndpointParameters> & HttpAuthSchemeInputConfig & ClientInputEndpointParameters;
|
|
179
|
+
export type PollyClientConfigType = Partial<__SmithyConfiguration<__HttpHandlerOptions>> & ClientDefaults & UserAgentInputConfig & RetryInputConfig & RegionInputConfig & HostHeaderInputConfig & EndpointInputConfig<EndpointParameters> & EventStreamSerdeInputConfig & HttpAuthSchemeInputConfig & EventStreamInputConfig & ClientInputEndpointParameters;
|
|
167
180
|
/**
|
|
168
181
|
* @public
|
|
169
182
|
*
|
|
@@ -174,7 +187,7 @@ export interface PollyClientConfig extends PollyClientConfigType {
|
|
|
174
187
|
/**
|
|
175
188
|
* @public
|
|
176
189
|
*/
|
|
177
|
-
export type PollyClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig & UserAgentResolvedConfig & RetryResolvedConfig & RegionResolvedConfig & HostHeaderResolvedConfig & EndpointResolvedConfig<EndpointParameters> & HttpAuthSchemeResolvedConfig & ClientResolvedEndpointParameters;
|
|
190
|
+
export type PollyClientResolvedConfigType = __SmithyResolvedConfiguration<__HttpHandlerOptions> & Required<ClientDefaults> & RuntimeExtensionsConfig & UserAgentResolvedConfig & RetryResolvedConfig & RegionResolvedConfig & HostHeaderResolvedConfig & EndpointResolvedConfig<EndpointParameters> & EventStreamSerdeResolvedConfig & HttpAuthSchemeResolvedConfig & EventStreamResolvedConfig & ClientResolvedEndpointParameters;
|
|
178
191
|
/**
|
|
179
192
|
* @public
|
|
180
193
|
*
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
import { Command as $Command } from "@smithy/smithy-client";
|
|
2
|
+
import type { MetadataBearer as __MetadataBearer } from "@smithy/types";
|
|
3
|
+
import type { StartSpeechSynthesisStreamInput, StartSpeechSynthesisStreamOutput } from "../models/models_0";
|
|
4
|
+
import type { PollyClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes } from "../PollyClient";
|
|
5
|
+
/**
|
|
6
|
+
* @public
|
|
7
|
+
*/
|
|
8
|
+
export type { __MetadataBearer };
|
|
9
|
+
export { $Command };
|
|
10
|
+
/**
|
|
11
|
+
* @public
|
|
12
|
+
*
|
|
13
|
+
* The input for {@link StartSpeechSynthesisStreamCommand}.
|
|
14
|
+
*/
|
|
15
|
+
export interface StartSpeechSynthesisStreamCommandInput extends StartSpeechSynthesisStreamInput {
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* @public
|
|
19
|
+
*
|
|
20
|
+
* The output of {@link StartSpeechSynthesisStreamCommand}.
|
|
21
|
+
*/
|
|
22
|
+
export interface StartSpeechSynthesisStreamCommandOutput extends StartSpeechSynthesisStreamOutput, __MetadataBearer {
|
|
23
|
+
}
|
|
24
|
+
declare const StartSpeechSynthesisStreamCommand_base: {
|
|
25
|
+
new (input: StartSpeechSynthesisStreamCommandInput): import("@smithy/smithy-client").CommandImpl<StartSpeechSynthesisStreamCommandInput, StartSpeechSynthesisStreamCommandOutput, PollyClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
26
|
+
new (input: StartSpeechSynthesisStreamCommandInput): import("@smithy/smithy-client").CommandImpl<StartSpeechSynthesisStreamCommandInput, StartSpeechSynthesisStreamCommandOutput, PollyClientResolvedConfig, ServiceInputTypes, ServiceOutputTypes>;
|
|
27
|
+
getEndpointParameterInstructions(): import("@smithy/middleware-endpoint").EndpointParameterInstructions;
|
|
28
|
+
};
|
|
29
|
+
/**
|
|
30
|
+
* <p>Synthesizes UTF-8 input, plain text, or SSML over a bidirectional streaming connection.
|
|
31
|
+
* Specify synthesis parameters in HTTP/2 headers, send text incrementally as events on the input stream,
|
|
32
|
+
* and receive synthesized audio as it becomes available.</p>
|
|
33
|
+
* <p>This operation serves as a bidirectional counterpart to <code>SynthesizeSpeech</code>:</p>
|
|
34
|
+
* <ul>
|
|
35
|
+
* <li>
|
|
36
|
+
* <p>
|
|
37
|
+
* <a href="https://docs.aws.amazon.com/polly/latest/API/API_SynthesizeSpeech.html">SynthesizeSpeech</a>
|
|
38
|
+
* </p>
|
|
39
|
+
* </li>
|
|
40
|
+
* </ul>
|
|
41
|
+
* @example
|
|
42
|
+
* Use a bare-bones client and the command you need to make an API call.
|
|
43
|
+
* ```javascript
|
|
44
|
+
* import { PollyClient, StartSpeechSynthesisStreamCommand } from "@aws-sdk/client-polly"; // ES Modules import
|
|
45
|
+
* // const { PollyClient, StartSpeechSynthesisStreamCommand } = require("@aws-sdk/client-polly"); // CommonJS import
|
|
46
|
+
* // import type { PollyClientConfig } from "@aws-sdk/client-polly";
|
|
47
|
+
* const config = {}; // type is PollyClientConfig
|
|
48
|
+
* const client = new PollyClient(config);
|
|
49
|
+
* const input = { // StartSpeechSynthesisStreamInput
|
|
50
|
+
* Engine: "standard" || "neural" || "long-form" || "generative", // required
|
|
51
|
+
* LanguageCode: "arb" || "cmn-CN" || "cy-GB" || "da-DK" || "de-DE" || "en-AU" || "en-GB" || "en-GB-WLS" || "en-IN" || "en-US" || "es-ES" || "es-MX" || "es-US" || "fr-CA" || "fr-FR" || "is-IS" || "it-IT" || "ja-JP" || "hi-IN" || "ko-KR" || "nb-NO" || "nl-NL" || "pl-PL" || "pt-BR" || "pt-PT" || "ro-RO" || "ru-RU" || "sv-SE" || "tr-TR" || "en-NZ" || "en-ZA" || "ca-ES" || "de-AT" || "yue-CN" || "ar-AE" || "fi-FI" || "en-IE" || "nl-BE" || "fr-BE" || "cs-CZ" || "de-CH" || "en-SG",
|
|
52
|
+
* LexiconNames: [ // LexiconNameList
|
|
53
|
+
* "STRING_VALUE",
|
|
54
|
+
* ],
|
|
55
|
+
* OutputFormat: "json" || "mp3" || "ogg_opus" || "ogg_vorbis" || "pcm", // required
|
|
56
|
+
* SampleRate: "STRING_VALUE",
|
|
57
|
+
* VoiceId: "Aditi" || "Amy" || "Astrid" || "Bianca" || "Brian" || "Camila" || "Carla" || "Carmen" || "Celine" || "Chantal" || "Conchita" || "Cristiano" || "Dora" || "Emma" || "Enrique" || "Ewa" || "Filiz" || "Gabrielle" || "Geraint" || "Giorgio" || "Gwyneth" || "Hans" || "Ines" || "Ivy" || "Jacek" || "Jan" || "Joanna" || "Joey" || "Justin" || "Karl" || "Kendra" || "Kevin" || "Kimberly" || "Lea" || "Liv" || "Lotte" || "Lucia" || "Lupe" || "Mads" || "Maja" || "Marlene" || "Mathieu" || "Matthew" || "Maxim" || "Mia" || "Miguel" || "Mizuki" || "Naja" || "Nicole" || "Olivia" || "Penelope" || "Raveena" || "Ricardo" || "Ruben" || "Russell" || "Salli" || "Seoyeon" || "Takumi" || "Tatyana" || "Vicki" || "Vitoria" || "Zeina" || "Zhiyu" || "Aria" || "Ayanda" || "Arlet" || "Hannah" || "Arthur" || "Daniel" || "Liam" || "Pedro" || "Kajal" || "Hiujin" || "Laura" || "Elin" || "Ida" || "Suvi" || "Ola" || "Hala" || "Andres" || "Sergio" || "Remi" || "Adriano" || "Thiago" || "Ruth" || "Stephen" || "Kazuha" || "Tomoko" || "Niamh" || "Sofie" || "Lisa" || "Isabelle" || "Zayd" || "Danielle" || "Gregory" || "Burcu" || "Jitka" || "Sabrina" || "Jasmine" || "Jihye" || "Ambre" || "Beatrice" || "Florian" || "Lennart" || "Lorenzo" || "Tiffany", // required
|
|
58
|
+
* ActionStream: { // StartSpeechSynthesisStreamActionStream Union: only one key present
|
|
59
|
+
* TextEvent: { // TextEvent
|
|
60
|
+
* Text: "STRING_VALUE", // required
|
|
61
|
+
* TextType: "ssml" || "text",
|
|
62
|
+
* FlushStreamConfiguration: { // FlushStreamConfiguration
|
|
63
|
+
* Force: true || false,
|
|
64
|
+
* },
|
|
65
|
+
* },
|
|
66
|
+
* CloseStreamEvent: {},
|
|
67
|
+
* },
|
|
68
|
+
* };
|
|
69
|
+
* const command = new StartSpeechSynthesisStreamCommand(input);
|
|
70
|
+
* const response = await client.send(command);
|
|
71
|
+
* // { // StartSpeechSynthesisStreamOutput
|
|
72
|
+
* // EventStream: { // StartSpeechSynthesisStreamEventStream Union: only one key present
|
|
73
|
+
* // AudioEvent: { // AudioEvent
|
|
74
|
+
* // AudioChunk: new Uint8Array(),
|
|
75
|
+
* // },
|
|
76
|
+
* // StreamClosedEvent: { // StreamClosedEvent
|
|
77
|
+
* // RequestCharacters: Number("int"),
|
|
78
|
+
* // },
|
|
79
|
+
* // ValidationException: { // ValidationException
|
|
80
|
+
* // message: "STRING_VALUE", // required
|
|
81
|
+
* // reason: "unsupportedOperation" || "fieldValidationFailed" || "other" || "invalidInboundEvent", // required
|
|
82
|
+
* // fields: [ // ValidationExceptionFieldList
|
|
83
|
+
* // { // ValidationExceptionField
|
|
84
|
+
* // name: "STRING_VALUE", // required
|
|
85
|
+
* // message: "STRING_VALUE", // required
|
|
86
|
+
* // },
|
|
87
|
+
* // ],
|
|
88
|
+
* // },
|
|
89
|
+
* // ServiceQuotaExceededException: { // ServiceQuotaExceededException
|
|
90
|
+
* // message: "STRING_VALUE", // required
|
|
91
|
+
* // quotaCode: "input-stream-inbound-event-timeout" || "input-stream-timeout", // required
|
|
92
|
+
* // serviceCode: "polly", // required
|
|
93
|
+
* // },
|
|
94
|
+
* // ServiceFailureException: { // ServiceFailureException
|
|
95
|
+
* // message: "STRING_VALUE",
|
|
96
|
+
* // },
|
|
97
|
+
* // ThrottlingException: { // ThrottlingException
|
|
98
|
+
* // message: "STRING_VALUE",
|
|
99
|
+
* // throttlingReasons: [ // ThrottlingReasonList
|
|
100
|
+
* // { // ThrottlingReason
|
|
101
|
+
* // reason: "STRING_VALUE",
|
|
102
|
+
* // resource: "STRING_VALUE",
|
|
103
|
+
* // },
|
|
104
|
+
* // ],
|
|
105
|
+
* // },
|
|
106
|
+
* // },
|
|
107
|
+
* // };
|
|
108
|
+
*
|
|
109
|
+
* ```
|
|
110
|
+
*
|
|
111
|
+
* @param StartSpeechSynthesisStreamCommandInput - {@link StartSpeechSynthesisStreamCommandInput}
|
|
112
|
+
* @returns {@link StartSpeechSynthesisStreamCommandOutput}
|
|
113
|
+
* @see {@link StartSpeechSynthesisStreamCommandInput} for command's `input` shape.
|
|
114
|
+
* @see {@link StartSpeechSynthesisStreamCommandOutput} for command's `response` shape.
|
|
115
|
+
* @see {@link PollyClientResolvedConfig | config} for PollyClient's `config` shape.
|
|
116
|
+
*
|
|
117
|
+
* @throws {@link ServiceFailureException} (server fault)
|
|
118
|
+
* <p>An unknown condition has caused a service failure.</p>
|
|
119
|
+
*
|
|
120
|
+
* @throws {@link ServiceQuotaExceededException} (client fault)
|
|
121
|
+
* <p>The request would cause a service quota to be exceeded.</p>
|
|
122
|
+
*
|
|
123
|
+
* @throws {@link ThrottlingException} (client fault)
|
|
124
|
+
* <p>The request was denied because of request throttling.</p>
|
|
125
|
+
*
|
|
126
|
+
* @throws {@link ValidationException} (client fault)
|
|
127
|
+
* <p>The input fails to satisfy the constraints specified by the service.</p>
|
|
128
|
+
*
|
|
129
|
+
* @throws {@link PollyServiceException}
|
|
130
|
+
* <p>Base exception class for all service exceptions from Polly service.</p>
|
|
131
|
+
*
|
|
132
|
+
*
|
|
133
|
+
* @public
|
|
134
|
+
*/
|
|
135
|
+
export declare class StartSpeechSynthesisStreamCommand extends StartSpeechSynthesisStreamCommand_base {
|
|
136
|
+
/** @internal type navigation helper, not in runtime. */
|
|
137
|
+
protected static __types: {
|
|
138
|
+
api: {
|
|
139
|
+
input: StartSpeechSynthesisStreamInput;
|
|
140
|
+
output: StartSpeechSynthesisStreamOutput;
|
|
141
|
+
};
|
|
142
|
+
sdk: {
|
|
143
|
+
input: StartSpeechSynthesisStreamCommandInput;
|
|
144
|
+
output: StartSpeechSynthesisStreamCommandOutput;
|
|
145
|
+
};
|
|
146
|
+
};
|
|
147
|
+
}
|
|
@@ -5,5 +5,6 @@ export * from "./GetSpeechSynthesisTaskCommand";
|
|
|
5
5
|
export * from "./ListLexiconsCommand";
|
|
6
6
|
export * from "./ListSpeechSynthesisTasksCommand";
|
|
7
7
|
export * from "./PutLexiconCommand";
|
|
8
|
+
export * from "./StartSpeechSynthesisStreamCommand";
|
|
8
9
|
export * from "./StartSpeechSynthesisTaskCommand";
|
|
9
10
|
export * from "./SynthesizeSpeechCommand";
|
|
@@ -247,3 +247,40 @@ export declare const TextType: {
|
|
|
247
247
|
* @public
|
|
248
248
|
*/
|
|
249
249
|
export type TextType = (typeof TextType)[keyof typeof TextType];
|
|
250
|
+
/**
|
|
251
|
+
* @public
|
|
252
|
+
* @enum
|
|
253
|
+
*/
|
|
254
|
+
export declare const QuotaCode: {
|
|
255
|
+
readonly INPUT_STREAM_INBOUND_EVENT_TIMEOUT: "input-stream-inbound-event-timeout";
|
|
256
|
+
readonly INPUT_STREAM_TIMEOUT: "input-stream-timeout";
|
|
257
|
+
};
|
|
258
|
+
/**
|
|
259
|
+
* @public
|
|
260
|
+
*/
|
|
261
|
+
export type QuotaCode = (typeof QuotaCode)[keyof typeof QuotaCode];
|
|
262
|
+
/**
|
|
263
|
+
* @public
|
|
264
|
+
* @enum
|
|
265
|
+
*/
|
|
266
|
+
export declare const ServiceCode: {
|
|
267
|
+
readonly POLLY: "polly";
|
|
268
|
+
};
|
|
269
|
+
/**
|
|
270
|
+
* @public
|
|
271
|
+
*/
|
|
272
|
+
export type ServiceCode = (typeof ServiceCode)[keyof typeof ServiceCode];
|
|
273
|
+
/**
|
|
274
|
+
* @public
|
|
275
|
+
* @enum
|
|
276
|
+
*/
|
|
277
|
+
export declare const ValidationExceptionReason: {
|
|
278
|
+
readonly FIELD_VALIDATION_FAILED: "fieldValidationFailed";
|
|
279
|
+
readonly INVALID_INBOUND_EVENT: "invalidInboundEvent";
|
|
280
|
+
readonly OTHER: "other";
|
|
281
|
+
readonly UNSUPPORTED_OPERATION: "unsupportedOperation";
|
|
282
|
+
};
|
|
283
|
+
/**
|
|
284
|
+
* @public
|
|
285
|
+
*/
|
|
286
|
+
export type ValidationExceptionReason = (typeof ValidationExceptionReason)[keyof typeof ValidationExceptionReason];
|