@aws-sdk/client-polly 3.776.0 → 3.782.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.
@@ -65,18 +65,21 @@ declare const DeleteLexiconCommand_base: {
65
65
  * @throws {@link PollyServiceException}
66
66
  * <p>Base exception class for all service exceptions from Polly service.</p>
67
67
  *
68
- * @public
68
+ *
69
69
  * @example To delete a lexicon
70
70
  * ```javascript
71
71
  * // Deletes a specified pronunciation lexicon stored in an AWS Region.
72
72
  * const input = {
73
- * "Name": "example"
73
+ * Name: "example"
74
74
  * };
75
75
  * const command = new DeleteLexiconCommand(input);
76
- * await client.send(command);
77
- * // example id: to-delete-a-lexicon-1481922498332
76
+ * const response = await client.send(command);
77
+ * /* response is
78
+ * { /* empty *\/ }
79
+ * *\/
78
80
  * ```
79
81
  *
82
+ * @public
80
83
  */
81
84
  export declare class DeleteLexiconCommand extends DeleteLexiconCommand_base {
82
85
  /** @internal type navigation helper, not in runtime. */
@@ -94,45 +94,45 @@ declare const DescribeVoicesCommand_base: {
94
94
  * @throws {@link PollyServiceException}
95
95
  * <p>Base exception class for all service exceptions from Polly service.</p>
96
96
  *
97
- * @public
97
+ *
98
98
  * @example To describe available voices
99
99
  * ```javascript
100
100
  * // Returns the list of voices that are available for use when requesting speech synthesis. Displayed languages are those within the specified language code. If no language code is specified, voices for all available languages are displayed.
101
101
  * const input = {
102
- * "LanguageCode": "en-GB"
102
+ * LanguageCode: "en-GB"
103
103
  * };
104
104
  * const command = new DescribeVoicesCommand(input);
105
105
  * const response = await client.send(command);
106
- * /* response ==
106
+ * /* response is
107
107
  * {
108
- * "Voices": [
108
+ * Voices: [
109
109
  * {
110
- * "Gender": "Female",
111
- * "Id": "Emma",
112
- * "LanguageCode": "en-GB",
113
- * "LanguageName": "British English",
114
- * "Name": "Emma"
110
+ * Gender: "Female",
111
+ * Id: "Emma",
112
+ * LanguageCode: "en-GB",
113
+ * LanguageName: "British English",
114
+ * Name: "Emma"
115
115
  * },
116
116
  * {
117
- * "Gender": "Male",
118
- * "Id": "Brian",
119
- * "LanguageCode": "en-GB",
120
- * "LanguageName": "British English",
121
- * "Name": "Brian"
117
+ * Gender: "Male",
118
+ * Id: "Brian",
119
+ * LanguageCode: "en-GB",
120
+ * LanguageName: "British English",
121
+ * Name: "Brian"
122
122
  * },
123
123
  * {
124
- * "Gender": "Female",
125
- * "Id": "Amy",
126
- * "LanguageCode": "en-GB",
127
- * "LanguageName": "British English",
128
- * "Name": "Amy"
124
+ * Gender: "Female",
125
+ * Id: "Amy",
126
+ * LanguageCode: "en-GB",
127
+ * LanguageName: "British English",
128
+ * Name: "Amy"
129
129
  * }
130
130
  * ]
131
131
  * }
132
132
  * *\/
133
- * // example id: to-describe-available-voices-1482180557753
134
133
  * ```
135
134
  *
135
+ * @public
136
136
  */
137
137
  export declare class DescribeVoicesCommand extends DescribeVoicesCommand_base {
138
138
  /** @internal type navigation helper, not in runtime. */
@@ -76,34 +76,8 @@ declare const GetLexiconCommand_base: {
76
76
  * @throws {@link PollyServiceException}
77
77
  * <p>Base exception class for all service exceptions from Polly service.</p>
78
78
  *
79
- * @public
80
- * @example To retrieve a lexicon
81
- * ```javascript
82
- * // Returns the content of the specified pronunciation lexicon stored in an AWS Region.
83
- * const input = {
84
- * "Name": ""
85
- * };
86
- * const command = new GetLexiconCommand(input);
87
- * const response = await client.send(command);
88
- * /* response ==
89
- * {
90
- * "Lexicon": {
91
- * "Content": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\r\n<lexicon version=\"1.0\" \r\n xmlns=\"http://www.w3.org/2005/01/pronunciation-lexicon\"\r\n xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \r\n xsi:schemaLocation=\"http://www.w3.org/2005/01/pronunciation-lexicon \r\n http://www.w3.org/TR/2007/CR-pronunciation-lexicon-20071212/pls.xsd\"\r\n alphabet=\"ipa\" \r\n xml:lang=\"en-US\">\r\n <lexeme>\r\n <grapheme>W3C</grapheme>\r\n <alias>World Wide Web Consortium</alias>\r\n </lexeme>\r\n</lexicon>",
92
- * "Name": "example"
93
- * },
94
- * "LexiconAttributes": {
95
- * "Alphabet": "ipa",
96
- * "LanguageCode": "en-US",
97
- * "LastModified": 1478542980.117,
98
- * "LexemesCount": 1,
99
- * "LexiconArn": "arn:aws:polly:us-east-1:123456789012:lexicon/example",
100
- * "Size": 503
101
- * }
102
- * }
103
- * *\/
104
- * // example id: to-retrieve-a-lexicon-1481912870836
105
- * ```
106
79
  *
80
+ * @public
107
81
  */
108
82
  export declare class GetLexiconCommand extends GetLexiconCommand_base {
109
83
  /** @internal type navigation helper, not in runtime. */
@@ -88,6 +88,7 @@ declare const GetSpeechSynthesisTaskCommand_base: {
88
88
  * @throws {@link PollyServiceException}
89
89
  * <p>Base exception class for all service exceptions from Polly service.</p>
90
90
  *
91
+ *
91
92
  * @public
92
93
  */
93
94
  export declare class GetSpeechSynthesisTaskCommand extends GetSpeechSynthesisTaskCommand_base {
@@ -74,33 +74,33 @@ declare const ListLexiconsCommand_base: {
74
74
  * @throws {@link PollyServiceException}
75
75
  * <p>Base exception class for all service exceptions from Polly service.</p>
76
76
  *
77
- * @public
77
+ *
78
78
  * @example To list all lexicons in a region
79
79
  * ```javascript
80
80
  * // Returns a list of pronunciation lexicons stored in an AWS Region.
81
- * const input = {};
81
+ * const input = { /* empty *\/ };
82
82
  * const command = new ListLexiconsCommand(input);
83
83
  * const response = await client.send(command);
84
- * /* response ==
84
+ * /* response is
85
85
  * {
86
- * "Lexicons": [
86
+ * Lexicons: [
87
87
  * {
88
- * "Attributes": {
89
- * "Alphabet": "ipa",
90
- * "LanguageCode": "en-US",
91
- * "LastModified": 1478542980.117,
92
- * "LexemesCount": 1,
93
- * "LexiconArn": "arn:aws:polly:us-east-1:123456789012:lexicon/example",
94
- * "Size": 503
88
+ * Attributes: {
89
+ * Alphabet: "ipa",
90
+ * LanguageCode: "en-US",
91
+ * LastModified: 1.478542980117E9,
92
+ * LexemesCount: 1,
93
+ * LexiconArn: "arn:aws:polly:us-east-1:123456789012:lexicon/example",
94
+ * Size: 503
95
95
  * },
96
- * "Name": "example"
96
+ * Name: "example"
97
97
  * }
98
98
  * ]
99
99
  * }
100
100
  * *\/
101
- * // example id: to-list-all-lexicons-in-a-region-1481842106487
102
101
  * ```
103
102
  *
103
+ * @public
104
104
  */
105
105
  export declare class ListLexiconsCommand extends ListLexiconsCommand_base {
106
106
  /** @internal type navigation helper, not in runtime. */
@@ -88,6 +88,7 @@ declare const ListSpeechSynthesisTasksCommand_base: {
88
88
  * @throws {@link PollyServiceException}
89
89
  * <p>Base exception class for all service exceptions from Polly service.</p>
90
90
  *
91
+ *
91
92
  * @public
92
93
  */
93
94
  export declare class ListSpeechSynthesisTasksCommand extends ListSpeechSynthesisTasksCommand_base {
@@ -85,19 +85,22 @@ declare const PutLexiconCommand_base: {
85
85
  * @throws {@link PollyServiceException}
86
86
  * <p>Base exception class for all service exceptions from Polly service.</p>
87
87
  *
88
- * @public
88
+ *
89
89
  * @example To save a lexicon
90
90
  * ```javascript
91
91
  * // Stores a pronunciation lexicon in an AWS Region.
92
92
  * const input = {
93
- * "Content": "<Lexicon Content>",
94
- * "Name": "W3C"
93
+ * Content: "<Lexicon Content>",
94
+ * Name: "W3C"
95
95
  * };
96
96
  * const command = new PutLexiconCommand(input);
97
- * await client.send(command);
98
- * // example id: to-save-a-lexicon-1482272584088
97
+ * const response = await client.send(command);
98
+ * /* response is
99
+ * { /* empty *\/ }
100
+ * *\/
99
101
  * ```
100
102
  *
103
+ * @public
101
104
  */
102
105
  export declare class PutLexiconCommand extends PutLexiconCommand_base {
103
106
  /** @internal type navigation helper, not in runtime. */
@@ -154,6 +154,7 @@ declare const StartSpeechSynthesisTaskCommand_base: {
154
154
  * @throws {@link PollyServiceException}
155
155
  * <p>Base exception class for all service exceptions from Polly service.</p>
156
156
  *
157
+ *
157
158
  * @public
158
159
  */
159
160
  export declare class StartSpeechSynthesisTaskCommand extends StartSpeechSynthesisTaskCommand_base {
@@ -56,6 +56,11 @@ declare const SynthesizeSpeechCommand_base: {
56
56
  * };
57
57
  * const command = new SynthesizeSpeechCommand(input);
58
58
  * const response = await client.send(command);
59
+ * // consume or destroy the stream to free the socket.
60
+ * const bytes = await response.AudioStream.transformToByteArray();
61
+ * // const str = await response.AudioStream.transformToString();
62
+ * // response.AudioStream.destroy(); // only applicable to Node.js Readable streams.
63
+ *
59
64
  * // { // SynthesizeSpeechOutput
60
65
  * // AudioStream: "<SdkStream>", // see \@smithy/types -> StreamingBlobPayloadOutputTypes
61
66
  * // ContentType: "STRING_VALUE",
@@ -117,32 +122,37 @@ declare const SynthesizeSpeechCommand_base: {
117
122
  * @throws {@link PollyServiceException}
118
123
  * <p>Base exception class for all service exceptions from Polly service.</p>
119
124
  *
120
- * @public
125
+ *
121
126
  * @example To synthesize speech
122
127
  * ```javascript
123
128
  * // Synthesizes plain text or SSML into a file of human-like speech.
124
129
  * const input = {
125
- * "LexiconNames": [
130
+ * LexiconNames: [
126
131
  * "example"
127
132
  * ],
128
- * "OutputFormat": "mp3",
129
- * "SampleRate": "8000",
130
- * "Text": "All Gaul is divided into three parts",
131
- * "TextType": "text",
132
- * "VoiceId": "Joanna"
133
+ * OutputFormat: "mp3",
134
+ * SampleRate: "8000",
135
+ * Text: "All Gaul is divided into three parts",
136
+ * TextType: "text",
137
+ * VoiceId: "Joanna"
133
138
  * };
134
139
  * const command = new SynthesizeSpeechCommand(input);
135
140
  * const response = await client.send(command);
136
- * /* response ==
141
+ * // consume or destroy the stream to free the socket.
142
+ * const bytes = await response.AudioStream.transformToByteArray();
143
+ * // const str = await response.AudioStream.transformToString();
144
+ * // response.AudioStream.destroy(); // only applicable to Node.js Readable streams.
145
+ *
146
+ * /* response is
137
147
  * {
138
- * "AudioStream": "TEXT",
139
- * "ContentType": "audio/mpeg",
140
- * "RequestCharacters": 37
148
+ * AudioStream: "TEXT",
149
+ * ContentType: "audio/mpeg",
150
+ * RequestCharacters: 37
141
151
  * }
142
152
  * *\/
143
- * // example id: to-synthesize-speech-1482186064046
144
153
  * ```
145
154
  *
155
+ * @public
146
156
  */
147
157
  export declare class SynthesizeSpeechCommand extends SynthesizeSpeechCommand_base {
148
158
  /** @internal type navigation helper, not in runtime. */
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.776.0",
4
+ "version": "3.782.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",
@@ -21,16 +21,16 @@
21
21
  "@aws-crypto/sha256-browser": "5.2.0",
22
22
  "@aws-crypto/sha256-js": "5.2.0",
23
23
  "@aws-sdk/core": "3.775.0",
24
- "@aws-sdk/credential-provider-node": "3.775.0",
24
+ "@aws-sdk/credential-provider-node": "3.782.0",
25
25
  "@aws-sdk/middleware-host-header": "3.775.0",
26
26
  "@aws-sdk/middleware-logger": "3.775.0",
27
27
  "@aws-sdk/middleware-recursion-detection": "3.775.0",
28
- "@aws-sdk/middleware-user-agent": "3.775.0",
28
+ "@aws-sdk/middleware-user-agent": "3.782.0",
29
29
  "@aws-sdk/region-config-resolver": "3.775.0",
30
30
  "@aws-sdk/types": "3.775.0",
31
- "@aws-sdk/util-endpoints": "3.775.0",
31
+ "@aws-sdk/util-endpoints": "3.782.0",
32
32
  "@aws-sdk/util-user-agent-browser": "3.775.0",
33
- "@aws-sdk/util-user-agent-node": "3.775.0",
33
+ "@aws-sdk/util-user-agent-node": "3.782.0",
34
34
  "@smithy/config-resolver": "^4.1.0",
35
35
  "@smithy/core": "^3.2.0",
36
36
  "@smithy/fetch-http-handler": "^5.0.2",