Skip to content

Commit

Permalink
feat(client-polly): Add new engine - long-form - dedicated for longer…
Browse files Browse the repository at this point in the history
… content, such as news articles, training materials, or marketing videos.
  • Loading branch information
awstools committed Nov 16, 2023
1 parent 473c3e9 commit 367e933
Show file tree
Hide file tree
Showing 7 changed files with 54 additions and 35 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 @@ -60,7 +60,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",
* Engine: "standard" || "neural" || "long-form",
* 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 @@ -79,7 +79,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",
* // "standard" || "neural" || "long-form",
* // ],
* // },
* // ],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export interface GetSpeechSynthesisTaskCommandOutput extends GetSpeechSynthesisT
* const response = await client.send(command);
* // { // GetSpeechSynthesisTaskOutput
* // SynthesisTask: { // SynthesisTask
* // Engine: "standard" || "neural",
* // Engine: "standard" || "neural" || "long-form",
* // 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 @@ -57,7 +57,7 @@ export interface ListSpeechSynthesisTasksCommandOutput extends ListSpeechSynthes
* // NextToken: "STRING_VALUE",
* // SynthesisTasks: [ // SynthesisTasks
* // { // SynthesisTask
* // Engine: "standard" || "neural",
* // Engine: "standard" || "neural" || "long-form",
* // 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 @@ -54,7 +54,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",
* Engine: "standard" || "neural" || "long-form",
* 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 @@ -75,7 +75,7 @@ export interface StartSpeechSynthesisTaskCommandOutput extends StartSpeechSynthe
* const response = await client.send(command);
* // { // StartSpeechSynthesisTaskOutput
* // SynthesisTask: { // SynthesisTask
* // Engine: "standard" || "neural",
* // Engine: "standard" || "neural" || "long-form",
* // 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 @@ -57,7 +57,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",
* Engine: "standard" || "neural" || "long-form",
* 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
53 changes: 33 additions & 20 deletions clients/client-polly/src/models/models_0.ts
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ export class ServiceFailureException extends __BaseException {
* @enum
*/
export const Engine = {
LONG_FORM: "long-form",
NEURAL: "neural",
STANDARD: "standard",
} as const;
Expand Down Expand Up @@ -136,8 +137,9 @@ export type LanguageCode = (typeof LanguageCode)[keyof typeof LanguageCode];
export interface DescribeVoicesInput {
/**
* @public
* <p>Specifies the engine (<code>standard</code> or <code>neural</code>)
* used by Amazon Polly when processing input text for speech synthesis. </p>
* <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>
*/
Engine?: Engine;

Expand Down Expand Up @@ -342,8 +344,8 @@ export interface Voice {

/**
* @public
* <p>Specifies which engines (<code>standard</code> or <code>neural</code>)
* that are supported by a given voice.</p>
* <p>Specifies which engines (<code>standard</code>, <code>neural</code> or
* <code>long-form</code>) are supported by a given voice.</p>
*/
SupportedEngines?: Engine[];
}
Expand Down Expand Up @@ -589,10 +591,10 @@ export type TextType = (typeof TextType)[keyof typeof TextType];
export interface SynthesisTask {
/**
* @public
* <p>Specifies the engine (<code>standard</code> or <code>neural</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> 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>
*/
Engine?: Engine;

Expand Down Expand Up @@ -661,7 +663,8 @@ export interface SynthesisTask {
* <p>The audio frequency specified in Hz.</p>
* <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".</p>
* value for neural voices is "24000". The default value for long-form voices
* is "24000".</p>
* <p>Valid values for pcm are "8000" and "16000" The default value is
* "16000". </p>
*/
Expand Down Expand Up @@ -1176,10 +1179,10 @@ export class SsmlMarksNotSupportedForTextTypeException extends __BaseException {
export interface StartSpeechSynthesisTaskInput {
/**
* @public
* <p>Specifies the engine (<code>standard</code> or <code>neural</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> 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>
*/
Engine?: Engine;

Expand Down Expand Up @@ -1229,7 +1232,8 @@ export interface StartSpeechSynthesisTaskInput {
* <p>The audio frequency specified in Hz.</p>
* <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".</p>
* value for neural voices is "24000". The default value for long-form voices
* is "24000".</p>
* <p>Valid values for pcm are "8000" and "16000" The default value is
* "16000". </p>
*/
Expand Down Expand Up @@ -1313,19 +1317,27 @@ export class TextLengthExceededException extends __BaseException {
export interface SynthesizeSpeechInput {
/**
* @public
* <p>Specifies the engine (<code>standard</code> or <code>neural</code>)
* for Amazon Polly to use when processing input text for speech synthesis. For
* information on Amazon Polly voices and which voices are available in
* standard-only, NTTS-only, and both standard and NTTS formats, see <a href="https://docs.aws.amazon.com/polly/latest/dg/voicelist.html">Available Voices</a>.</p>
* <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>Type: String</p>
* <p>Valid Values: <code>standard</code> | <code>neural</code>
* <p>Valid Values: <code>standard</code> | <code>neural</code> |
* <code>long-form</code>
* </p>
* <p>Required: Yes</p>
* <p>
Expand Down Expand Up @@ -1375,7 +1387,8 @@ export interface SynthesizeSpeechInput {
* <p>The audio frequency specified in Hz.</p>
* <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".</p>
* value for neural voices is "24000". The default value for long-form voices
* is "24000".</p>
* <p>Valid values for pcm are "8000" and "16000" The default value is
* "16000". </p>
*/
Expand Down
Loading

0 comments on commit 367e933

Please sign in to comment.