Skip to content

Commit daf6bd4

Browse files
author
awstools
committed
feat(client-polly): Add new engine - generative - that builds the most expressive conversational voices.
1 parent 711a8ff commit daf6bd4

File tree

7 files changed

+47
-58
lines changed

7 files changed

+47
-58
lines changed

clients/client-polly/src/commands/DescribeVoicesCommand.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ export interface DescribeVoicesCommandOutput extends DescribeVoicesOutput, __Met
5050
* // const { PollyClient, DescribeVoicesCommand } = require("@aws-sdk/client-polly"); // CommonJS import
5151
* const client = new PollyClient(config);
5252
* const input = { // DescribeVoicesInput
53-
* Engine: "standard" || "neural" || "long-form",
53+
* Engine: "standard" || "neural" || "long-form" || "generative",
5454
* LanguageCode: "arb" || "cmn-CN" || "cy-GB" || "da-DK" || "de-DE" || "en-AU" || "en-GB" || "en-GB-WLS" || "en-IN" || "en-US" || "es-ES" || "es-MX" || "es-US" || "fr-CA" || "fr-FR" || "is-IS" || "it-IT" || "ja-JP" || "hi-IN" || "ko-KR" || "nb-NO" || "nl-NL" || "pl-PL" || "pt-BR" || "pt-PT" || "ro-RO" || "ru-RU" || "sv-SE" || "tr-TR" || "en-NZ" || "en-ZA" || "ca-ES" || "de-AT" || "yue-CN" || "ar-AE" || "fi-FI" || "en-IE" || "nl-BE" || "fr-BE",
5555
* IncludeAdditionalLanguageCodes: true || false,
5656
* NextToken: "STRING_VALUE",
@@ -69,7 +69,7 @@ export interface DescribeVoicesCommandOutput extends DescribeVoicesOutput, __Met
6969
* // "arb" || "cmn-CN" || "cy-GB" || "da-DK" || "de-DE" || "en-AU" || "en-GB" || "en-GB-WLS" || "en-IN" || "en-US" || "es-ES" || "es-MX" || "es-US" || "fr-CA" || "fr-FR" || "is-IS" || "it-IT" || "ja-JP" || "hi-IN" || "ko-KR" || "nb-NO" || "nl-NL" || "pl-PL" || "pt-BR" || "pt-PT" || "ro-RO" || "ru-RU" || "sv-SE" || "tr-TR" || "en-NZ" || "en-ZA" || "ca-ES" || "de-AT" || "yue-CN" || "ar-AE" || "fi-FI" || "en-IE" || "nl-BE" || "fr-BE",
7070
* // ],
7171
* // SupportedEngines: [ // EngineList
72-
* // "standard" || "neural" || "long-form",
72+
* // "standard" || "neural" || "long-form" || "generative",
7373
* // ],
7474
* // },
7575
* // ],

clients/client-polly/src/commands/GetSpeechSynthesisTaskCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export interface GetSpeechSynthesisTaskCommandOutput extends GetSpeechSynthesisT
4444
* const response = await client.send(command);
4545
* // { // GetSpeechSynthesisTaskOutput
4646
* // SynthesisTask: { // SynthesisTask
47-
* // Engine: "standard" || "neural" || "long-form",
47+
* // Engine: "standard" || "neural" || "long-form" || "generative",
4848
* // TaskId: "STRING_VALUE",
4949
* // TaskStatus: "scheduled" || "inProgress" || "completed" || "failed",
5050
* // TaskStatusReason: "STRING_VALUE",

clients/client-polly/src/commands/ListSpeechSynthesisTasksCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ export interface ListSpeechSynthesisTasksCommandOutput extends ListSpeechSynthes
4747
* // NextToken: "STRING_VALUE",
4848
* // SynthesisTasks: [ // SynthesisTasks
4949
* // { // SynthesisTask
50-
* // Engine: "standard" || "neural" || "long-form",
50+
* // Engine: "standard" || "neural" || "long-form" || "generative",
5151
* // TaskId: "STRING_VALUE",
5252
* // TaskStatus: "scheduled" || "inProgress" || "completed" || "failed",
5353
* // TaskStatusReason: "STRING_VALUE",

clients/client-polly/src/commands/StartSpeechSynthesisTaskCommand.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ export interface StartSpeechSynthesisTaskCommandOutput extends StartSpeechSynthe
4444
* // const { PollyClient, StartSpeechSynthesisTaskCommand } = require("@aws-sdk/client-polly"); // CommonJS import
4545
* const client = new PollyClient(config);
4646
* const input = { // StartSpeechSynthesisTaskInput
47-
* Engine: "standard" || "neural" || "long-form",
47+
* Engine: "standard" || "neural" || "long-form" || "generative",
4848
* LanguageCode: "arb" || "cmn-CN" || "cy-GB" || "da-DK" || "de-DE" || "en-AU" || "en-GB" || "en-GB-WLS" || "en-IN" || "en-US" || "es-ES" || "es-MX" || "es-US" || "fr-CA" || "fr-FR" || "is-IS" || "it-IT" || "ja-JP" || "hi-IN" || "ko-KR" || "nb-NO" || "nl-NL" || "pl-PL" || "pt-BR" || "pt-PT" || "ro-RO" || "ru-RU" || "sv-SE" || "tr-TR" || "en-NZ" || "en-ZA" || "ca-ES" || "de-AT" || "yue-CN" || "ar-AE" || "fi-FI" || "en-IE" || "nl-BE" || "fr-BE",
4949
* LexiconNames: [ // LexiconNameList
5050
* "STRING_VALUE",
@@ -65,7 +65,7 @@ export interface StartSpeechSynthesisTaskCommandOutput extends StartSpeechSynthe
6565
* const response = await client.send(command);
6666
* // { // StartSpeechSynthesisTaskOutput
6767
* // SynthesisTask: { // SynthesisTask
68-
* // Engine: "standard" || "neural" || "long-form",
68+
* // Engine: "standard" || "neural" || "long-form" || "generative",
6969
* // TaskId: "STRING_VALUE",
7070
* // TaskStatus: "scheduled" || "inProgress" || "completed" || "failed",
7171
* // TaskStatusReason: "STRING_VALUE",

clients/client-polly/src/commands/SynthesizeSpeechCommand.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ export interface SynthesizeSpeechCommandOutput extends Omit<SynthesizeSpeechOutp
4545
* // const { PollyClient, SynthesizeSpeechCommand } = require("@aws-sdk/client-polly"); // CommonJS import
4646
* const client = new PollyClient(config);
4747
* const input = { // SynthesizeSpeechInput
48-
* Engine: "standard" || "neural" || "long-form",
48+
* Engine: "standard" || "neural" || "long-form" || "generative",
4949
* LanguageCode: "arb" || "cmn-CN" || "cy-GB" || "da-DK" || "de-DE" || "en-AU" || "en-GB" || "en-GB-WLS" || "en-IN" || "en-US" || "es-ES" || "es-MX" || "es-US" || "fr-CA" || "fr-FR" || "is-IS" || "it-IT" || "ja-JP" || "hi-IN" || "ko-KR" || "nb-NO" || "nl-NL" || "pl-PL" || "pt-BR" || "pt-PT" || "ro-RO" || "ru-RU" || "sv-SE" || "tr-TR" || "en-NZ" || "en-ZA" || "ca-ES" || "de-AT" || "yue-CN" || "ar-AE" || "fi-FI" || "en-IE" || "nl-BE" || "fr-BE",
5050
* LexiconNames: [ // LexiconNameList
5151
* "STRING_VALUE",

clients/client-polly/src/models/models_0.ts

+25-42
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ export class ServiceFailureException extends __BaseException {
7171
* @enum
7272
*/
7373
export const Engine = {
74+
GENERATIVE: "generative",
7475
LONG_FORM: "long-form",
7576
NEURAL: "neural",
7677
STANDARD: "standard",
@@ -137,9 +138,9 @@ export type LanguageCode = (typeof LanguageCode)[keyof typeof LanguageCode];
137138
*/
138139
export interface DescribeVoicesInput {
139140
/**
140-
* <p>Specifies the engine (<code>standard</code>, <code>neural</code> or
141-
* <code>long-form</code>) used by Amazon Polly when processing input text for
142-
* speech synthesis. </p>
141+
* <p>Specifies the engine (<code>standard</code>, <code>neural</code>,
142+
* <code>long-form</code> or <code>generative</code>) used by Amazon Polly when
143+
* processing input text for speech synthesis. </p>
143144
* @public
144145
*/
145146
Engine?: Engine;
@@ -345,8 +346,8 @@ export interface Voice {
345346
AdditionalLanguageCodes?: LanguageCode[];
346347

347348
/**
348-
* <p>Specifies which engines (<code>standard</code>, <code>neural</code> or
349-
* <code>long-form</code>) are supported by a given voice.</p>
349+
* <p>Specifies which engines (<code>standard</code>, <code>neural</code>,
350+
* <code>long-form</code> or <code>generative</code>) are supported by a given voice.</p>
350351
* @public
351352
*/
352353
SupportedEngines?: Engine[];
@@ -592,10 +593,10 @@ export type TextType = (typeof TextType)[keyof typeof TextType];
592593
*/
593594
export interface SynthesisTask {
594595
/**
595-
* <p>Specifies the engine (<code>standard</code>, <code>neural</code> or
596-
* <code>long-form</code>) for Amazon Polly to use when processing input text for
597-
* speech synthesis. Using a voice that is not supported for the engine
598-
* selected will result in an error.</p>
596+
* <p>Specifies the engine (<code>standard</code>, <code>neural</code>,
597+
* <code>long-form</code> or <code>generative</code>) for Amazon Polly to use
598+
* when processing input text for speech synthesis. Using a voice that
599+
* is not supported for the engine selected will result in an error.</p>
599600
* @public
600601
*/
601602
Engine?: Engine;
@@ -665,7 +666,7 @@ export interface SynthesisTask {
665666
* <p>The valid values for mp3 and ogg_vorbis are "8000", "16000", "22050",
666667
* and "24000". The default value for standard voices is "22050". The default
667668
* value for neural voices is "24000". The default value for long-form voices
668-
* is "24000".</p>
669+
* is "24000". The default value for generative voices is "24000".</p>
669670
* <p>Valid values for pcm are "8000" and "16000" The default value is
670671
* "16000". </p>
671672
* @public
@@ -1180,10 +1181,10 @@ export class SsmlMarksNotSupportedForTextTypeException extends __BaseException {
11801181
*/
11811182
export interface StartSpeechSynthesisTaskInput {
11821183
/**
1183-
* <p>Specifies the engine (<code>standard</code>, <code>neural</code> or
1184-
* <code>long-form</code>) for Amazon Polly to use when processing input text for
1185-
* speech synthesis. Using a voice that is not supported for the engine
1186-
* selected will result in an error.</p>
1184+
* <p>Specifies the engine (<code>standard</code>, <code>neural</code>,
1185+
* <code>long-form</code> or <code>generative</code>) for Amazon Polly to use
1186+
* when processing input text for speech synthesis. Using a voice that
1187+
* is not supported for the engine selected will result in an error.</p>
11871188
* @public
11881189
*/
11891190
Engine?: Engine;
@@ -1234,7 +1235,7 @@ export interface StartSpeechSynthesisTaskInput {
12341235
* <p>The valid values for mp3 and ogg_vorbis are "8000", "16000", "22050",
12351236
* and "24000". The default value for standard voices is "22050". The default
12361237
* value for neural voices is "24000". The default value for long-form voices
1237-
* is "24000".</p>
1238+
* is "24000". The default value for generative voices is "24000".</p>
12381239
* <p>Valid values for pcm are "8000" and "16000" The default value is
12391240
* "16000". </p>
12401241
* @public
@@ -1318,36 +1319,18 @@ export class TextLengthExceededException extends __BaseException {
13181319
*/
13191320
export interface SynthesizeSpeechInput {
13201321
/**
1321-
* <p>Specifies the engine (<code>standard</code>, <code>neural</code> or
1322-
* <code>long-form</code>) for Amazon Polly to use when processing input text for
1323-
* speech synthesis. For information on Amazon Polly voices and which voices are
1324-
* available for each engine, see <a href="https://docs.aws.amazon.com/polly/latest/dg/voicelist.html">Available Voices</a>.</p>
1325-
* <p>
1326-
* <b>NTTS-only voices</b>
1327-
* </p>
1328-
* <p>When using NTTS-only voices such as Kevin (en-US), this parameter is
1329-
* required and must be set to <code>neural</code>. If the engine is not
1330-
* specified, or is set to <code>standard</code>, this will result in an
1331-
* error. </p>
1332-
* <p>
1333-
* <b>long-form-only voices</b>
1334-
* </p>
1335-
* <p>When using long-form-only voices such as Danielle (en-US), this
1336-
* parameter is required and must be set to <code>long-form</code>. If the
1337-
* engine is not specified, or is set to <code>standard</code> or
1338-
* <code>neural</code>, this will result in an error. </p>
1322+
* <p>Specifies the engine (<code>standard</code>, <code>neural</code>,
1323+
* <code>long-form</code>, or <code>generative</code>) for Amazon Polly
1324+
* to use when processing input text for speech synthesis. Provide an engine
1325+
* that is supported by the voice you select. If you don't provide an engine,
1326+
* the standard engine is selected by default. If a chosen voice isn't supported
1327+
* by the standard engine, this will result in an error. For information on
1328+
* Amazon Polly voices and which voices are available for each engine, see <a href="https://docs.aws.amazon.com/polly/latest/dg/voicelist.html">Available Voices</a>.</p>
13391329
* <p>Type: String</p>
13401330
* <p>Valid Values: <code>standard</code> | <code>neural</code> |
1341-
* <code>long-form</code>
1331+
* <code>long-form</code> | <code>generative</code>
13421332
* </p>
13431333
* <p>Required: Yes</p>
1344-
* <p>
1345-
* <b>Standard voices</b>
1346-
* </p>
1347-
* <p>For standard voices, this is not required; the engine parameter
1348-
* defaults to <code>standard</code>. If the engine is not specified, or is
1349-
* set to <code>standard</code> and an NTTS-only voice is selected, this will
1350-
* result in an error. </p>
13511334
* @public
13521335
*/
13531336
Engine?: Engine;
@@ -1389,7 +1372,7 @@ export interface SynthesizeSpeechInput {
13891372
* <p>The valid values for mp3 and ogg_vorbis are "8000", "16000", "22050",
13901373
* and "24000". The default value for standard voices is "22050". The default
13911374
* value for neural voices is "24000". The default value for long-form voices
1392-
* is "24000".</p>
1375+
* is "24000". The default value for generative voices is "24000".</p>
13931376
* <p>Valid values for pcm are "8000" and "16000" The default value is
13941377
* "16000". </p>
13951378
* @public

0 commit comments

Comments
 (0)