@aws-sdk/client-polly 3.180.0 → 3.183.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/CHANGELOG.md +25 -0
- package/dist-cjs/models/models_0.js +120 -1
- package/dist-cjs/protocols/Aws_restJson1.js +15 -9
- package/dist-es/Polly.js +38 -45
- package/dist-es/PollyClient.js +22 -28
- package/dist-es/commands/DeleteLexiconCommand.js +21 -28
- package/dist-es/commands/DescribeVoicesCommand.js +21 -28
- package/dist-es/commands/GetLexiconCommand.js +21 -28
- package/dist-es/commands/GetSpeechSynthesisTaskCommand.js +21 -28
- package/dist-es/commands/ListLexiconsCommand.js +21 -28
- package/dist-es/commands/ListSpeechSynthesisTasksCommand.js +21 -28
- package/dist-es/commands/PutLexiconCommand.js +21 -28
- package/dist-es/commands/StartSpeechSynthesisTaskCommand.js +21 -28
- package/dist-es/commands/SynthesizeSpeechCommand.js +21 -28
- package/dist-es/endpoints.js +8 -8
- package/dist-es/models/PollyServiceException.js +5 -10
- package/dist-es/models/models_0.js +421 -255
- package/dist-es/pagination/ListSpeechSynthesisTasksPaginator.js +25 -68
- package/dist-es/protocols/Aws_restJson1.js +878 -1141
- package/dist-es/runtimeConfig.browser.js +26 -12
- package/dist-es/runtimeConfig.js +30 -12
- package/dist-es/runtimeConfig.native.js +8 -5
- package/dist-es/runtimeConfig.shared.js +8 -11
- package/dist-types/models/models_0.d.ts +116 -4
- package/dist-types/ts3.4/models/models_0.d.ts +116 -109
- package/package.json +33 -33
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,31 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
# [3.183.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.182.0...v3.183.0) (2022-10-03)
|
|
7
|
+
|
|
8
|
+
**Note:** Version bump only for package @aws-sdk/client-polly
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
# [3.181.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.180.0...v3.181.0) (2022-09-29)
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
### Bug Fixes
|
|
18
|
+
|
|
19
|
+
* **clients:** make parseErrorBody async ([#3999](https://github.com/aws/aws-sdk-js-v3/issues/3999)) ([2558c93](https://github.com/aws/aws-sdk-js-v3/commit/2558c93c050357ac6dc47aa0452b15b12ebfd676))
|
|
20
|
+
* **clients:** populate message field when parsing errors ([#3995](https://github.com/aws/aws-sdk-js-v3/issues/3995)) ([02e47f1](https://github.com/aws/aws-sdk-js-v3/commit/02e47f14397ae0a5d2e2883350d038b307fdcdb4))
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
### Features
|
|
24
|
+
|
|
25
|
+
* **client-polly:** Added support for the new Cantonese voice - Hiujin. Hiujin is available as a Neural voice only. ([9f1d83e](https://github.com/aws/aws-sdk-js-v3/commit/9f1d83e368d0180ca3e02b19fe786982e0d5a6e0))
|
|
26
|
+
|
|
27
|
+
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
|
|
6
31
|
# [3.180.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.179.0...v3.180.0) (2022-09-27)
|
|
7
32
|
|
|
8
33
|
**Note:** Version bump only for package @aws-sdk/client-polly
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.StartSpeechSynthesisTaskOutputFilterSensitiveLog = exports.StartSpeechSynthesisTaskInputFilterSensitiveLog = exports.PutLexiconOutputFilterSensitiveLog = exports.PutLexiconInputFilterSensitiveLog = exports.ListSpeechSynthesisTasksOutputFilterSensitiveLog = exports.ListSpeechSynthesisTasksInputFilterSensitiveLog = exports.ListLexiconsOutputFilterSensitiveLog = exports.ListLexiconsInputFilterSensitiveLog = exports.LexiconDescriptionFilterSensitiveLog = exports.GetSpeechSynthesisTaskOutputFilterSensitiveLog = exports.SynthesisTaskFilterSensitiveLog = exports.GetSpeechSynthesisTaskInputFilterSensitiveLog = exports.GetLexiconOutputFilterSensitiveLog = exports.LexiconAttributesFilterSensitiveLog = exports.LexiconFilterSensitiveLog = exports.GetLexiconInputFilterSensitiveLog = exports.DescribeVoicesOutputFilterSensitiveLog = exports.VoiceFilterSensitiveLog = exports.DescribeVoicesInputFilterSensitiveLog = exports.DeleteLexiconOutputFilterSensitiveLog = exports.DeleteLexiconInputFilterSensitiveLog = exports.TextLengthExceededException = exports.SsmlMarksNotSupportedForTextTypeException = exports.UnsupportedPlsLanguageException = exports.UnsupportedPlsAlphabetException = exports.MaxLexiconsNumberExceededException = exports.MaxLexemeLengthExceededException = exports.MarksNotSupportedForFormatException = exports.LexiconSizeExceededException = exports.LanguageNotSupportedException = exports.InvalidSsmlException = exports.InvalidSnsTopicArnException = exports.InvalidSampleRateException = exports.InvalidS3KeyException = exports.InvalidS3BucketException = exports.InvalidLexiconException = exports.SynthesisTaskNotFoundException = exports.InvalidTaskIdException = exports.TextType = exports.TaskStatus = exports.SpeechMarkType = exports.OutputFormat = exports.EngineNotSupportedException = exports.InvalidNextTokenException = exports.VoiceId = exports.Gender = exports.LanguageCode = exports.Engine = exports.ServiceFailureException = exports.LexiconNotFoundException = void 0;
|
|
4
|
+
exports.SynthesizeSpeechOutputFilterSensitiveLog = exports.SynthesizeSpeechInputFilterSensitiveLog = void 0;
|
|
4
5
|
const smithy_client_1 = require("@aws-sdk/smithy-client");
|
|
5
6
|
const PollyServiceException_1 = require("./PollyServiceException");
|
|
6
7
|
class LexiconNotFoundException extends PollyServiceException_1.PollyServiceException {
|
|
@@ -34,6 +35,124 @@ var Engine;
|
|
|
34
35
|
Engine["NEURAL"] = "neural";
|
|
35
36
|
Engine["STANDARD"] = "standard";
|
|
36
37
|
})(Engine = exports.Engine || (exports.Engine = {}));
|
|
38
|
+
var LanguageCode;
|
|
39
|
+
(function (LanguageCode) {
|
|
40
|
+
LanguageCode["arb"] = "arb";
|
|
41
|
+
LanguageCode["ca_ES"] = "ca-ES";
|
|
42
|
+
LanguageCode["cmn_CN"] = "cmn-CN";
|
|
43
|
+
LanguageCode["cy_GB"] = "cy-GB";
|
|
44
|
+
LanguageCode["da_DK"] = "da-DK";
|
|
45
|
+
LanguageCode["de_AT"] = "de-AT";
|
|
46
|
+
LanguageCode["de_DE"] = "de-DE";
|
|
47
|
+
LanguageCode["en_AU"] = "en-AU";
|
|
48
|
+
LanguageCode["en_GB"] = "en-GB";
|
|
49
|
+
LanguageCode["en_GB_WLS"] = "en-GB-WLS";
|
|
50
|
+
LanguageCode["en_IN"] = "en-IN";
|
|
51
|
+
LanguageCode["en_NZ"] = "en-NZ";
|
|
52
|
+
LanguageCode["en_US"] = "en-US";
|
|
53
|
+
LanguageCode["en_ZA"] = "en-ZA";
|
|
54
|
+
LanguageCode["es_ES"] = "es-ES";
|
|
55
|
+
LanguageCode["es_MX"] = "es-MX";
|
|
56
|
+
LanguageCode["es_US"] = "es-US";
|
|
57
|
+
LanguageCode["fr_CA"] = "fr-CA";
|
|
58
|
+
LanguageCode["fr_FR"] = "fr-FR";
|
|
59
|
+
LanguageCode["hi_IN"] = "hi-IN";
|
|
60
|
+
LanguageCode["is_IS"] = "is-IS";
|
|
61
|
+
LanguageCode["it_IT"] = "it-IT";
|
|
62
|
+
LanguageCode["ja_JP"] = "ja-JP";
|
|
63
|
+
LanguageCode["ko_KR"] = "ko-KR";
|
|
64
|
+
LanguageCode["nb_NO"] = "nb-NO";
|
|
65
|
+
LanguageCode["nl_NL"] = "nl-NL";
|
|
66
|
+
LanguageCode["pl_PL"] = "pl-PL";
|
|
67
|
+
LanguageCode["pt_BR"] = "pt-BR";
|
|
68
|
+
LanguageCode["pt_PT"] = "pt-PT";
|
|
69
|
+
LanguageCode["ro_RO"] = "ro-RO";
|
|
70
|
+
LanguageCode["ru_RU"] = "ru-RU";
|
|
71
|
+
LanguageCode["sv_SE"] = "sv-SE";
|
|
72
|
+
LanguageCode["tr_TR"] = "tr-TR";
|
|
73
|
+
LanguageCode["yue_CN"] = "yue-CN";
|
|
74
|
+
})(LanguageCode = exports.LanguageCode || (exports.LanguageCode = {}));
|
|
75
|
+
var Gender;
|
|
76
|
+
(function (Gender) {
|
|
77
|
+
Gender["Female"] = "Female";
|
|
78
|
+
Gender["Male"] = "Male";
|
|
79
|
+
})(Gender = exports.Gender || (exports.Gender = {}));
|
|
80
|
+
var VoiceId;
|
|
81
|
+
(function (VoiceId) {
|
|
82
|
+
VoiceId["Aditi"] = "Aditi";
|
|
83
|
+
VoiceId["Amy"] = "Amy";
|
|
84
|
+
VoiceId["Aria"] = "Aria";
|
|
85
|
+
VoiceId["Arlet"] = "Arlet";
|
|
86
|
+
VoiceId["Arthur"] = "Arthur";
|
|
87
|
+
VoiceId["Astrid"] = "Astrid";
|
|
88
|
+
VoiceId["Ayanda"] = "Ayanda";
|
|
89
|
+
VoiceId["Bianca"] = "Bianca";
|
|
90
|
+
VoiceId["Brian"] = "Brian";
|
|
91
|
+
VoiceId["Camila"] = "Camila";
|
|
92
|
+
VoiceId["Carla"] = "Carla";
|
|
93
|
+
VoiceId["Carmen"] = "Carmen";
|
|
94
|
+
VoiceId["Celine"] = "Celine";
|
|
95
|
+
VoiceId["Chantal"] = "Chantal";
|
|
96
|
+
VoiceId["Conchita"] = "Conchita";
|
|
97
|
+
VoiceId["Cristiano"] = "Cristiano";
|
|
98
|
+
VoiceId["Daniel"] = "Daniel";
|
|
99
|
+
VoiceId["Dora"] = "Dora";
|
|
100
|
+
VoiceId["Emma"] = "Emma";
|
|
101
|
+
VoiceId["Enrique"] = "Enrique";
|
|
102
|
+
VoiceId["Ewa"] = "Ewa";
|
|
103
|
+
VoiceId["Filiz"] = "Filiz";
|
|
104
|
+
VoiceId["Gabrielle"] = "Gabrielle";
|
|
105
|
+
VoiceId["Geraint"] = "Geraint";
|
|
106
|
+
VoiceId["Giorgio"] = "Giorgio";
|
|
107
|
+
VoiceId["Gwyneth"] = "Gwyneth";
|
|
108
|
+
VoiceId["Hannah"] = "Hannah";
|
|
109
|
+
VoiceId["Hans"] = "Hans";
|
|
110
|
+
VoiceId["Hiujin"] = "Hiujin";
|
|
111
|
+
VoiceId["Ines"] = "Ines";
|
|
112
|
+
VoiceId["Ivy"] = "Ivy";
|
|
113
|
+
VoiceId["Jacek"] = "Jacek";
|
|
114
|
+
VoiceId["Jan"] = "Jan";
|
|
115
|
+
VoiceId["Joanna"] = "Joanna";
|
|
116
|
+
VoiceId["Joey"] = "Joey";
|
|
117
|
+
VoiceId["Justin"] = "Justin";
|
|
118
|
+
VoiceId["Kajal"] = "Kajal";
|
|
119
|
+
VoiceId["Karl"] = "Karl";
|
|
120
|
+
VoiceId["Kendra"] = "Kendra";
|
|
121
|
+
VoiceId["Kevin"] = "Kevin";
|
|
122
|
+
VoiceId["Kimberly"] = "Kimberly";
|
|
123
|
+
VoiceId["Lea"] = "Lea";
|
|
124
|
+
VoiceId["Liam"] = "Liam";
|
|
125
|
+
VoiceId["Liv"] = "Liv";
|
|
126
|
+
VoiceId["Lotte"] = "Lotte";
|
|
127
|
+
VoiceId["Lucia"] = "Lucia";
|
|
128
|
+
VoiceId["Lupe"] = "Lupe";
|
|
129
|
+
VoiceId["Mads"] = "Mads";
|
|
130
|
+
VoiceId["Maja"] = "Maja";
|
|
131
|
+
VoiceId["Marlene"] = "Marlene";
|
|
132
|
+
VoiceId["Mathieu"] = "Mathieu";
|
|
133
|
+
VoiceId["Matthew"] = "Matthew";
|
|
134
|
+
VoiceId["Maxim"] = "Maxim";
|
|
135
|
+
VoiceId["Mia"] = "Mia";
|
|
136
|
+
VoiceId["Miguel"] = "Miguel";
|
|
137
|
+
VoiceId["Mizuki"] = "Mizuki";
|
|
138
|
+
VoiceId["Naja"] = "Naja";
|
|
139
|
+
VoiceId["Nicole"] = "Nicole";
|
|
140
|
+
VoiceId["Olivia"] = "Olivia";
|
|
141
|
+
VoiceId["Pedro"] = "Pedro";
|
|
142
|
+
VoiceId["Penelope"] = "Penelope";
|
|
143
|
+
VoiceId["Raveena"] = "Raveena";
|
|
144
|
+
VoiceId["Ricardo"] = "Ricardo";
|
|
145
|
+
VoiceId["Ruben"] = "Ruben";
|
|
146
|
+
VoiceId["Russell"] = "Russell";
|
|
147
|
+
VoiceId["Salli"] = "Salli";
|
|
148
|
+
VoiceId["Seoyeon"] = "Seoyeon";
|
|
149
|
+
VoiceId["Takumi"] = "Takumi";
|
|
150
|
+
VoiceId["Tatyana"] = "Tatyana";
|
|
151
|
+
VoiceId["Vicki"] = "Vicki";
|
|
152
|
+
VoiceId["Vitoria"] = "Vitoria";
|
|
153
|
+
VoiceId["Zeina"] = "Zeina";
|
|
154
|
+
VoiceId["Zhiyu"] = "Zhiyu";
|
|
155
|
+
})(VoiceId = exports.VoiceId || (exports.VoiceId = {}));
|
|
37
156
|
class InvalidNextTokenException extends PollyServiceException_1.PollyServiceException {
|
|
38
157
|
constructor(opts) {
|
|
39
158
|
super({
|
|
@@ -229,7 +229,7 @@ exports.deserializeAws_restJson1DeleteLexiconCommand = deserializeAws_restJson1D
|
|
|
229
229
|
const deserializeAws_restJson1DeleteLexiconCommandError = async (output, context) => {
|
|
230
230
|
const parsedOutput = {
|
|
231
231
|
...output,
|
|
232
|
-
body: await
|
|
232
|
+
body: await parseErrorBody(output.body, context),
|
|
233
233
|
};
|
|
234
234
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
235
235
|
switch (errorCode) {
|
|
@@ -269,7 +269,7 @@ exports.deserializeAws_restJson1DescribeVoicesCommand = deserializeAws_restJson1
|
|
|
269
269
|
const deserializeAws_restJson1DescribeVoicesCommandError = async (output, context) => {
|
|
270
270
|
const parsedOutput = {
|
|
271
271
|
...output,
|
|
272
|
-
body: await
|
|
272
|
+
body: await parseErrorBody(output.body, context),
|
|
273
273
|
};
|
|
274
274
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
275
275
|
switch (errorCode) {
|
|
@@ -309,7 +309,7 @@ exports.deserializeAws_restJson1GetLexiconCommand = deserializeAws_restJson1GetL
|
|
|
309
309
|
const deserializeAws_restJson1GetLexiconCommandError = async (output, context) => {
|
|
310
310
|
const parsedOutput = {
|
|
311
311
|
...output,
|
|
312
|
-
body: await
|
|
312
|
+
body: await parseErrorBody(output.body, context),
|
|
313
313
|
};
|
|
314
314
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
315
315
|
switch (errorCode) {
|
|
@@ -346,7 +346,7 @@ exports.deserializeAws_restJson1GetSpeechSynthesisTaskCommand = deserializeAws_r
|
|
|
346
346
|
const deserializeAws_restJson1GetSpeechSynthesisTaskCommandError = async (output, context) => {
|
|
347
347
|
const parsedOutput = {
|
|
348
348
|
...output,
|
|
349
|
-
body: await
|
|
349
|
+
body: await parseErrorBody(output.body, context),
|
|
350
350
|
};
|
|
351
351
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
352
352
|
switch (errorCode) {
|
|
@@ -389,7 +389,7 @@ exports.deserializeAws_restJson1ListLexiconsCommand = deserializeAws_restJson1Li
|
|
|
389
389
|
const deserializeAws_restJson1ListLexiconsCommandError = async (output, context) => {
|
|
390
390
|
const parsedOutput = {
|
|
391
391
|
...output,
|
|
392
|
-
body: await
|
|
392
|
+
body: await parseErrorBody(output.body, context),
|
|
393
393
|
};
|
|
394
394
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
395
395
|
switch (errorCode) {
|
|
@@ -429,7 +429,7 @@ exports.deserializeAws_restJson1ListSpeechSynthesisTasksCommand = deserializeAws
|
|
|
429
429
|
const deserializeAws_restJson1ListSpeechSynthesisTasksCommandError = async (output, context) => {
|
|
430
430
|
const parsedOutput = {
|
|
431
431
|
...output,
|
|
432
|
-
body: await
|
|
432
|
+
body: await parseErrorBody(output.body, context),
|
|
433
433
|
};
|
|
434
434
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
435
435
|
switch (errorCode) {
|
|
@@ -463,7 +463,7 @@ exports.deserializeAws_restJson1PutLexiconCommand = deserializeAws_restJson1PutL
|
|
|
463
463
|
const deserializeAws_restJson1PutLexiconCommandError = async (output, context) => {
|
|
464
464
|
const parsedOutput = {
|
|
465
465
|
...output,
|
|
466
|
-
body: await
|
|
466
|
+
body: await parseErrorBody(output.body, context),
|
|
467
467
|
};
|
|
468
468
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
469
469
|
switch (errorCode) {
|
|
@@ -515,7 +515,7 @@ exports.deserializeAws_restJson1StartSpeechSynthesisTaskCommand = deserializeAws
|
|
|
515
515
|
const deserializeAws_restJson1StartSpeechSynthesisTaskCommandError = async (output, context) => {
|
|
516
516
|
const parsedOutput = {
|
|
517
517
|
...output,
|
|
518
|
-
body: await
|
|
518
|
+
body: await parseErrorBody(output.body, context),
|
|
519
519
|
};
|
|
520
520
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
521
521
|
switch (errorCode) {
|
|
@@ -585,7 +585,7 @@ exports.deserializeAws_restJson1SynthesizeSpeechCommand = deserializeAws_restJso
|
|
|
585
585
|
const deserializeAws_restJson1SynthesizeSpeechCommandError = async (output, context) => {
|
|
586
586
|
const parsedOutput = {
|
|
587
587
|
...output,
|
|
588
|
-
body: await
|
|
588
|
+
body: await parseErrorBody(output.body, context),
|
|
589
589
|
};
|
|
590
590
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
591
591
|
switch (errorCode) {
|
|
@@ -1059,6 +1059,12 @@ const parseBody = (streamBody, context) => collectBodyString(streamBody, context
|
|
|
1059
1059
|
}
|
|
1060
1060
|
return {};
|
|
1061
1061
|
});
|
|
1062
|
+
const parseErrorBody = async (errorBody, context) => {
|
|
1063
|
+
var _a;
|
|
1064
|
+
const value = await parseBody(errorBody, context);
|
|
1065
|
+
value.message = (_a = value.message) !== null && _a !== void 0 ? _a : value.Message;
|
|
1066
|
+
return value;
|
|
1067
|
+
};
|
|
1062
1068
|
const loadRestJsonErrorCode = (output, data) => {
|
|
1063
1069
|
const findKey = (object, key) => Object.keys(object).find((k) => k.toLowerCase() === key.toLowerCase());
|
|
1064
1070
|
const sanitizeErrorCode = (rawValue) => {
|
package/dist-es/Polly.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __extends } from "tslib";
|
|
2
1
|
import { DeleteLexiconCommand, } from "./commands/DeleteLexiconCommand";
|
|
3
2
|
import { DescribeVoicesCommand, } from "./commands/DescribeVoicesCommand";
|
|
4
3
|
import { GetLexiconCommand } from "./commands/GetLexiconCommand";
|
|
@@ -9,137 +8,131 @@ import { PutLexiconCommand } from "./commands/PutLexiconCommand";
|
|
|
9
8
|
import { StartSpeechSynthesisTaskCommand, } from "./commands/StartSpeechSynthesisTaskCommand";
|
|
10
9
|
import { SynthesizeSpeechCommand, } from "./commands/SynthesizeSpeechCommand";
|
|
11
10
|
import { PollyClient } from "./PollyClient";
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
return _super !== null && _super.apply(this, arguments) || this;
|
|
16
|
-
}
|
|
17
|
-
Polly.prototype.deleteLexicon = function (args, optionsOrCb, cb) {
|
|
18
|
-
var command = new DeleteLexiconCommand(args);
|
|
11
|
+
export class Polly extends PollyClient {
|
|
12
|
+
deleteLexicon(args, optionsOrCb, cb) {
|
|
13
|
+
const command = new DeleteLexiconCommand(args);
|
|
19
14
|
if (typeof optionsOrCb === "function") {
|
|
20
15
|
this.send(command, optionsOrCb);
|
|
21
16
|
}
|
|
22
17
|
else if (typeof cb === "function") {
|
|
23
18
|
if (typeof optionsOrCb !== "object")
|
|
24
|
-
throw new Error(
|
|
19
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
25
20
|
this.send(command, optionsOrCb || {}, cb);
|
|
26
21
|
}
|
|
27
22
|
else {
|
|
28
23
|
return this.send(command, optionsOrCb);
|
|
29
24
|
}
|
|
30
|
-
}
|
|
31
|
-
|
|
32
|
-
|
|
25
|
+
}
|
|
26
|
+
describeVoices(args, optionsOrCb, cb) {
|
|
27
|
+
const command = new DescribeVoicesCommand(args);
|
|
33
28
|
if (typeof optionsOrCb === "function") {
|
|
34
29
|
this.send(command, optionsOrCb);
|
|
35
30
|
}
|
|
36
31
|
else if (typeof cb === "function") {
|
|
37
32
|
if (typeof optionsOrCb !== "object")
|
|
38
|
-
throw new Error(
|
|
33
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
39
34
|
this.send(command, optionsOrCb || {}, cb);
|
|
40
35
|
}
|
|
41
36
|
else {
|
|
42
37
|
return this.send(command, optionsOrCb);
|
|
43
38
|
}
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
|
|
39
|
+
}
|
|
40
|
+
getLexicon(args, optionsOrCb, cb) {
|
|
41
|
+
const command = new GetLexiconCommand(args);
|
|
47
42
|
if (typeof optionsOrCb === "function") {
|
|
48
43
|
this.send(command, optionsOrCb);
|
|
49
44
|
}
|
|
50
45
|
else if (typeof cb === "function") {
|
|
51
46
|
if (typeof optionsOrCb !== "object")
|
|
52
|
-
throw new Error(
|
|
47
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
53
48
|
this.send(command, optionsOrCb || {}, cb);
|
|
54
49
|
}
|
|
55
50
|
else {
|
|
56
51
|
return this.send(command, optionsOrCb);
|
|
57
52
|
}
|
|
58
|
-
}
|
|
59
|
-
|
|
60
|
-
|
|
53
|
+
}
|
|
54
|
+
getSpeechSynthesisTask(args, optionsOrCb, cb) {
|
|
55
|
+
const command = new GetSpeechSynthesisTaskCommand(args);
|
|
61
56
|
if (typeof optionsOrCb === "function") {
|
|
62
57
|
this.send(command, optionsOrCb);
|
|
63
58
|
}
|
|
64
59
|
else if (typeof cb === "function") {
|
|
65
60
|
if (typeof optionsOrCb !== "object")
|
|
66
|
-
throw new Error(
|
|
61
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
67
62
|
this.send(command, optionsOrCb || {}, cb);
|
|
68
63
|
}
|
|
69
64
|
else {
|
|
70
65
|
return this.send(command, optionsOrCb);
|
|
71
66
|
}
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
|
|
67
|
+
}
|
|
68
|
+
listLexicons(args, optionsOrCb, cb) {
|
|
69
|
+
const command = new ListLexiconsCommand(args);
|
|
75
70
|
if (typeof optionsOrCb === "function") {
|
|
76
71
|
this.send(command, optionsOrCb);
|
|
77
72
|
}
|
|
78
73
|
else if (typeof cb === "function") {
|
|
79
74
|
if (typeof optionsOrCb !== "object")
|
|
80
|
-
throw new Error(
|
|
75
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
81
76
|
this.send(command, optionsOrCb || {}, cb);
|
|
82
77
|
}
|
|
83
78
|
else {
|
|
84
79
|
return this.send(command, optionsOrCb);
|
|
85
80
|
}
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
|
|
81
|
+
}
|
|
82
|
+
listSpeechSynthesisTasks(args, optionsOrCb, cb) {
|
|
83
|
+
const command = new ListSpeechSynthesisTasksCommand(args);
|
|
89
84
|
if (typeof optionsOrCb === "function") {
|
|
90
85
|
this.send(command, optionsOrCb);
|
|
91
86
|
}
|
|
92
87
|
else if (typeof cb === "function") {
|
|
93
88
|
if (typeof optionsOrCb !== "object")
|
|
94
|
-
throw new Error(
|
|
89
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
95
90
|
this.send(command, optionsOrCb || {}, cb);
|
|
96
91
|
}
|
|
97
92
|
else {
|
|
98
93
|
return this.send(command, optionsOrCb);
|
|
99
94
|
}
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
|
|
95
|
+
}
|
|
96
|
+
putLexicon(args, optionsOrCb, cb) {
|
|
97
|
+
const command = new PutLexiconCommand(args);
|
|
103
98
|
if (typeof optionsOrCb === "function") {
|
|
104
99
|
this.send(command, optionsOrCb);
|
|
105
100
|
}
|
|
106
101
|
else if (typeof cb === "function") {
|
|
107
102
|
if (typeof optionsOrCb !== "object")
|
|
108
|
-
throw new Error(
|
|
103
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
109
104
|
this.send(command, optionsOrCb || {}, cb);
|
|
110
105
|
}
|
|
111
106
|
else {
|
|
112
107
|
return this.send(command, optionsOrCb);
|
|
113
108
|
}
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
|
|
109
|
+
}
|
|
110
|
+
startSpeechSynthesisTask(args, optionsOrCb, cb) {
|
|
111
|
+
const command = new StartSpeechSynthesisTaskCommand(args);
|
|
117
112
|
if (typeof optionsOrCb === "function") {
|
|
118
113
|
this.send(command, optionsOrCb);
|
|
119
114
|
}
|
|
120
115
|
else if (typeof cb === "function") {
|
|
121
116
|
if (typeof optionsOrCb !== "object")
|
|
122
|
-
throw new Error(
|
|
117
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
123
118
|
this.send(command, optionsOrCb || {}, cb);
|
|
124
119
|
}
|
|
125
120
|
else {
|
|
126
121
|
return this.send(command, optionsOrCb);
|
|
127
122
|
}
|
|
128
|
-
}
|
|
129
|
-
|
|
130
|
-
|
|
123
|
+
}
|
|
124
|
+
synthesizeSpeech(args, optionsOrCb, cb) {
|
|
125
|
+
const command = new SynthesizeSpeechCommand(args);
|
|
131
126
|
if (typeof optionsOrCb === "function") {
|
|
132
127
|
this.send(command, optionsOrCb);
|
|
133
128
|
}
|
|
134
129
|
else if (typeof cb === "function") {
|
|
135
130
|
if (typeof optionsOrCb !== "object")
|
|
136
|
-
throw new Error(
|
|
131
|
+
throw new Error(`Expect http options but get ${typeof optionsOrCb}`);
|
|
137
132
|
this.send(command, optionsOrCb || {}, cb);
|
|
138
133
|
}
|
|
139
134
|
else {
|
|
140
135
|
return this.send(command, optionsOrCb);
|
|
141
136
|
}
|
|
142
|
-
}
|
|
143
|
-
|
|
144
|
-
}(PollyClient));
|
|
145
|
-
export { Polly };
|
|
137
|
+
}
|
|
138
|
+
}
|
package/dist-es/PollyClient.js
CHANGED
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { __extends } from "tslib";
|
|
2
1
|
import { resolveEndpointsConfig, resolveRegionConfig, } from "@aws-sdk/config-resolver";
|
|
3
2
|
import { getContentLengthPlugin } from "@aws-sdk/middleware-content-length";
|
|
4
3
|
import { getHostHeaderPlugin, resolveHostHeaderConfig, } from "@aws-sdk/middleware-host-header";
|
|
@@ -9,31 +8,26 @@ import { getAwsAuthPlugin, resolveAwsAuthConfig, } from "@aws-sdk/middleware-sig
|
|
|
9
8
|
import { getUserAgentPlugin, resolveUserAgentConfig, } from "@aws-sdk/middleware-user-agent";
|
|
10
9
|
import { Client as __Client, } from "@aws-sdk/smithy-client";
|
|
11
10
|
import { getRuntimeConfig as __getRuntimeConfig } from "./runtimeConfig";
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
_this.middlewareStack.use(getAwsAuthPlugin(_this.config));
|
|
31
|
-
_this.middlewareStack.use(getUserAgentPlugin(_this.config));
|
|
32
|
-
return _this;
|
|
11
|
+
export class PollyClient extends __Client {
|
|
12
|
+
constructor(configuration) {
|
|
13
|
+
const _config_0 = __getRuntimeConfig(configuration);
|
|
14
|
+
const _config_1 = resolveRegionConfig(_config_0);
|
|
15
|
+
const _config_2 = resolveEndpointsConfig(_config_1);
|
|
16
|
+
const _config_3 = resolveRetryConfig(_config_2);
|
|
17
|
+
const _config_4 = resolveHostHeaderConfig(_config_3);
|
|
18
|
+
const _config_5 = resolveAwsAuthConfig(_config_4);
|
|
19
|
+
const _config_6 = resolveUserAgentConfig(_config_5);
|
|
20
|
+
super(_config_6);
|
|
21
|
+
this.config = _config_6;
|
|
22
|
+
this.middlewareStack.use(getRetryPlugin(this.config));
|
|
23
|
+
this.middlewareStack.use(getContentLengthPlugin(this.config));
|
|
24
|
+
this.middlewareStack.use(getHostHeaderPlugin(this.config));
|
|
25
|
+
this.middlewareStack.use(getLoggerPlugin(this.config));
|
|
26
|
+
this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
|
|
27
|
+
this.middlewareStack.use(getAwsAuthPlugin(this.config));
|
|
28
|
+
this.middlewareStack.use(getUserAgentPlugin(this.config));
|
|
33
29
|
}
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
}(__Client));
|
|
39
|
-
export { PollyClient };
|
|
30
|
+
destroy() {
|
|
31
|
+
super.destroy();
|
|
32
|
+
}
|
|
33
|
+
}
|
|
@@ -1,39 +1,32 @@
|
|
|
1
|
-
import { __extends } from "tslib";
|
|
2
1
|
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
2
|
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
3
|
import { DeleteLexiconInputFilterSensitiveLog, DeleteLexiconOutputFilterSensitiveLog, } from "../models/models_0";
|
|
5
4
|
import { deserializeAws_restJson1DeleteLexiconCommand, serializeAws_restJson1DeleteLexiconCommand, } from "../protocols/Aws_restJson1";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
_this.input = input;
|
|
11
|
-
return _this;
|
|
5
|
+
export class DeleteLexiconCommand extends $Command {
|
|
6
|
+
constructor(input) {
|
|
7
|
+
super();
|
|
8
|
+
this.input = input;
|
|
12
9
|
}
|
|
13
|
-
|
|
10
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
14
11
|
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
logger
|
|
21
|
-
clientName
|
|
22
|
-
commandName
|
|
12
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
13
|
+
const { logger } = configuration;
|
|
14
|
+
const clientName = "PollyClient";
|
|
15
|
+
const commandName = "DeleteLexiconCommand";
|
|
16
|
+
const handlerExecutionContext = {
|
|
17
|
+
logger,
|
|
18
|
+
clientName,
|
|
19
|
+
commandName,
|
|
23
20
|
inputFilterSensitiveLog: DeleteLexiconInputFilterSensitiveLog,
|
|
24
21
|
outputFilterSensitiveLog: DeleteLexiconOutputFilterSensitiveLog,
|
|
25
22
|
};
|
|
26
|
-
|
|
27
|
-
return stack.resolve(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
};
|
|
31
|
-
DeleteLexiconCommand.prototype.serialize = function (input, context) {
|
|
23
|
+
const { requestHandler } = configuration;
|
|
24
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
25
|
+
}
|
|
26
|
+
serialize(input, context) {
|
|
32
27
|
return serializeAws_restJson1DeleteLexiconCommand(input, context);
|
|
33
|
-
}
|
|
34
|
-
|
|
28
|
+
}
|
|
29
|
+
deserialize(output, context) {
|
|
35
30
|
return deserializeAws_restJson1DeleteLexiconCommand(output, context);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
}($Command));
|
|
39
|
-
export { DeleteLexiconCommand };
|
|
31
|
+
}
|
|
32
|
+
}
|
|
@@ -1,39 +1,32 @@
|
|
|
1
|
-
import { __extends } from "tslib";
|
|
2
1
|
import { getSerdePlugin } from "@aws-sdk/middleware-serde";
|
|
3
2
|
import { Command as $Command } from "@aws-sdk/smithy-client";
|
|
4
3
|
import { DescribeVoicesInputFilterSensitiveLog, DescribeVoicesOutputFilterSensitiveLog, } from "../models/models_0";
|
|
5
4
|
import { deserializeAws_restJson1DescribeVoicesCommand, serializeAws_restJson1DescribeVoicesCommand, } from "../protocols/Aws_restJson1";
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
_this.input = input;
|
|
11
|
-
return _this;
|
|
5
|
+
export class DescribeVoicesCommand extends $Command {
|
|
6
|
+
constructor(input) {
|
|
7
|
+
super();
|
|
8
|
+
this.input = input;
|
|
12
9
|
}
|
|
13
|
-
|
|
10
|
+
resolveMiddleware(clientStack, configuration, options) {
|
|
14
11
|
this.middlewareStack.use(getSerdePlugin(configuration, this.serialize, this.deserialize));
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
logger
|
|
21
|
-
clientName
|
|
22
|
-
commandName
|
|
12
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
13
|
+
const { logger } = configuration;
|
|
14
|
+
const clientName = "PollyClient";
|
|
15
|
+
const commandName = "DescribeVoicesCommand";
|
|
16
|
+
const handlerExecutionContext = {
|
|
17
|
+
logger,
|
|
18
|
+
clientName,
|
|
19
|
+
commandName,
|
|
23
20
|
inputFilterSensitiveLog: DescribeVoicesInputFilterSensitiveLog,
|
|
24
21
|
outputFilterSensitiveLog: DescribeVoicesOutputFilterSensitiveLog,
|
|
25
22
|
};
|
|
26
|
-
|
|
27
|
-
return stack.resolve(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
};
|
|
31
|
-
DescribeVoicesCommand.prototype.serialize = function (input, context) {
|
|
23
|
+
const { requestHandler } = configuration;
|
|
24
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
25
|
+
}
|
|
26
|
+
serialize(input, context) {
|
|
32
27
|
return serializeAws_restJson1DescribeVoicesCommand(input, context);
|
|
33
|
-
}
|
|
34
|
-
|
|
28
|
+
}
|
|
29
|
+
deserialize(output, context) {
|
|
35
30
|
return deserializeAws_restJson1DescribeVoicesCommand(output, context);
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
}($Command));
|
|
39
|
-
export { DescribeVoicesCommand };
|
|
31
|
+
}
|
|
32
|
+
}
|