@aws-sdk/client-polly 3.288.0 → 3.289.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-types/commands/DeleteLexiconCommand.d.ts +11 -0
- package/dist-types/commands/DescribeVoicesCommand.d.ts +38 -0
- package/dist-types/commands/GetLexiconCommand.d.ts +27 -0
- package/dist-types/commands/ListLexiconsCommand.d.ts +26 -0
- package/dist-types/commands/PutLexiconCommand.d.ts +12 -0
- package/dist-types/commands/SynthesizeSpeechCommand.d.ts +25 -0
- package/package.json +31 -31
|
@@ -32,6 +32,17 @@ export interface DeleteLexiconCommandOutput extends DeleteLexiconOutput, __Metad
|
|
|
32
32
|
* @see {@link DeleteLexiconCommandOutput} for command's `response` shape.
|
|
33
33
|
* @see {@link PollyClientResolvedConfig | config} for PollyClient's `config` shape.
|
|
34
34
|
*
|
|
35
|
+
* @example To delete a lexicon
|
|
36
|
+
* ```javascript
|
|
37
|
+
* // Deletes a specified pronunciation lexicon stored in an AWS Region.
|
|
38
|
+
* const input = {
|
|
39
|
+
* "Name": "example"
|
|
40
|
+
* };
|
|
41
|
+
* const command = new DeleteLexiconCommand(input);
|
|
42
|
+
* await client.send(command);
|
|
43
|
+
* // example id: to-delete-a-lexicon-1481922498332
|
|
44
|
+
* ```
|
|
45
|
+
*
|
|
35
46
|
*/
|
|
36
47
|
export declare class DeleteLexiconCommand extends $Command<DeleteLexiconCommandInput, DeleteLexiconCommandOutput, PollyClientResolvedConfig> {
|
|
37
48
|
readonly input: DeleteLexiconCommandInput;
|
|
@@ -44,6 +44,44 @@ export interface DescribeVoicesCommandOutput extends DescribeVoicesOutput, __Met
|
|
|
44
44
|
* @see {@link DescribeVoicesCommandOutput} for command's `response` shape.
|
|
45
45
|
* @see {@link PollyClientResolvedConfig | config} for PollyClient's `config` shape.
|
|
46
46
|
*
|
|
47
|
+
* @example To describe available voices
|
|
48
|
+
* ```javascript
|
|
49
|
+
* // 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.
|
|
50
|
+
* const input = {
|
|
51
|
+
* "LanguageCode": "en-GB"
|
|
52
|
+
* };
|
|
53
|
+
* const command = new DescribeVoicesCommand(input);
|
|
54
|
+
* const response = await client.send(command);
|
|
55
|
+
* /* response ==
|
|
56
|
+
* {
|
|
57
|
+
* "Voices": [
|
|
58
|
+
* {
|
|
59
|
+
* "Gender": "Female",
|
|
60
|
+
* "Id": "Emma",
|
|
61
|
+
* "LanguageCode": "en-GB",
|
|
62
|
+
* "LanguageName": "British English",
|
|
63
|
+
* "Name": "Emma"
|
|
64
|
+
* },
|
|
65
|
+
* {
|
|
66
|
+
* "Gender": "Male",
|
|
67
|
+
* "Id": "Brian",
|
|
68
|
+
* "LanguageCode": "en-GB",
|
|
69
|
+
* "LanguageName": "British English",
|
|
70
|
+
* "Name": "Brian"
|
|
71
|
+
* },
|
|
72
|
+
* {
|
|
73
|
+
* "Gender": "Female",
|
|
74
|
+
* "Id": "Amy",
|
|
75
|
+
* "LanguageCode": "en-GB",
|
|
76
|
+
* "LanguageName": "British English",
|
|
77
|
+
* "Name": "Amy"
|
|
78
|
+
* }
|
|
79
|
+
* ]
|
|
80
|
+
* }
|
|
81
|
+
* *\/
|
|
82
|
+
* // example id: to-describe-available-voices-1482180557753
|
|
83
|
+
* ```
|
|
84
|
+
*
|
|
47
85
|
*/
|
|
48
86
|
export declare class DescribeVoicesCommand extends $Command<DescribeVoicesCommandInput, DescribeVoicesCommandOutput, PollyClientResolvedConfig> {
|
|
49
87
|
readonly input: DescribeVoicesCommandInput;
|
|
@@ -30,6 +30,33 @@ export interface GetLexiconCommandOutput extends GetLexiconOutput, __MetadataBea
|
|
|
30
30
|
* @see {@link GetLexiconCommandOutput} for command's `response` shape.
|
|
31
31
|
* @see {@link PollyClientResolvedConfig | config} for PollyClient's `config` shape.
|
|
32
32
|
*
|
|
33
|
+
* @example To retrieve a lexicon
|
|
34
|
+
* ```javascript
|
|
35
|
+
* // Returns the content of the specified pronunciation lexicon stored in an AWS Region.
|
|
36
|
+
* const input = {
|
|
37
|
+
* "Name": ""
|
|
38
|
+
* };
|
|
39
|
+
* const command = new GetLexiconCommand(input);
|
|
40
|
+
* const response = await client.send(command);
|
|
41
|
+
* /* response ==
|
|
42
|
+
* {
|
|
43
|
+
* "Lexicon": {
|
|
44
|
+
* "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>",
|
|
45
|
+
* "Name": "example"
|
|
46
|
+
* },
|
|
47
|
+
* "LexiconAttributes": {
|
|
48
|
+
* "Alphabet": "ipa",
|
|
49
|
+
* "LanguageCode": "en-US",
|
|
50
|
+
* "LastModified": 1478542980.117,
|
|
51
|
+
* "LexemesCount": 1,
|
|
52
|
+
* "LexiconArn": "arn:aws:polly:us-east-1:123456789012:lexicon/example",
|
|
53
|
+
* "Size": 503
|
|
54
|
+
* }
|
|
55
|
+
* }
|
|
56
|
+
* *\/
|
|
57
|
+
* // example id: to-retrieve-a-lexicon-1481912870836
|
|
58
|
+
* ```
|
|
59
|
+
*
|
|
33
60
|
*/
|
|
34
61
|
export declare class GetLexiconCommand extends $Command<GetLexiconCommandInput, GetLexiconCommandOutput, PollyClientResolvedConfig> {
|
|
35
62
|
readonly input: GetLexiconCommandInput;
|
|
@@ -29,6 +29,32 @@ export interface ListLexiconsCommandOutput extends ListLexiconsOutput, __Metadat
|
|
|
29
29
|
* @see {@link ListLexiconsCommandOutput} for command's `response` shape.
|
|
30
30
|
* @see {@link PollyClientResolvedConfig | config} for PollyClient's `config` shape.
|
|
31
31
|
*
|
|
32
|
+
* @example To list all lexicons in a region
|
|
33
|
+
* ```javascript
|
|
34
|
+
* // Returns a list of pronunciation lexicons stored in an AWS Region.
|
|
35
|
+
* const input = {};
|
|
36
|
+
* const command = new ListLexiconsCommand(input);
|
|
37
|
+
* const response = await client.send(command);
|
|
38
|
+
* /* response ==
|
|
39
|
+
* {
|
|
40
|
+
* "Lexicons": [
|
|
41
|
+
* {
|
|
42
|
+
* "Attributes": {
|
|
43
|
+
* "Alphabet": "ipa",
|
|
44
|
+
* "LanguageCode": "en-US",
|
|
45
|
+
* "LastModified": 1478542980.117,
|
|
46
|
+
* "LexemesCount": 1,
|
|
47
|
+
* "LexiconArn": "arn:aws:polly:us-east-1:123456789012:lexicon/example",
|
|
48
|
+
* "Size": 503
|
|
49
|
+
* },
|
|
50
|
+
* "Name": "example"
|
|
51
|
+
* }
|
|
52
|
+
* ]
|
|
53
|
+
* }
|
|
54
|
+
* *\/
|
|
55
|
+
* // example id: to-list-all-lexicons-in-a-region-1481842106487
|
|
56
|
+
* ```
|
|
57
|
+
*
|
|
32
58
|
*/
|
|
33
59
|
export declare class ListLexiconsCommand extends $Command<ListLexiconsCommandInput, ListLexiconsCommandOutput, PollyClientResolvedConfig> {
|
|
34
60
|
readonly input: ListLexiconsCommandInput;
|
|
@@ -34,6 +34,18 @@ export interface PutLexiconCommandOutput extends PutLexiconOutput, __MetadataBea
|
|
|
34
34
|
* @see {@link PutLexiconCommandOutput} for command's `response` shape.
|
|
35
35
|
* @see {@link PollyClientResolvedConfig | config} for PollyClient's `config` shape.
|
|
36
36
|
*
|
|
37
|
+
* @example To save a lexicon
|
|
38
|
+
* ```javascript
|
|
39
|
+
* // Stores a pronunciation lexicon in an AWS Region.
|
|
40
|
+
* const input = {
|
|
41
|
+
* "Content": "file://example.pls",
|
|
42
|
+
* "Name": "W3C"
|
|
43
|
+
* };
|
|
44
|
+
* const command = new PutLexiconCommand(input);
|
|
45
|
+
* await client.send(command);
|
|
46
|
+
* // example id: to-save-a-lexicon-1482272584088
|
|
47
|
+
* ```
|
|
48
|
+
*
|
|
37
49
|
*/
|
|
38
50
|
export declare class PutLexiconCommand extends $Command<PutLexiconCommandInput, PutLexiconCommandOutput, PollyClientResolvedConfig> {
|
|
39
51
|
readonly input: PutLexiconCommandInput;
|
|
@@ -33,6 +33,31 @@ export interface SynthesizeSpeechCommandOutput extends __WithSdkStreamMixin<Synt
|
|
|
33
33
|
* @see {@link SynthesizeSpeechCommandOutput} for command's `response` shape.
|
|
34
34
|
* @see {@link PollyClientResolvedConfig | config} for PollyClient's `config` shape.
|
|
35
35
|
*
|
|
36
|
+
* @example To synthesize speech
|
|
37
|
+
* ```javascript
|
|
38
|
+
* // Synthesizes plain text or SSML into a file of human-like speech.
|
|
39
|
+
* const input = {
|
|
40
|
+
* "LexiconNames": [
|
|
41
|
+
* "example"
|
|
42
|
+
* ],
|
|
43
|
+
* "OutputFormat": "mp3",
|
|
44
|
+
* "SampleRate": "8000",
|
|
45
|
+
* "Text": "All Gaul is divided into three parts",
|
|
46
|
+
* "TextType": "text",
|
|
47
|
+
* "VoiceId": "Joanna"
|
|
48
|
+
* };
|
|
49
|
+
* const command = new SynthesizeSpeechCommand(input);
|
|
50
|
+
* const response = await client.send(command);
|
|
51
|
+
* /* response ==
|
|
52
|
+
* {
|
|
53
|
+
* "AudioStream": "TEXT",
|
|
54
|
+
* "ContentType": "audio/mpeg",
|
|
55
|
+
* "RequestCharacters": 37
|
|
56
|
+
* }
|
|
57
|
+
* *\/
|
|
58
|
+
* // example id: to-synthesize-speech-1482186064046
|
|
59
|
+
* ```
|
|
60
|
+
*
|
|
36
61
|
*/
|
|
37
62
|
export declare class SynthesizeSpeechCommand extends $Command<SynthesizeSpeechCommandInput, SynthesizeSpeechCommandOutput, PollyClientResolvedConfig> {
|
|
38
63
|
readonly input: SynthesizeSpeechCommandInput;
|
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.289.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
|
|
7
7
|
"build:cjs": "tsc -p tsconfig.cjs.json",
|
|
@@ -20,39 +20,39 @@
|
|
|
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.
|
|
24
|
-
"@aws-sdk/config-resolver": "3.
|
|
25
|
-
"@aws-sdk/credential-provider-node": "3.
|
|
26
|
-
"@aws-sdk/fetch-http-handler": "3.
|
|
27
|
-
"@aws-sdk/hash-node": "3.
|
|
28
|
-
"@aws-sdk/invalid-dependency": "3.
|
|
29
|
-
"@aws-sdk/middleware-content-length": "3.
|
|
30
|
-
"@aws-sdk/middleware-endpoint": "3.
|
|
31
|
-
"@aws-sdk/middleware-host-header": "3.
|
|
32
|
-
"@aws-sdk/middleware-logger": "3.
|
|
33
|
-
"@aws-sdk/middleware-recursion-detection": "3.
|
|
34
|
-
"@aws-sdk/middleware-retry": "3.
|
|
35
|
-
"@aws-sdk/middleware-serde": "3.
|
|
36
|
-
"@aws-sdk/middleware-signing": "3.
|
|
37
|
-
"@aws-sdk/middleware-stack": "3.
|
|
38
|
-
"@aws-sdk/middleware-user-agent": "3.
|
|
39
|
-
"@aws-sdk/node-config-provider": "3.
|
|
40
|
-
"@aws-sdk/node-http-handler": "3.
|
|
41
|
-
"@aws-sdk/protocol-http": "3.
|
|
42
|
-
"@aws-sdk/smithy-client": "3.
|
|
43
|
-
"@aws-sdk/types": "3.
|
|
44
|
-
"@aws-sdk/url-parser": "3.
|
|
23
|
+
"@aws-sdk/client-sts": "3.289.0",
|
|
24
|
+
"@aws-sdk/config-resolver": "3.289.0",
|
|
25
|
+
"@aws-sdk/credential-provider-node": "3.289.0",
|
|
26
|
+
"@aws-sdk/fetch-http-handler": "3.289.0",
|
|
27
|
+
"@aws-sdk/hash-node": "3.289.0",
|
|
28
|
+
"@aws-sdk/invalid-dependency": "3.289.0",
|
|
29
|
+
"@aws-sdk/middleware-content-length": "3.289.0",
|
|
30
|
+
"@aws-sdk/middleware-endpoint": "3.289.0",
|
|
31
|
+
"@aws-sdk/middleware-host-header": "3.289.0",
|
|
32
|
+
"@aws-sdk/middleware-logger": "3.289.0",
|
|
33
|
+
"@aws-sdk/middleware-recursion-detection": "3.289.0",
|
|
34
|
+
"@aws-sdk/middleware-retry": "3.289.0",
|
|
35
|
+
"@aws-sdk/middleware-serde": "3.289.0",
|
|
36
|
+
"@aws-sdk/middleware-signing": "3.289.0",
|
|
37
|
+
"@aws-sdk/middleware-stack": "3.289.0",
|
|
38
|
+
"@aws-sdk/middleware-user-agent": "3.289.0",
|
|
39
|
+
"@aws-sdk/node-config-provider": "3.289.0",
|
|
40
|
+
"@aws-sdk/node-http-handler": "3.289.0",
|
|
41
|
+
"@aws-sdk/protocol-http": "3.289.0",
|
|
42
|
+
"@aws-sdk/smithy-client": "3.289.0",
|
|
43
|
+
"@aws-sdk/types": "3.289.0",
|
|
44
|
+
"@aws-sdk/url-parser": "3.289.0",
|
|
45
45
|
"@aws-sdk/util-base64": "3.208.0",
|
|
46
46
|
"@aws-sdk/util-body-length-browser": "3.188.0",
|
|
47
47
|
"@aws-sdk/util-body-length-node": "3.208.0",
|
|
48
|
-
"@aws-sdk/util-defaults-mode-browser": "3.
|
|
49
|
-
"@aws-sdk/util-defaults-mode-node": "3.
|
|
50
|
-
"@aws-sdk/util-endpoints": "3.
|
|
51
|
-
"@aws-sdk/util-retry": "3.
|
|
52
|
-
"@aws-sdk/util-stream-browser": "3.
|
|
53
|
-
"@aws-sdk/util-stream-node": "3.
|
|
54
|
-
"@aws-sdk/util-user-agent-browser": "3.
|
|
55
|
-
"@aws-sdk/util-user-agent-node": "3.
|
|
48
|
+
"@aws-sdk/util-defaults-mode-browser": "3.289.0",
|
|
49
|
+
"@aws-sdk/util-defaults-mode-node": "3.289.0",
|
|
50
|
+
"@aws-sdk/util-endpoints": "3.289.0",
|
|
51
|
+
"@aws-sdk/util-retry": "3.289.0",
|
|
52
|
+
"@aws-sdk/util-stream-browser": "3.289.0",
|
|
53
|
+
"@aws-sdk/util-stream-node": "3.289.0",
|
|
54
|
+
"@aws-sdk/util-user-agent-browser": "3.289.0",
|
|
55
|
+
"@aws-sdk/util-user-agent-node": "3.289.0",
|
|
56
56
|
"@aws-sdk/util-utf8": "3.254.0",
|
|
57
57
|
"tslib": "^2.3.1"
|
|
58
58
|
},
|