Skip to content

Commit

Permalink
feat(client-polly): Add new engine - generative - that builds the mos…
Browse files Browse the repository at this point in the history
…t expressive conversational voices.
  • Loading branch information
awstools committed May 8, 2024
1 parent 711a8ff commit daf6bd4
Show file tree
Hide file tree
Showing 7 changed files with 47 additions and 58 deletions.
4 changes: 2 additions & 2 deletions clients/client-polly/src/commands/DescribeVoicesCommand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export interface DescribeVoicesCommandOutput extends DescribeVoicesOutput, __Met
* // const { PollyClient, DescribeVoicesCommand } = require("@aws-sdk/client-polly"); // CommonJS import
* const client = new PollyClient(config);
* const input = { // DescribeVoicesInput
* Engine: "standard" || "neural" || "long-form",
* Engine: "standard" || "neural" || "long-form" || "generative",
* 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",
* IncludeAdditionalLanguageCodes: true || false,
* NextToken: "STRING_VALUE",
Expand All @@ -69,7 +69,7 @@ export interface DescribeVoicesCommandOutput extends DescribeVoicesOutput, __Met
* // "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",
* // ],
* // SupportedEngines: [ // EngineList
* // "standard" || "neural" || "long-form",
* // "standard" || "neural" || "long-form" || "generative",
* // ],
* // },
* // ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export interface GetSpeechSynthesisTaskCommandOutput extends GetSpeechSynthesisT
* const response = await client.send(command);
* // { // GetSpeechSynthesisTaskOutput
* // SynthesisTask: { // SynthesisTask
* // Engine: "standard" || "neural" || "long-form",
* // Engine: "standard" || "neural" || "long-form" || "generative",
* // TaskId: "STRING_VALUE",
* // TaskStatus: "scheduled" || "inProgress" || "completed" || "failed",
* // TaskStatusReason: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ export interface ListSpeechSynthesisTasksCommandOutput extends ListSpeechSynthes
* // NextToken: "STRING_VALUE",
* // SynthesisTasks: [ // SynthesisTasks
* // { // SynthesisTask
* // Engine: "standard" || "neural" || "long-form",
* // Engine: "standard" || "neural" || "long-form" || "generative",
* // TaskId: "STRING_VALUE",
* // TaskStatus: "scheduled" || "inProgress" || "completed" || "failed",
* // TaskStatusReason: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export interface StartSpeechSynthesisTaskCommandOutput extends StartSpeechSynthe
* // const { PollyClient, StartSpeechSynthesisTaskCommand } = require("@aws-sdk/client-polly"); // CommonJS import
* const client = new PollyClient(config);
* const input = { // StartSpeechSynthesisTaskInput
* Engine: "standard" || "neural" || "long-form",
* Engine: "standard" || "neural" || "long-form" || "generative",
* 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",
* LexiconNames: [ // LexiconNameList
* "STRING_VALUE",
Expand All @@ -65,7 +65,7 @@ export interface StartSpeechSynthesisTaskCommandOutput extends StartSpeechSynthe
* const response = await client.send(command);
* // { // StartSpeechSynthesisTaskOutput
* // SynthesisTask: { // SynthesisTask
* // Engine: "standard" || "neural" || "long-form",
* // Engine: "standard" || "neural" || "long-form" || "generative",
* // TaskId: "STRING_VALUE",
* // TaskStatus: "scheduled" || "inProgress" || "completed" || "failed",
* // TaskStatusReason: "STRING_VALUE",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export interface SynthesizeSpeechCommandOutput extends Omit<SynthesizeSpeechOutp
* // const { PollyClient, SynthesizeSpeechCommand } = require("@aws-sdk/client-polly"); // CommonJS import
* const client = new PollyClient(config);
* const input = { // SynthesizeSpeechInput
* Engine: "standard" || "neural" || "long-form",
* Engine: "standard" || "neural" || "long-form" || "generative",
* 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",
* LexiconNames: [ // LexiconNameList
* "STRING_VALUE",
Expand Down
67 changes: 25 additions & 42 deletions clients/client-polly/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@ export class ServiceFailureException extends __BaseException {
* @enum
*/
export const Engine = {
GENERATIVE: "generative",
LONG_FORM: "long-form",
NEURAL: "neural",
STANDARD: "standard",
Expand Down Expand Up @@ -137,9 +138,9 @@ export type LanguageCode = (typeof LanguageCode)[keyof typeof LanguageCode];
*/
export interface DescribeVoicesInput {
/**
* <p>Specifies the engine (<code>standard</code>, <code>neural</code> or
* <code>long-form</code>) used by Amazon Polly when processing input text for
* speech synthesis. </p>
* <p>Specifies the engine (<code>standard</code>, <code>neural</code>,
* <code>long-form</code> or <code>generative</code>) used by Amazon Polly when
* processing input text for speech synthesis. </p>
* @public
*/
Engine?: Engine;
Expand Down Expand Up @@ -345,8 +346,8 @@ export interface Voice {
AdditionalLanguageCodes?: LanguageCode[];

/**
* <p>Specifies which engines (<code>standard</code>, <code>neural</code> or
* <code>long-form</code>) are supported by a given voice.</p>
* <p>Specifies which engines (<code>standard</code>, <code>neural</code>,
* <code>long-form</code> or <code>generative</code>) are supported by a given voice.</p>
* @public
*/
SupportedEngines?: Engine[];
Expand Down Expand Up @@ -592,10 +593,10 @@ export type TextType = (typeof TextType)[keyof typeof TextType];
*/
export interface SynthesisTask {
/**
* <p>Specifies the engine (<code>standard</code>, <code>neural</code> or
* <code>long-form</code>) for Amazon Polly to use when processing input text for
* speech synthesis. Using a voice that is not supported for the engine
* selected will result in an error.</p>
* <p>Specifies the engine (<code>standard</code>, <code>neural</code>,
* <code>long-form</code> or <code>generative</code>) for Amazon Polly to use
* when processing input text for speech synthesis. Using a voice that
* is not supported for the engine selected will result in an error.</p>
* @public
*/
Engine?: Engine;
Expand Down Expand Up @@ -665,7 +666,7 @@ export interface SynthesisTask {
* <p>The valid values for mp3 and ogg_vorbis are "8000", "16000", "22050",
* and "24000". The default value for standard voices is "22050". The default
* value for neural voices is "24000". The default value for long-form voices
* is "24000".</p>
* is "24000". The default value for generative voices is "24000".</p>
* <p>Valid values for pcm are "8000" and "16000" The default value is
* "16000". </p>
* @public
Expand Down Expand Up @@ -1180,10 +1181,10 @@ export class SsmlMarksNotSupportedForTextTypeException extends __BaseException {
*/
export interface StartSpeechSynthesisTaskInput {
/**
* <p>Specifies the engine (<code>standard</code>, <code>neural</code> or
* <code>long-form</code>) for Amazon Polly to use when processing input text for
* speech synthesis. Using a voice that is not supported for the engine
* selected will result in an error.</p>
* <p>Specifies the engine (<code>standard</code>, <code>neural</code>,
* <code>long-form</code> or <code>generative</code>) for Amazon Polly to use
* when processing input text for speech synthesis. Using a voice that
* is not supported for the engine selected will result in an error.</p>
* @public
*/
Engine?: Engine;
Expand Down Expand Up @@ -1234,7 +1235,7 @@ export interface StartSpeechSynthesisTaskInput {
* <p>The valid values for mp3 and ogg_vorbis are "8000", "16000", "22050",
* and "24000". The default value for standard voices is "22050". The default
* value for neural voices is "24000". The default value for long-form voices
* is "24000".</p>
* is "24000". The default value for generative voices is "24000".</p>
* <p>Valid values for pcm are "8000" and "16000" The default value is
* "16000". </p>
* @public
Expand Down Expand Up @@ -1318,36 +1319,18 @@ export class TextLengthExceededException extends __BaseException {
*/
export interface SynthesizeSpeechInput {
/**
* <p>Specifies the engine (<code>standard</code>, <code>neural</code> or
* <code>long-form</code>) for Amazon Polly to use when processing input text for
* speech synthesis. For information on 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>
* <p>
* <b>NTTS-only voices</b>
* </p>
* <p>When using NTTS-only voices such as Kevin (en-US), this parameter is
* required and must be set to <code>neural</code>. If the engine is not
* specified, or is set to <code>standard</code>, this will result in an
* error. </p>
* <p>
* <b>long-form-only voices</b>
* </p>
* <p>When using long-form-only voices such as Danielle (en-US), this
* parameter is required and must be set to <code>long-form</code>. If the
* engine is not specified, or is set to <code>standard</code> or
* <code>neural</code>, this will result in an error. </p>
* <p>Specifies the engine (<code>standard</code>, <code>neural</code>,
* <code>long-form</code>, or <code>generative</code>) for Amazon Polly
* to use when processing input text for speech synthesis. Provide an engine
* that is supported by the voice you select. If you don't provide an engine,
* the standard engine is selected by default. If a chosen voice isn't supported
* by the standard engine, this will result in an error. For information on
* 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>
* <p>Type: String</p>
* <p>Valid Values: <code>standard</code> | <code>neural</code> |
* <code>long-form</code>
* <code>long-form</code> | <code>generative</code>
* </p>
* <p>Required: Yes</p>
* <p>
* <b>Standard voices</b>
* </p>
* <p>For standard voices, this is not required; the engine parameter
* defaults to <code>standard</code>. If the engine is not specified, or is
* set to <code>standard</code> and an NTTS-only voice is selected, this will
* result in an error. </p>
* @public
*/
Engine?: Engine;
Expand Down Expand Up @@ -1389,7 +1372,7 @@ export interface SynthesizeSpeechInput {
* <p>The valid values for mp3 and ogg_vorbis are "8000", "16000", "22050",
* and "24000". The default value for standard voices is "22050". The default
* value for neural voices is "24000". The default value for long-form voices
* is "24000".</p>
* is "24000". The default value for generative voices is "24000".</p>
* <p>Valid values for pcm are "8000" and "16000" The default value is
* "16000". </p>
* @public
Expand Down
Loading

0 comments on commit daf6bd4

Please sign in to comment.