@aws-sdk/client-polly 3.504.0 → 3.507.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/dist-cjs/index.js +52 -240
- package/dist-es/protocols/Aws_restJson1.js +51 -239
- package/package.json +3 -3
package/dist-cjs/index.js
CHANGED
|
@@ -920,7 +920,7 @@ var se_SynthesizeSpeechCommand = /* @__PURE__ */ __name(async (input, context) =
|
|
|
920
920
|
}, "se_SynthesizeSpeechCommand");
|
|
921
921
|
var de_DeleteLexiconCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
922
922
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
923
|
-
return
|
|
923
|
+
return de_CommandError(output, context);
|
|
924
924
|
}
|
|
925
925
|
const contents = (0, import_smithy_client.map)({
|
|
926
926
|
$metadata: deserializeMetadata(output)
|
|
@@ -928,31 +928,9 @@ var de_DeleteLexiconCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
928
928
|
await (0, import_smithy_client.collectBody)(output.body, context);
|
|
929
929
|
return contents;
|
|
930
930
|
}, "de_DeleteLexiconCommand");
|
|
931
|
-
var de_DeleteLexiconCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
932
|
-
const parsedOutput = {
|
|
933
|
-
...output,
|
|
934
|
-
body: await parseErrorBody(output.body, context)
|
|
935
|
-
};
|
|
936
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
937
|
-
switch (errorCode) {
|
|
938
|
-
case "LexiconNotFoundException":
|
|
939
|
-
case "com.amazonaws.polly#LexiconNotFoundException":
|
|
940
|
-
throw await de_LexiconNotFoundExceptionRes(parsedOutput, context);
|
|
941
|
-
case "ServiceFailureException":
|
|
942
|
-
case "com.amazonaws.polly#ServiceFailureException":
|
|
943
|
-
throw await de_ServiceFailureExceptionRes(parsedOutput, context);
|
|
944
|
-
default:
|
|
945
|
-
const parsedBody = parsedOutput.body;
|
|
946
|
-
return throwDefaultError({
|
|
947
|
-
output,
|
|
948
|
-
parsedBody,
|
|
949
|
-
errorCode
|
|
950
|
-
});
|
|
951
|
-
}
|
|
952
|
-
}, "de_DeleteLexiconCommandError");
|
|
953
931
|
var de_DescribeVoicesCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
954
932
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
955
|
-
return
|
|
933
|
+
return de_CommandError(output, context);
|
|
956
934
|
}
|
|
957
935
|
const contents = (0, import_smithy_client.map)({
|
|
958
936
|
$metadata: deserializeMetadata(output)
|
|
@@ -965,31 +943,9 @@ var de_DescribeVoicesCommand = /* @__PURE__ */ __name(async (output, context) =>
|
|
|
965
943
|
Object.assign(contents, doc);
|
|
966
944
|
return contents;
|
|
967
945
|
}, "de_DescribeVoicesCommand");
|
|
968
|
-
var de_DescribeVoicesCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
969
|
-
const parsedOutput = {
|
|
970
|
-
...output,
|
|
971
|
-
body: await parseErrorBody(output.body, context)
|
|
972
|
-
};
|
|
973
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
974
|
-
switch (errorCode) {
|
|
975
|
-
case "InvalidNextTokenException":
|
|
976
|
-
case "com.amazonaws.polly#InvalidNextTokenException":
|
|
977
|
-
throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
|
|
978
|
-
case "ServiceFailureException":
|
|
979
|
-
case "com.amazonaws.polly#ServiceFailureException":
|
|
980
|
-
throw await de_ServiceFailureExceptionRes(parsedOutput, context);
|
|
981
|
-
default:
|
|
982
|
-
const parsedBody = parsedOutput.body;
|
|
983
|
-
return throwDefaultError({
|
|
984
|
-
output,
|
|
985
|
-
parsedBody,
|
|
986
|
-
errorCode
|
|
987
|
-
});
|
|
988
|
-
}
|
|
989
|
-
}, "de_DescribeVoicesCommandError");
|
|
990
946
|
var de_GetLexiconCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
991
947
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
992
|
-
return
|
|
948
|
+
return de_CommandError(output, context);
|
|
993
949
|
}
|
|
994
950
|
const contents = (0, import_smithy_client.map)({
|
|
995
951
|
$metadata: deserializeMetadata(output)
|
|
@@ -1002,31 +958,9 @@ var de_GetLexiconCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1002
958
|
Object.assign(contents, doc);
|
|
1003
959
|
return contents;
|
|
1004
960
|
}, "de_GetLexiconCommand");
|
|
1005
|
-
var de_GetLexiconCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
1006
|
-
const parsedOutput = {
|
|
1007
|
-
...output,
|
|
1008
|
-
body: await parseErrorBody(output.body, context)
|
|
1009
|
-
};
|
|
1010
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1011
|
-
switch (errorCode) {
|
|
1012
|
-
case "LexiconNotFoundException":
|
|
1013
|
-
case "com.amazonaws.polly#LexiconNotFoundException":
|
|
1014
|
-
throw await de_LexiconNotFoundExceptionRes(parsedOutput, context);
|
|
1015
|
-
case "ServiceFailureException":
|
|
1016
|
-
case "com.amazonaws.polly#ServiceFailureException":
|
|
1017
|
-
throw await de_ServiceFailureExceptionRes(parsedOutput, context);
|
|
1018
|
-
default:
|
|
1019
|
-
const parsedBody = parsedOutput.body;
|
|
1020
|
-
return throwDefaultError({
|
|
1021
|
-
output,
|
|
1022
|
-
parsedBody,
|
|
1023
|
-
errorCode
|
|
1024
|
-
});
|
|
1025
|
-
}
|
|
1026
|
-
}, "de_GetLexiconCommandError");
|
|
1027
961
|
var de_GetSpeechSynthesisTaskCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
1028
962
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1029
|
-
return
|
|
963
|
+
return de_CommandError(output, context);
|
|
1030
964
|
}
|
|
1031
965
|
const contents = (0, import_smithy_client.map)({
|
|
1032
966
|
$metadata: deserializeMetadata(output)
|
|
@@ -1038,34 +972,9 @@ var de_GetSpeechSynthesisTaskCommand = /* @__PURE__ */ __name(async (output, con
|
|
|
1038
972
|
Object.assign(contents, doc);
|
|
1039
973
|
return contents;
|
|
1040
974
|
}, "de_GetSpeechSynthesisTaskCommand");
|
|
1041
|
-
var de_GetSpeechSynthesisTaskCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
1042
|
-
const parsedOutput = {
|
|
1043
|
-
...output,
|
|
1044
|
-
body: await parseErrorBody(output.body, context)
|
|
1045
|
-
};
|
|
1046
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1047
|
-
switch (errorCode) {
|
|
1048
|
-
case "InvalidTaskIdException":
|
|
1049
|
-
case "com.amazonaws.polly#InvalidTaskIdException":
|
|
1050
|
-
throw await de_InvalidTaskIdExceptionRes(parsedOutput, context);
|
|
1051
|
-
case "ServiceFailureException":
|
|
1052
|
-
case "com.amazonaws.polly#ServiceFailureException":
|
|
1053
|
-
throw await de_ServiceFailureExceptionRes(parsedOutput, context);
|
|
1054
|
-
case "SynthesisTaskNotFoundException":
|
|
1055
|
-
case "com.amazonaws.polly#SynthesisTaskNotFoundException":
|
|
1056
|
-
throw await de_SynthesisTaskNotFoundExceptionRes(parsedOutput, context);
|
|
1057
|
-
default:
|
|
1058
|
-
const parsedBody = parsedOutput.body;
|
|
1059
|
-
return throwDefaultError({
|
|
1060
|
-
output,
|
|
1061
|
-
parsedBody,
|
|
1062
|
-
errorCode
|
|
1063
|
-
});
|
|
1064
|
-
}
|
|
1065
|
-
}, "de_GetSpeechSynthesisTaskCommandError");
|
|
1066
975
|
var de_ListLexiconsCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
1067
976
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1068
|
-
return
|
|
977
|
+
return de_CommandError(output, context);
|
|
1069
978
|
}
|
|
1070
979
|
const contents = (0, import_smithy_client.map)({
|
|
1071
980
|
$metadata: deserializeMetadata(output)
|
|
@@ -1078,31 +987,9 @@ var de_ListLexiconsCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1078
987
|
Object.assign(contents, doc);
|
|
1079
988
|
return contents;
|
|
1080
989
|
}, "de_ListLexiconsCommand");
|
|
1081
|
-
var de_ListLexiconsCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
1082
|
-
const parsedOutput = {
|
|
1083
|
-
...output,
|
|
1084
|
-
body: await parseErrorBody(output.body, context)
|
|
1085
|
-
};
|
|
1086
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1087
|
-
switch (errorCode) {
|
|
1088
|
-
case "InvalidNextTokenException":
|
|
1089
|
-
case "com.amazonaws.polly#InvalidNextTokenException":
|
|
1090
|
-
throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
|
|
1091
|
-
case "ServiceFailureException":
|
|
1092
|
-
case "com.amazonaws.polly#ServiceFailureException":
|
|
1093
|
-
throw await de_ServiceFailureExceptionRes(parsedOutput, context);
|
|
1094
|
-
default:
|
|
1095
|
-
const parsedBody = parsedOutput.body;
|
|
1096
|
-
return throwDefaultError({
|
|
1097
|
-
output,
|
|
1098
|
-
parsedBody,
|
|
1099
|
-
errorCode
|
|
1100
|
-
});
|
|
1101
|
-
}
|
|
1102
|
-
}, "de_ListLexiconsCommandError");
|
|
1103
990
|
var de_ListSpeechSynthesisTasksCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
1104
991
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1105
|
-
return
|
|
992
|
+
return de_CommandError(output, context);
|
|
1106
993
|
}
|
|
1107
994
|
const contents = (0, import_smithy_client.map)({
|
|
1108
995
|
$metadata: deserializeMetadata(output)
|
|
@@ -1115,31 +1002,9 @@ var de_ListSpeechSynthesisTasksCommand = /* @__PURE__ */ __name(async (output, c
|
|
|
1115
1002
|
Object.assign(contents, doc);
|
|
1116
1003
|
return contents;
|
|
1117
1004
|
}, "de_ListSpeechSynthesisTasksCommand");
|
|
1118
|
-
var de_ListSpeechSynthesisTasksCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
1119
|
-
const parsedOutput = {
|
|
1120
|
-
...output,
|
|
1121
|
-
body: await parseErrorBody(output.body, context)
|
|
1122
|
-
};
|
|
1123
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1124
|
-
switch (errorCode) {
|
|
1125
|
-
case "InvalidNextTokenException":
|
|
1126
|
-
case "com.amazonaws.polly#InvalidNextTokenException":
|
|
1127
|
-
throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
|
|
1128
|
-
case "ServiceFailureException":
|
|
1129
|
-
case "com.amazonaws.polly#ServiceFailureException":
|
|
1130
|
-
throw await de_ServiceFailureExceptionRes(parsedOutput, context);
|
|
1131
|
-
default:
|
|
1132
|
-
const parsedBody = parsedOutput.body;
|
|
1133
|
-
return throwDefaultError({
|
|
1134
|
-
output,
|
|
1135
|
-
parsedBody,
|
|
1136
|
-
errorCode
|
|
1137
|
-
});
|
|
1138
|
-
}
|
|
1139
|
-
}, "de_ListSpeechSynthesisTasksCommandError");
|
|
1140
1005
|
var de_PutLexiconCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
1141
1006
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1142
|
-
return
|
|
1007
|
+
return de_CommandError(output, context);
|
|
1143
1008
|
}
|
|
1144
1009
|
const contents = (0, import_smithy_client.map)({
|
|
1145
1010
|
$metadata: deserializeMetadata(output)
|
|
@@ -1147,13 +1012,56 @@ var de_PutLexiconCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
|
1147
1012
|
await (0, import_smithy_client.collectBody)(output.body, context);
|
|
1148
1013
|
return contents;
|
|
1149
1014
|
}, "de_PutLexiconCommand");
|
|
1150
|
-
var
|
|
1015
|
+
var de_StartSpeechSynthesisTaskCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
1016
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1017
|
+
return de_CommandError(output, context);
|
|
1018
|
+
}
|
|
1019
|
+
const contents = (0, import_smithy_client.map)({
|
|
1020
|
+
$metadata: deserializeMetadata(output)
|
|
1021
|
+
});
|
|
1022
|
+
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
|
|
1023
|
+
const doc = (0, import_smithy_client.take)(data, {
|
|
1024
|
+
SynthesisTask: (_) => de_SynthesisTask(_, context)
|
|
1025
|
+
});
|
|
1026
|
+
Object.assign(contents, doc);
|
|
1027
|
+
return contents;
|
|
1028
|
+
}, "de_StartSpeechSynthesisTaskCommand");
|
|
1029
|
+
var de_SynthesizeSpeechCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
1030
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1031
|
+
return de_CommandError(output, context);
|
|
1032
|
+
}
|
|
1033
|
+
const contents = (0, import_smithy_client.map)({
|
|
1034
|
+
$metadata: deserializeMetadata(output),
|
|
1035
|
+
[_CT]: [, output.headers[_ct]],
|
|
1036
|
+
[_RC]: [() => void 0 !== output.headers[_xar], () => (0, import_smithy_client.strictParseInt32)(output.headers[_xar])]
|
|
1037
|
+
});
|
|
1038
|
+
const data = output.body;
|
|
1039
|
+
context.sdkStreamMixin(data);
|
|
1040
|
+
contents.AudioStream = data;
|
|
1041
|
+
return contents;
|
|
1042
|
+
}, "de_SynthesizeSpeechCommand");
|
|
1043
|
+
var de_CommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
1151
1044
|
const parsedOutput = {
|
|
1152
1045
|
...output,
|
|
1153
1046
|
body: await parseErrorBody(output.body, context)
|
|
1154
1047
|
};
|
|
1155
1048
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1156
1049
|
switch (errorCode) {
|
|
1050
|
+
case "LexiconNotFoundException":
|
|
1051
|
+
case "com.amazonaws.polly#LexiconNotFoundException":
|
|
1052
|
+
throw await de_LexiconNotFoundExceptionRes(parsedOutput, context);
|
|
1053
|
+
case "ServiceFailureException":
|
|
1054
|
+
case "com.amazonaws.polly#ServiceFailureException":
|
|
1055
|
+
throw await de_ServiceFailureExceptionRes(parsedOutput, context);
|
|
1056
|
+
case "InvalidNextTokenException":
|
|
1057
|
+
case "com.amazonaws.polly#InvalidNextTokenException":
|
|
1058
|
+
throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
|
|
1059
|
+
case "InvalidTaskIdException":
|
|
1060
|
+
case "com.amazonaws.polly#InvalidTaskIdException":
|
|
1061
|
+
throw await de_InvalidTaskIdExceptionRes(parsedOutput, context);
|
|
1062
|
+
case "SynthesisTaskNotFoundException":
|
|
1063
|
+
case "com.amazonaws.polly#SynthesisTaskNotFoundException":
|
|
1064
|
+
throw await de_SynthesisTaskNotFoundExceptionRes(parsedOutput, context);
|
|
1157
1065
|
case "InvalidLexiconException":
|
|
1158
1066
|
case "com.amazonaws.polly#InvalidLexiconException":
|
|
1159
1067
|
throw await de_InvalidLexiconExceptionRes(parsedOutput, context);
|
|
@@ -1166,45 +1074,12 @@ var de_PutLexiconCommandError = /* @__PURE__ */ __name(async (output, context) =
|
|
|
1166
1074
|
case "MaxLexiconsNumberExceededException":
|
|
1167
1075
|
case "com.amazonaws.polly#MaxLexiconsNumberExceededException":
|
|
1168
1076
|
throw await de_MaxLexiconsNumberExceededExceptionRes(parsedOutput, context);
|
|
1169
|
-
case "ServiceFailureException":
|
|
1170
|
-
case "com.amazonaws.polly#ServiceFailureException":
|
|
1171
|
-
throw await de_ServiceFailureExceptionRes(parsedOutput, context);
|
|
1172
1077
|
case "UnsupportedPlsAlphabetException":
|
|
1173
1078
|
case "com.amazonaws.polly#UnsupportedPlsAlphabetException":
|
|
1174
1079
|
throw await de_UnsupportedPlsAlphabetExceptionRes(parsedOutput, context);
|
|
1175
1080
|
case "UnsupportedPlsLanguageException":
|
|
1176
1081
|
case "com.amazonaws.polly#UnsupportedPlsLanguageException":
|
|
1177
1082
|
throw await de_UnsupportedPlsLanguageExceptionRes(parsedOutput, context);
|
|
1178
|
-
default:
|
|
1179
|
-
const parsedBody = parsedOutput.body;
|
|
1180
|
-
return throwDefaultError({
|
|
1181
|
-
output,
|
|
1182
|
-
parsedBody,
|
|
1183
|
-
errorCode
|
|
1184
|
-
});
|
|
1185
|
-
}
|
|
1186
|
-
}, "de_PutLexiconCommandError");
|
|
1187
|
-
var de_StartSpeechSynthesisTaskCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
1188
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1189
|
-
return de_StartSpeechSynthesisTaskCommandError(output, context);
|
|
1190
|
-
}
|
|
1191
|
-
const contents = (0, import_smithy_client.map)({
|
|
1192
|
-
$metadata: deserializeMetadata(output)
|
|
1193
|
-
});
|
|
1194
|
-
const data = (0, import_smithy_client.expectNonNull)((0, import_smithy_client.expectObject)(await parseBody(output.body, context)), "body");
|
|
1195
|
-
const doc = (0, import_smithy_client.take)(data, {
|
|
1196
|
-
SynthesisTask: (_) => de_SynthesisTask(_, context)
|
|
1197
|
-
});
|
|
1198
|
-
Object.assign(contents, doc);
|
|
1199
|
-
return contents;
|
|
1200
|
-
}, "de_StartSpeechSynthesisTaskCommand");
|
|
1201
|
-
var de_StartSpeechSynthesisTaskCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
1202
|
-
const parsedOutput = {
|
|
1203
|
-
...output,
|
|
1204
|
-
body: await parseErrorBody(output.body, context)
|
|
1205
|
-
};
|
|
1206
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1207
|
-
switch (errorCode) {
|
|
1208
1083
|
case "EngineNotSupportedException":
|
|
1209
1084
|
case "com.amazonaws.polly#EngineNotSupportedException":
|
|
1210
1085
|
throw await de_EngineNotSupportedExceptionRes(parsedOutput, context);
|
|
@@ -1226,72 +1101,9 @@ var de_StartSpeechSynthesisTaskCommandError = /* @__PURE__ */ __name(async (outp
|
|
|
1226
1101
|
case "LanguageNotSupportedException":
|
|
1227
1102
|
case "com.amazonaws.polly#LanguageNotSupportedException":
|
|
1228
1103
|
throw await de_LanguageNotSupportedExceptionRes(parsedOutput, context);
|
|
1229
|
-
case "LexiconNotFoundException":
|
|
1230
|
-
case "com.amazonaws.polly#LexiconNotFoundException":
|
|
1231
|
-
throw await de_LexiconNotFoundExceptionRes(parsedOutput, context);
|
|
1232
1104
|
case "MarksNotSupportedForFormatException":
|
|
1233
1105
|
case "com.amazonaws.polly#MarksNotSupportedForFormatException":
|
|
1234
1106
|
throw await de_MarksNotSupportedForFormatExceptionRes(parsedOutput, context);
|
|
1235
|
-
case "ServiceFailureException":
|
|
1236
|
-
case "com.amazonaws.polly#ServiceFailureException":
|
|
1237
|
-
throw await de_ServiceFailureExceptionRes(parsedOutput, context);
|
|
1238
|
-
case "SsmlMarksNotSupportedForTextTypeException":
|
|
1239
|
-
case "com.amazonaws.polly#SsmlMarksNotSupportedForTextTypeException":
|
|
1240
|
-
throw await de_SsmlMarksNotSupportedForTextTypeExceptionRes(parsedOutput, context);
|
|
1241
|
-
case "TextLengthExceededException":
|
|
1242
|
-
case "com.amazonaws.polly#TextLengthExceededException":
|
|
1243
|
-
throw await de_TextLengthExceededExceptionRes(parsedOutput, context);
|
|
1244
|
-
default:
|
|
1245
|
-
const parsedBody = parsedOutput.body;
|
|
1246
|
-
return throwDefaultError({
|
|
1247
|
-
output,
|
|
1248
|
-
parsedBody,
|
|
1249
|
-
errorCode
|
|
1250
|
-
});
|
|
1251
|
-
}
|
|
1252
|
-
}, "de_StartSpeechSynthesisTaskCommandError");
|
|
1253
|
-
var de_SynthesizeSpeechCommand = /* @__PURE__ */ __name(async (output, context) => {
|
|
1254
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
1255
|
-
return de_SynthesizeSpeechCommandError(output, context);
|
|
1256
|
-
}
|
|
1257
|
-
const contents = (0, import_smithy_client.map)({
|
|
1258
|
-
$metadata: deserializeMetadata(output),
|
|
1259
|
-
[_CT]: [, output.headers[_ct]],
|
|
1260
|
-
[_RC]: [() => void 0 !== output.headers[_xar], () => (0, import_smithy_client.strictParseInt32)(output.headers[_xar])]
|
|
1261
|
-
});
|
|
1262
|
-
const data = output.body;
|
|
1263
|
-
context.sdkStreamMixin(data);
|
|
1264
|
-
contents.AudioStream = data;
|
|
1265
|
-
return contents;
|
|
1266
|
-
}, "de_SynthesizeSpeechCommand");
|
|
1267
|
-
var de_SynthesizeSpeechCommandError = /* @__PURE__ */ __name(async (output, context) => {
|
|
1268
|
-
const parsedOutput = {
|
|
1269
|
-
...output,
|
|
1270
|
-
body: await parseErrorBody(output.body, context)
|
|
1271
|
-
};
|
|
1272
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
1273
|
-
switch (errorCode) {
|
|
1274
|
-
case "EngineNotSupportedException":
|
|
1275
|
-
case "com.amazonaws.polly#EngineNotSupportedException":
|
|
1276
|
-
throw await de_EngineNotSupportedExceptionRes(parsedOutput, context);
|
|
1277
|
-
case "InvalidSampleRateException":
|
|
1278
|
-
case "com.amazonaws.polly#InvalidSampleRateException":
|
|
1279
|
-
throw await de_InvalidSampleRateExceptionRes(parsedOutput, context);
|
|
1280
|
-
case "InvalidSsmlException":
|
|
1281
|
-
case "com.amazonaws.polly#InvalidSsmlException":
|
|
1282
|
-
throw await de_InvalidSsmlExceptionRes(parsedOutput, context);
|
|
1283
|
-
case "LanguageNotSupportedException":
|
|
1284
|
-
case "com.amazonaws.polly#LanguageNotSupportedException":
|
|
1285
|
-
throw await de_LanguageNotSupportedExceptionRes(parsedOutput, context);
|
|
1286
|
-
case "LexiconNotFoundException":
|
|
1287
|
-
case "com.amazonaws.polly#LexiconNotFoundException":
|
|
1288
|
-
throw await de_LexiconNotFoundExceptionRes(parsedOutput, context);
|
|
1289
|
-
case "MarksNotSupportedForFormatException":
|
|
1290
|
-
case "com.amazonaws.polly#MarksNotSupportedForFormatException":
|
|
1291
|
-
throw await de_MarksNotSupportedForFormatExceptionRes(parsedOutput, context);
|
|
1292
|
-
case "ServiceFailureException":
|
|
1293
|
-
case "com.amazonaws.polly#ServiceFailureException":
|
|
1294
|
-
throw await de_ServiceFailureExceptionRes(parsedOutput, context);
|
|
1295
1107
|
case "SsmlMarksNotSupportedForTextTypeException":
|
|
1296
1108
|
case "com.amazonaws.polly#SsmlMarksNotSupportedForTextTypeException":
|
|
1297
1109
|
throw await de_SsmlMarksNotSupportedForTextTypeExceptionRes(parsedOutput, context);
|
|
@@ -1306,7 +1118,7 @@ var de_SynthesizeSpeechCommandError = /* @__PURE__ */ __name(async (output, cont
|
|
|
1306
1118
|
errorCode
|
|
1307
1119
|
});
|
|
1308
1120
|
}
|
|
1309
|
-
}, "
|
|
1121
|
+
}, "de_CommandError");
|
|
1310
1122
|
var throwDefaultError = (0, import_smithy_client.withBaseException)(PollyServiceException);
|
|
1311
1123
|
var de_EngineNotSupportedExceptionRes = /* @__PURE__ */ __name(async (parsedOutput, context) => {
|
|
1312
1124
|
const contents = (0, import_smithy_client.map)({});
|
|
@@ -128,7 +128,7 @@ export const se_SynthesizeSpeechCommand = async (input, context) => {
|
|
|
128
128
|
};
|
|
129
129
|
export const de_DeleteLexiconCommand = async (output, context) => {
|
|
130
130
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
131
|
-
return
|
|
131
|
+
return de_CommandError(output, context);
|
|
132
132
|
}
|
|
133
133
|
const contents = map({
|
|
134
134
|
$metadata: deserializeMetadata(output),
|
|
@@ -136,31 +136,9 @@ export const de_DeleteLexiconCommand = async (output, context) => {
|
|
|
136
136
|
await collectBody(output.body, context);
|
|
137
137
|
return contents;
|
|
138
138
|
};
|
|
139
|
-
const de_DeleteLexiconCommandError = async (output, context) => {
|
|
140
|
-
const parsedOutput = {
|
|
141
|
-
...output,
|
|
142
|
-
body: await parseErrorBody(output.body, context),
|
|
143
|
-
};
|
|
144
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
145
|
-
switch (errorCode) {
|
|
146
|
-
case "LexiconNotFoundException":
|
|
147
|
-
case "com.amazonaws.polly#LexiconNotFoundException":
|
|
148
|
-
throw await de_LexiconNotFoundExceptionRes(parsedOutput, context);
|
|
149
|
-
case "ServiceFailureException":
|
|
150
|
-
case "com.amazonaws.polly#ServiceFailureException":
|
|
151
|
-
throw await de_ServiceFailureExceptionRes(parsedOutput, context);
|
|
152
|
-
default:
|
|
153
|
-
const parsedBody = parsedOutput.body;
|
|
154
|
-
return throwDefaultError({
|
|
155
|
-
output,
|
|
156
|
-
parsedBody,
|
|
157
|
-
errorCode,
|
|
158
|
-
});
|
|
159
|
-
}
|
|
160
|
-
};
|
|
161
139
|
export const de_DescribeVoicesCommand = async (output, context) => {
|
|
162
140
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
163
|
-
return
|
|
141
|
+
return de_CommandError(output, context);
|
|
164
142
|
}
|
|
165
143
|
const contents = map({
|
|
166
144
|
$metadata: deserializeMetadata(output),
|
|
@@ -173,31 +151,9 @@ export const de_DescribeVoicesCommand = async (output, context) => {
|
|
|
173
151
|
Object.assign(contents, doc);
|
|
174
152
|
return contents;
|
|
175
153
|
};
|
|
176
|
-
const de_DescribeVoicesCommandError = async (output, context) => {
|
|
177
|
-
const parsedOutput = {
|
|
178
|
-
...output,
|
|
179
|
-
body: await parseErrorBody(output.body, context),
|
|
180
|
-
};
|
|
181
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
182
|
-
switch (errorCode) {
|
|
183
|
-
case "InvalidNextTokenException":
|
|
184
|
-
case "com.amazonaws.polly#InvalidNextTokenException":
|
|
185
|
-
throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
|
|
186
|
-
case "ServiceFailureException":
|
|
187
|
-
case "com.amazonaws.polly#ServiceFailureException":
|
|
188
|
-
throw await de_ServiceFailureExceptionRes(parsedOutput, context);
|
|
189
|
-
default:
|
|
190
|
-
const parsedBody = parsedOutput.body;
|
|
191
|
-
return throwDefaultError({
|
|
192
|
-
output,
|
|
193
|
-
parsedBody,
|
|
194
|
-
errorCode,
|
|
195
|
-
});
|
|
196
|
-
}
|
|
197
|
-
};
|
|
198
154
|
export const de_GetLexiconCommand = async (output, context) => {
|
|
199
155
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
200
|
-
return
|
|
156
|
+
return de_CommandError(output, context);
|
|
201
157
|
}
|
|
202
158
|
const contents = map({
|
|
203
159
|
$metadata: deserializeMetadata(output),
|
|
@@ -210,31 +166,9 @@ export const de_GetLexiconCommand = async (output, context) => {
|
|
|
210
166
|
Object.assign(contents, doc);
|
|
211
167
|
return contents;
|
|
212
168
|
};
|
|
213
|
-
const de_GetLexiconCommandError = async (output, context) => {
|
|
214
|
-
const parsedOutput = {
|
|
215
|
-
...output,
|
|
216
|
-
body: await parseErrorBody(output.body, context),
|
|
217
|
-
};
|
|
218
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
219
|
-
switch (errorCode) {
|
|
220
|
-
case "LexiconNotFoundException":
|
|
221
|
-
case "com.amazonaws.polly#LexiconNotFoundException":
|
|
222
|
-
throw await de_LexiconNotFoundExceptionRes(parsedOutput, context);
|
|
223
|
-
case "ServiceFailureException":
|
|
224
|
-
case "com.amazonaws.polly#ServiceFailureException":
|
|
225
|
-
throw await de_ServiceFailureExceptionRes(parsedOutput, context);
|
|
226
|
-
default:
|
|
227
|
-
const parsedBody = parsedOutput.body;
|
|
228
|
-
return throwDefaultError({
|
|
229
|
-
output,
|
|
230
|
-
parsedBody,
|
|
231
|
-
errorCode,
|
|
232
|
-
});
|
|
233
|
-
}
|
|
234
|
-
};
|
|
235
169
|
export const de_GetSpeechSynthesisTaskCommand = async (output, context) => {
|
|
236
170
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
237
|
-
return
|
|
171
|
+
return de_CommandError(output, context);
|
|
238
172
|
}
|
|
239
173
|
const contents = map({
|
|
240
174
|
$metadata: deserializeMetadata(output),
|
|
@@ -246,34 +180,9 @@ export const de_GetSpeechSynthesisTaskCommand = async (output, context) => {
|
|
|
246
180
|
Object.assign(contents, doc);
|
|
247
181
|
return contents;
|
|
248
182
|
};
|
|
249
|
-
const de_GetSpeechSynthesisTaskCommandError = async (output, context) => {
|
|
250
|
-
const parsedOutput = {
|
|
251
|
-
...output,
|
|
252
|
-
body: await parseErrorBody(output.body, context),
|
|
253
|
-
};
|
|
254
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
255
|
-
switch (errorCode) {
|
|
256
|
-
case "InvalidTaskIdException":
|
|
257
|
-
case "com.amazonaws.polly#InvalidTaskIdException":
|
|
258
|
-
throw await de_InvalidTaskIdExceptionRes(parsedOutput, context);
|
|
259
|
-
case "ServiceFailureException":
|
|
260
|
-
case "com.amazonaws.polly#ServiceFailureException":
|
|
261
|
-
throw await de_ServiceFailureExceptionRes(parsedOutput, context);
|
|
262
|
-
case "SynthesisTaskNotFoundException":
|
|
263
|
-
case "com.amazonaws.polly#SynthesisTaskNotFoundException":
|
|
264
|
-
throw await de_SynthesisTaskNotFoundExceptionRes(parsedOutput, context);
|
|
265
|
-
default:
|
|
266
|
-
const parsedBody = parsedOutput.body;
|
|
267
|
-
return throwDefaultError({
|
|
268
|
-
output,
|
|
269
|
-
parsedBody,
|
|
270
|
-
errorCode,
|
|
271
|
-
});
|
|
272
|
-
}
|
|
273
|
-
};
|
|
274
183
|
export const de_ListLexiconsCommand = async (output, context) => {
|
|
275
184
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
276
|
-
return
|
|
185
|
+
return de_CommandError(output, context);
|
|
277
186
|
}
|
|
278
187
|
const contents = map({
|
|
279
188
|
$metadata: deserializeMetadata(output),
|
|
@@ -286,31 +195,9 @@ export const de_ListLexiconsCommand = async (output, context) => {
|
|
|
286
195
|
Object.assign(contents, doc);
|
|
287
196
|
return contents;
|
|
288
197
|
};
|
|
289
|
-
const de_ListLexiconsCommandError = async (output, context) => {
|
|
290
|
-
const parsedOutput = {
|
|
291
|
-
...output,
|
|
292
|
-
body: await parseErrorBody(output.body, context),
|
|
293
|
-
};
|
|
294
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
295
|
-
switch (errorCode) {
|
|
296
|
-
case "InvalidNextTokenException":
|
|
297
|
-
case "com.amazonaws.polly#InvalidNextTokenException":
|
|
298
|
-
throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
|
|
299
|
-
case "ServiceFailureException":
|
|
300
|
-
case "com.amazonaws.polly#ServiceFailureException":
|
|
301
|
-
throw await de_ServiceFailureExceptionRes(parsedOutput, context);
|
|
302
|
-
default:
|
|
303
|
-
const parsedBody = parsedOutput.body;
|
|
304
|
-
return throwDefaultError({
|
|
305
|
-
output,
|
|
306
|
-
parsedBody,
|
|
307
|
-
errorCode,
|
|
308
|
-
});
|
|
309
|
-
}
|
|
310
|
-
};
|
|
311
198
|
export const de_ListSpeechSynthesisTasksCommand = async (output, context) => {
|
|
312
199
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
313
|
-
return
|
|
200
|
+
return de_CommandError(output, context);
|
|
314
201
|
}
|
|
315
202
|
const contents = map({
|
|
316
203
|
$metadata: deserializeMetadata(output),
|
|
@@ -323,31 +210,9 @@ export const de_ListSpeechSynthesisTasksCommand = async (output, context) => {
|
|
|
323
210
|
Object.assign(contents, doc);
|
|
324
211
|
return contents;
|
|
325
212
|
};
|
|
326
|
-
const de_ListSpeechSynthesisTasksCommandError = async (output, context) => {
|
|
327
|
-
const parsedOutput = {
|
|
328
|
-
...output,
|
|
329
|
-
body: await parseErrorBody(output.body, context),
|
|
330
|
-
};
|
|
331
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
332
|
-
switch (errorCode) {
|
|
333
|
-
case "InvalidNextTokenException":
|
|
334
|
-
case "com.amazonaws.polly#InvalidNextTokenException":
|
|
335
|
-
throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
|
|
336
|
-
case "ServiceFailureException":
|
|
337
|
-
case "com.amazonaws.polly#ServiceFailureException":
|
|
338
|
-
throw await de_ServiceFailureExceptionRes(parsedOutput, context);
|
|
339
|
-
default:
|
|
340
|
-
const parsedBody = parsedOutput.body;
|
|
341
|
-
return throwDefaultError({
|
|
342
|
-
output,
|
|
343
|
-
parsedBody,
|
|
344
|
-
errorCode,
|
|
345
|
-
});
|
|
346
|
-
}
|
|
347
|
-
};
|
|
348
213
|
export const de_PutLexiconCommand = async (output, context) => {
|
|
349
214
|
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
350
|
-
return
|
|
215
|
+
return de_CommandError(output, context);
|
|
351
216
|
}
|
|
352
217
|
const contents = map({
|
|
353
218
|
$metadata: deserializeMetadata(output),
|
|
@@ -355,13 +220,56 @@ export const de_PutLexiconCommand = async (output, context) => {
|
|
|
355
220
|
await collectBody(output.body, context);
|
|
356
221
|
return contents;
|
|
357
222
|
};
|
|
358
|
-
const
|
|
223
|
+
export const de_StartSpeechSynthesisTaskCommand = async (output, context) => {
|
|
224
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
225
|
+
return de_CommandError(output, context);
|
|
226
|
+
}
|
|
227
|
+
const contents = map({
|
|
228
|
+
$metadata: deserializeMetadata(output),
|
|
229
|
+
});
|
|
230
|
+
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
231
|
+
const doc = take(data, {
|
|
232
|
+
SynthesisTask: (_) => de_SynthesisTask(_, context),
|
|
233
|
+
});
|
|
234
|
+
Object.assign(contents, doc);
|
|
235
|
+
return contents;
|
|
236
|
+
};
|
|
237
|
+
export const de_SynthesizeSpeechCommand = async (output, context) => {
|
|
238
|
+
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
239
|
+
return de_CommandError(output, context);
|
|
240
|
+
}
|
|
241
|
+
const contents = map({
|
|
242
|
+
$metadata: deserializeMetadata(output),
|
|
243
|
+
[_CT]: [, output.headers[_ct]],
|
|
244
|
+
[_RC]: [() => void 0 !== output.headers[_xar], () => __strictParseInt32(output.headers[_xar])],
|
|
245
|
+
});
|
|
246
|
+
const data = output.body;
|
|
247
|
+
context.sdkStreamMixin(data);
|
|
248
|
+
contents.AudioStream = data;
|
|
249
|
+
return contents;
|
|
250
|
+
};
|
|
251
|
+
const de_CommandError = async (output, context) => {
|
|
359
252
|
const parsedOutput = {
|
|
360
253
|
...output,
|
|
361
254
|
body: await parseErrorBody(output.body, context),
|
|
362
255
|
};
|
|
363
256
|
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
364
257
|
switch (errorCode) {
|
|
258
|
+
case "LexiconNotFoundException":
|
|
259
|
+
case "com.amazonaws.polly#LexiconNotFoundException":
|
|
260
|
+
throw await de_LexiconNotFoundExceptionRes(parsedOutput, context);
|
|
261
|
+
case "ServiceFailureException":
|
|
262
|
+
case "com.amazonaws.polly#ServiceFailureException":
|
|
263
|
+
throw await de_ServiceFailureExceptionRes(parsedOutput, context);
|
|
264
|
+
case "InvalidNextTokenException":
|
|
265
|
+
case "com.amazonaws.polly#InvalidNextTokenException":
|
|
266
|
+
throw await de_InvalidNextTokenExceptionRes(parsedOutput, context);
|
|
267
|
+
case "InvalidTaskIdException":
|
|
268
|
+
case "com.amazonaws.polly#InvalidTaskIdException":
|
|
269
|
+
throw await de_InvalidTaskIdExceptionRes(parsedOutput, context);
|
|
270
|
+
case "SynthesisTaskNotFoundException":
|
|
271
|
+
case "com.amazonaws.polly#SynthesisTaskNotFoundException":
|
|
272
|
+
throw await de_SynthesisTaskNotFoundExceptionRes(parsedOutput, context);
|
|
365
273
|
case "InvalidLexiconException":
|
|
366
274
|
case "com.amazonaws.polly#InvalidLexiconException":
|
|
367
275
|
throw await de_InvalidLexiconExceptionRes(parsedOutput, context);
|
|
@@ -374,45 +282,12 @@ const de_PutLexiconCommandError = async (output, context) => {
|
|
|
374
282
|
case "MaxLexiconsNumberExceededException":
|
|
375
283
|
case "com.amazonaws.polly#MaxLexiconsNumberExceededException":
|
|
376
284
|
throw await de_MaxLexiconsNumberExceededExceptionRes(parsedOutput, context);
|
|
377
|
-
case "ServiceFailureException":
|
|
378
|
-
case "com.amazonaws.polly#ServiceFailureException":
|
|
379
|
-
throw await de_ServiceFailureExceptionRes(parsedOutput, context);
|
|
380
285
|
case "UnsupportedPlsAlphabetException":
|
|
381
286
|
case "com.amazonaws.polly#UnsupportedPlsAlphabetException":
|
|
382
287
|
throw await de_UnsupportedPlsAlphabetExceptionRes(parsedOutput, context);
|
|
383
288
|
case "UnsupportedPlsLanguageException":
|
|
384
289
|
case "com.amazonaws.polly#UnsupportedPlsLanguageException":
|
|
385
290
|
throw await de_UnsupportedPlsLanguageExceptionRes(parsedOutput, context);
|
|
386
|
-
default:
|
|
387
|
-
const parsedBody = parsedOutput.body;
|
|
388
|
-
return throwDefaultError({
|
|
389
|
-
output,
|
|
390
|
-
parsedBody,
|
|
391
|
-
errorCode,
|
|
392
|
-
});
|
|
393
|
-
}
|
|
394
|
-
};
|
|
395
|
-
export const de_StartSpeechSynthesisTaskCommand = async (output, context) => {
|
|
396
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
397
|
-
return de_StartSpeechSynthesisTaskCommandError(output, context);
|
|
398
|
-
}
|
|
399
|
-
const contents = map({
|
|
400
|
-
$metadata: deserializeMetadata(output),
|
|
401
|
-
});
|
|
402
|
-
const data = __expectNonNull(__expectObject(await parseBody(output.body, context)), "body");
|
|
403
|
-
const doc = take(data, {
|
|
404
|
-
SynthesisTask: (_) => de_SynthesisTask(_, context),
|
|
405
|
-
});
|
|
406
|
-
Object.assign(contents, doc);
|
|
407
|
-
return contents;
|
|
408
|
-
};
|
|
409
|
-
const de_StartSpeechSynthesisTaskCommandError = async (output, context) => {
|
|
410
|
-
const parsedOutput = {
|
|
411
|
-
...output,
|
|
412
|
-
body: await parseErrorBody(output.body, context),
|
|
413
|
-
};
|
|
414
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
415
|
-
switch (errorCode) {
|
|
416
291
|
case "EngineNotSupportedException":
|
|
417
292
|
case "com.amazonaws.polly#EngineNotSupportedException":
|
|
418
293
|
throw await de_EngineNotSupportedExceptionRes(parsedOutput, context);
|
|
@@ -434,72 +309,9 @@ const de_StartSpeechSynthesisTaskCommandError = async (output, context) => {
|
|
|
434
309
|
case "LanguageNotSupportedException":
|
|
435
310
|
case "com.amazonaws.polly#LanguageNotSupportedException":
|
|
436
311
|
throw await de_LanguageNotSupportedExceptionRes(parsedOutput, context);
|
|
437
|
-
case "LexiconNotFoundException":
|
|
438
|
-
case "com.amazonaws.polly#LexiconNotFoundException":
|
|
439
|
-
throw await de_LexiconNotFoundExceptionRes(parsedOutput, context);
|
|
440
312
|
case "MarksNotSupportedForFormatException":
|
|
441
313
|
case "com.amazonaws.polly#MarksNotSupportedForFormatException":
|
|
442
314
|
throw await de_MarksNotSupportedForFormatExceptionRes(parsedOutput, context);
|
|
443
|
-
case "ServiceFailureException":
|
|
444
|
-
case "com.amazonaws.polly#ServiceFailureException":
|
|
445
|
-
throw await de_ServiceFailureExceptionRes(parsedOutput, context);
|
|
446
|
-
case "SsmlMarksNotSupportedForTextTypeException":
|
|
447
|
-
case "com.amazonaws.polly#SsmlMarksNotSupportedForTextTypeException":
|
|
448
|
-
throw await de_SsmlMarksNotSupportedForTextTypeExceptionRes(parsedOutput, context);
|
|
449
|
-
case "TextLengthExceededException":
|
|
450
|
-
case "com.amazonaws.polly#TextLengthExceededException":
|
|
451
|
-
throw await de_TextLengthExceededExceptionRes(parsedOutput, context);
|
|
452
|
-
default:
|
|
453
|
-
const parsedBody = parsedOutput.body;
|
|
454
|
-
return throwDefaultError({
|
|
455
|
-
output,
|
|
456
|
-
parsedBody,
|
|
457
|
-
errorCode,
|
|
458
|
-
});
|
|
459
|
-
}
|
|
460
|
-
};
|
|
461
|
-
export const de_SynthesizeSpeechCommand = async (output, context) => {
|
|
462
|
-
if (output.statusCode !== 200 && output.statusCode >= 300) {
|
|
463
|
-
return de_SynthesizeSpeechCommandError(output, context);
|
|
464
|
-
}
|
|
465
|
-
const contents = map({
|
|
466
|
-
$metadata: deserializeMetadata(output),
|
|
467
|
-
[_CT]: [, output.headers[_ct]],
|
|
468
|
-
[_RC]: [() => void 0 !== output.headers[_xar], () => __strictParseInt32(output.headers[_xar])],
|
|
469
|
-
});
|
|
470
|
-
const data = output.body;
|
|
471
|
-
context.sdkStreamMixin(data);
|
|
472
|
-
contents.AudioStream = data;
|
|
473
|
-
return contents;
|
|
474
|
-
};
|
|
475
|
-
const de_SynthesizeSpeechCommandError = async (output, context) => {
|
|
476
|
-
const parsedOutput = {
|
|
477
|
-
...output,
|
|
478
|
-
body: await parseErrorBody(output.body, context),
|
|
479
|
-
};
|
|
480
|
-
const errorCode = loadRestJsonErrorCode(output, parsedOutput.body);
|
|
481
|
-
switch (errorCode) {
|
|
482
|
-
case "EngineNotSupportedException":
|
|
483
|
-
case "com.amazonaws.polly#EngineNotSupportedException":
|
|
484
|
-
throw await de_EngineNotSupportedExceptionRes(parsedOutput, context);
|
|
485
|
-
case "InvalidSampleRateException":
|
|
486
|
-
case "com.amazonaws.polly#InvalidSampleRateException":
|
|
487
|
-
throw await de_InvalidSampleRateExceptionRes(parsedOutput, context);
|
|
488
|
-
case "InvalidSsmlException":
|
|
489
|
-
case "com.amazonaws.polly#InvalidSsmlException":
|
|
490
|
-
throw await de_InvalidSsmlExceptionRes(parsedOutput, context);
|
|
491
|
-
case "LanguageNotSupportedException":
|
|
492
|
-
case "com.amazonaws.polly#LanguageNotSupportedException":
|
|
493
|
-
throw await de_LanguageNotSupportedExceptionRes(parsedOutput, context);
|
|
494
|
-
case "LexiconNotFoundException":
|
|
495
|
-
case "com.amazonaws.polly#LexiconNotFoundException":
|
|
496
|
-
throw await de_LexiconNotFoundExceptionRes(parsedOutput, context);
|
|
497
|
-
case "MarksNotSupportedForFormatException":
|
|
498
|
-
case "com.amazonaws.polly#MarksNotSupportedForFormatException":
|
|
499
|
-
throw await de_MarksNotSupportedForFormatExceptionRes(parsedOutput, context);
|
|
500
|
-
case "ServiceFailureException":
|
|
501
|
-
case "com.amazonaws.polly#ServiceFailureException":
|
|
502
|
-
throw await de_ServiceFailureExceptionRes(parsedOutput, context);
|
|
503
315
|
case "SsmlMarksNotSupportedForTextTypeException":
|
|
504
316
|
case "com.amazonaws.polly#SsmlMarksNotSupportedForTextTypeException":
|
|
505
317
|
throw await de_SsmlMarksNotSupportedForTextTypeExceptionRes(parsedOutput, context);
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-polly",
|
|
3
3
|
"description": "AWS SDK for JavaScript Polly Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.507.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-polly",
|
|
@@ -20,9 +20,9 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@aws-crypto/sha256-browser": "3.0.0",
|
|
22
22
|
"@aws-crypto/sha256-js": "3.0.0",
|
|
23
|
-
"@aws-sdk/client-sts": "3.
|
|
23
|
+
"@aws-sdk/client-sts": "3.507.0",
|
|
24
24
|
"@aws-sdk/core": "3.496.0",
|
|
25
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
25
|
+
"@aws-sdk/credential-provider-node": "3.507.0",
|
|
26
26
|
"@aws-sdk/middleware-host-header": "3.502.0",
|
|
27
27
|
"@aws-sdk/middleware-logger": "3.502.0",
|
|
28
28
|
"@aws-sdk/middleware-recursion-detection": "3.502.0",
|