From 630772270461b7cb5c0db864cecd52f2881b2e6a Mon Sep 17 00:00:00 2001 From: AWS Mobile SDK Bot <46607340+awsmobilesdk@users.noreply.github.com> Date: Fri, 17 Nov 2023 10:46:19 -0800 Subject: [PATCH] feat(AWSPolly): update models to latest (#5070) --- AWSPolly/AWSPollyModel.h | 19 +++++++----- AWSPolly/AWSPollyModel.m | 60 ++++++++++++++++++++++++++++++++++++ AWSPolly/AWSPollyResources.m | 23 ++++++++------ 3 files changed, 84 insertions(+), 18 deletions(-) diff --git a/AWSPolly/AWSPollyModel.h b/AWSPolly/AWSPollyModel.h index 5a8e6975852..f8ef7ef5b07 100644 --- a/AWSPolly/AWSPollyModel.h +++ b/AWSPolly/AWSPollyModel.h @@ -50,6 +50,7 @@ typedef NS_ENUM(NSInteger, AWSPollyEngine) { AWSPollyEngineUnknown, AWSPollyEngineStandard, AWSPollyEngineNeural, + AWSPollyEngineLongForm, }; typedef NS_ENUM(NSInteger, AWSPollyGender) { @@ -226,6 +227,8 @@ typedef NS_ENUM(NSInteger, AWSPollyVoiceId) { AWSPollyVoiceIdLisa, AWSPollyVoiceIdIsabelle, AWSPollyVoiceIdZayd, + AWSPollyVoiceIdDanielle, + AWSPollyVoiceIdGregory, }; @class AWSPollyDeleteLexiconInput; @@ -280,7 +283,7 @@ typedef NS_ENUM(NSInteger, AWSPollyVoiceId) { /** -

Specifies the engine (standard or neural) used by Amazon Polly when processing input text for speech synthesis.

+

Specifies the engine (standard, neural or long-form) used by Amazon Polly when processing input text for speech synthesis.

*/ @property (nonatomic, assign) AWSPollyEngine engine; @@ -555,7 +558,7 @@ typedef NS_ENUM(NSInteger, AWSPollyVoiceId) { /** -

Specifies the engine (standard or neural) 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.

+

Specifies the engine (standard, neural or long-form) 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.

*/ @property (nonatomic, assign) AWSPollyEngine engine; @@ -585,7 +588,7 @@ typedef NS_ENUM(NSInteger, AWSPollyVoiceId) { @property (nonatomic, strong) NSString * _Nullable outputS3KeyPrefix; /** -

The audio frequency specified in Hz.

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".

Valid values for pcm are "8000" and "16000" The default value is "16000".

+

The audio frequency specified in Hz.

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".

Valid values for pcm are "8000" and "16000" The default value is "16000".

*/ @property (nonatomic, strong) NSString * _Nullable sampleRate; @@ -641,7 +644,7 @@ typedef NS_ENUM(NSInteger, AWSPollyVoiceId) { @property (nonatomic, strong) NSDate * _Nullable creationTime; /** -

Specifies the engine (standard or neural) 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.

+

Specifies the engine (standard, neural or long-form) 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.

*/ @property (nonatomic, assign) AWSPollyEngine engine; @@ -671,7 +674,7 @@ typedef NS_ENUM(NSInteger, AWSPollyVoiceId) { @property (nonatomic, strong) NSNumber * _Nullable requestCharacters; /** -

The audio frequency specified in Hz.

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".

Valid values for pcm are "8000" and "16000" The default value is "16000".

+

The audio frequency specified in Hz.

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".

Valid values for pcm are "8000" and "16000" The default value is "16000".

*/ @property (nonatomic, strong) NSString * _Nullable sampleRate; @@ -719,7 +722,7 @@ typedef NS_ENUM(NSInteger, AWSPollyVoiceId) { /** -

Specifies the engine (standard or neural) 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 Available Voices.

NTTS-only voices

When using NTTS-only voices such as Kevin (en-US), this parameter is required and must be set to neural. If the engine is not specified, or is set to standard, this will result in an error.

Type: String

Valid Values: standard | neural

Required: Yes

Standard voices

For standard voices, this is not required; the engine parameter defaults to standard. If the engine is not specified, or is set to standard and an NTTS-only voice is selected, this will result in an error.

+

Specifies the engine (standard, neural or long-form) 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 Available Voices.

NTTS-only voices

When using NTTS-only voices such as Kevin (en-US), this parameter is required and must be set to neural. If the engine is not specified, or is set to standard, this will result in an error.

long-form-only voices

When using long-form-only voices such as Danielle (en-US), this parameter is required and must be set to long-form. If the engine is not specified, or is set to standard or neural, this will result in an error.

Type: String

Valid Values: standard | neural | long-form

Required: Yes

Standard voices

For standard voices, this is not required; the engine parameter defaults to standard. If the engine is not specified, or is set to standard and an NTTS-only voice is selected, this will result in an error.

*/ @property (nonatomic, assign) AWSPollyEngine engine; @@ -739,7 +742,7 @@ typedef NS_ENUM(NSInteger, AWSPollyVoiceId) { @property (nonatomic, assign) AWSPollyOutputFormat outputFormat; /** -

The audio frequency specified in Hz.

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".

Valid values for pcm are "8000" and "16000" The default value is "16000".

+

The audio frequency specified in Hz.

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".

Valid values for pcm are "8000" and "16000" The default value is "16000".

*/ @property (nonatomic, strong) NSString * _Nullable sampleRate; @@ -825,7 +828,7 @@ typedef NS_ENUM(NSInteger, AWSPollyVoiceId) { @property (nonatomic, strong) NSString * _Nullable name; /** -

Specifies which engines (standard or neural) that are supported by a given voice.

+

Specifies which engines (standard, neural or long-form) are supported by a given voice.

*/ @property (nonatomic, strong) NSArray * _Nullable supportedEngines; diff --git a/AWSPolly/AWSPollyModel.m b/AWSPolly/AWSPollyModel.m index 7916dab5281..a10cdcf95e0 100644 --- a/AWSPolly/AWSPollyModel.m +++ b/AWSPolly/AWSPollyModel.m @@ -63,6 +63,9 @@ + (NSValueTransformer *)engineJSONTransformer { if ([value caseInsensitiveCompare:@"neural"] == NSOrderedSame) { return @(AWSPollyEngineNeural); } + if ([value caseInsensitiveCompare:@"long-form"] == NSOrderedSame) { + return @(AWSPollyEngineLongForm); + } return @(AWSPollyEngineUnknown); } reverseBlock:^NSString *(NSNumber *value) { switch ([value integerValue]) { @@ -70,6 +73,8 @@ + (NSValueTransformer *)engineJSONTransformer { return @"standard"; case AWSPollyEngineNeural: return @"neural"; + case AWSPollyEngineLongForm: + return @"long-form"; default: return nil; } @@ -792,6 +797,9 @@ + (NSValueTransformer *)engineJSONTransformer { if ([value caseInsensitiveCompare:@"neural"] == NSOrderedSame) { return @(AWSPollyEngineNeural); } + if ([value caseInsensitiveCompare:@"long-form"] == NSOrderedSame) { + return @(AWSPollyEngineLongForm); + } return @(AWSPollyEngineUnknown); } reverseBlock:^NSString *(NSNumber *value) { switch ([value integerValue]) { @@ -799,6 +807,8 @@ + (NSValueTransformer *)engineJSONTransformer { return @"standard"; case AWSPollyEngineNeural: return @"neural"; + case AWSPollyEngineLongForm: + return @"long-form"; default: return nil; } @@ -1344,6 +1354,12 @@ + (NSValueTransformer *)voiceIdJSONTransformer { if ([value caseInsensitiveCompare:@"Zayd"] == NSOrderedSame) { return @(AWSPollyVoiceIdZayd); } + if ([value caseInsensitiveCompare:@"Danielle"] == NSOrderedSame) { + return @(AWSPollyVoiceIdDanielle); + } + if ([value caseInsensitiveCompare:@"Gregory"] == NSOrderedSame) { + return @(AWSPollyVoiceIdGregory); + } return @(AWSPollyVoiceIdUnknown); } reverseBlock:^NSString *(NSNumber *value) { switch ([value integerValue]) { @@ -1533,6 +1549,10 @@ + (NSValueTransformer *)voiceIdJSONTransformer { return @"Isabelle"; case AWSPollyVoiceIdZayd: return @"Zayd"; + case AWSPollyVoiceIdDanielle: + return @"Danielle"; + case AWSPollyVoiceIdGregory: + return @"Gregory"; default: return nil; } @@ -1601,6 +1621,9 @@ + (NSValueTransformer *)engineJSONTransformer { if ([value caseInsensitiveCompare:@"neural"] == NSOrderedSame) { return @(AWSPollyEngineNeural); } + if ([value caseInsensitiveCompare:@"long-form"] == NSOrderedSame) { + return @(AWSPollyEngineLongForm); + } return @(AWSPollyEngineUnknown); } reverseBlock:^NSString *(NSNumber *value) { switch ([value integerValue]) { @@ -1608,6 +1631,8 @@ + (NSValueTransformer *)engineJSONTransformer { return @"standard"; case AWSPollyEngineNeural: return @"neural"; + case AWSPollyEngineLongForm: + return @"long-form"; default: return nil; } @@ -2184,6 +2209,12 @@ + (NSValueTransformer *)voiceIdJSONTransformer { if ([value caseInsensitiveCompare:@"Zayd"] == NSOrderedSame) { return @(AWSPollyVoiceIdZayd); } + if ([value caseInsensitiveCompare:@"Danielle"] == NSOrderedSame) { + return @(AWSPollyVoiceIdDanielle); + } + if ([value caseInsensitiveCompare:@"Gregory"] == NSOrderedSame) { + return @(AWSPollyVoiceIdGregory); + } return @(AWSPollyVoiceIdUnknown); } reverseBlock:^NSString *(NSNumber *value) { switch ([value integerValue]) { @@ -2373,6 +2404,10 @@ + (NSValueTransformer *)voiceIdJSONTransformer { return @"Isabelle"; case AWSPollyVoiceIdZayd: return @"Zayd"; + case AWSPollyVoiceIdDanielle: + return @"Danielle"; + case AWSPollyVoiceIdGregory: + return @"Gregory"; default: return nil; } @@ -2409,6 +2444,9 @@ + (NSValueTransformer *)engineJSONTransformer { if ([value caseInsensitiveCompare:@"neural"] == NSOrderedSame) { return @(AWSPollyEngineNeural); } + if ([value caseInsensitiveCompare:@"long-form"] == NSOrderedSame) { + return @(AWSPollyEngineLongForm); + } return @(AWSPollyEngineUnknown); } reverseBlock:^NSString *(NSNumber *value) { switch ([value integerValue]) { @@ -2416,6 +2454,8 @@ + (NSValueTransformer *)engineJSONTransformer { return @"standard"; case AWSPollyEngineNeural: return @"neural"; + case AWSPollyEngineLongForm: + return @"long-form"; default: return nil; } @@ -2961,6 +3001,12 @@ + (NSValueTransformer *)voiceIdJSONTransformer { if ([value caseInsensitiveCompare:@"Zayd"] == NSOrderedSame) { return @(AWSPollyVoiceIdZayd); } + if ([value caseInsensitiveCompare:@"Danielle"] == NSOrderedSame) { + return @(AWSPollyVoiceIdDanielle); + } + if ([value caseInsensitiveCompare:@"Gregory"] == NSOrderedSame) { + return @(AWSPollyVoiceIdGregory); + } return @(AWSPollyVoiceIdUnknown); } reverseBlock:^NSString *(NSNumber *value) { switch ([value integerValue]) { @@ -3150,6 +3196,10 @@ + (NSValueTransformer *)voiceIdJSONTransformer { return @"Isabelle"; case AWSPollyVoiceIdZayd: return @"Zayd"; + case AWSPollyVoiceIdDanielle: + return @"Danielle"; + case AWSPollyVoiceIdGregory: + return @"Gregory"; default: return nil; } @@ -3494,6 +3544,12 @@ + (NSValueTransformer *)identifierJSONTransformer { if ([value caseInsensitiveCompare:@"Zayd"] == NSOrderedSame) { return @(AWSPollyVoiceIdZayd); } + if ([value caseInsensitiveCompare:@"Danielle"] == NSOrderedSame) { + return @(AWSPollyVoiceIdDanielle); + } + if ([value caseInsensitiveCompare:@"Gregory"] == NSOrderedSame) { + return @(AWSPollyVoiceIdGregory); + } return @(AWSPollyVoiceIdUnknown); } reverseBlock:^NSString *(NSNumber *value) { switch ([value integerValue]) { @@ -3683,6 +3739,10 @@ + (NSValueTransformer *)identifierJSONTransformer { return @"Isabelle"; case AWSPollyVoiceIdZayd: return @"Zayd"; + case AWSPollyVoiceIdDanielle: + return @"Danielle"; + case AWSPollyVoiceIdGregory: + return @"Gregory"; default: return nil; } diff --git a/AWSPolly/AWSPollyResources.m b/AWSPolly/AWSPollyResources.m index 4bae4f49df3..f69e216430c 100644 --- a/AWSPolly/AWSPollyResources.m +++ b/AWSPolly/AWSPollyResources.m @@ -257,7 +257,7 @@ - (NSString *)definitionString { \"members\":{\ \"Engine\":{\ \"shape\":\"Engine\",\ - \"documentation\":\"

Specifies the engine (standard or neural) used by Amazon Polly when processing input text for speech synthesis.

\",\ + \"documentation\":\"

Specifies the engine (standard, neural or long-form) used by Amazon Polly when processing input text for speech synthesis.

\",\ \"location\":\"querystring\",\ \"locationName\":\"Engine\"\ },\ @@ -298,7 +298,8 @@ - (NSString *)definitionString { \"type\":\"string\",\ \"enum\":[\ \"standard\",\ - \"neural\"\ + \"neural\",\ + \"long-form\"\ ]\ },\ \"EngineList\":{\ @@ -785,7 +786,7 @@ - (NSString *)definitionString { \"members\":{\ \"Engine\":{\ \"shape\":\"Engine\",\ - \"documentation\":\"

Specifies the engine (standard or neural) 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.

\"\ + \"documentation\":\"

Specifies the engine (standard, neural or long-form) 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.

\"\ },\ \"LanguageCode\":{\ \"shape\":\"LanguageCode\",\ @@ -809,7 +810,7 @@ - (NSString *)definitionString { },\ \"SampleRate\":{\ \"shape\":\"SampleRate\",\ - \"documentation\":\"

The audio frequency specified in Hz.

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\\\".

Valid values for pcm are \\\"8000\\\" and \\\"16000\\\" The default value is \\\"16000\\\".

\"\ + \"documentation\":\"

The audio frequency specified in Hz.

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\\\".

Valid values for pcm are \\\"8000\\\" and \\\"16000\\\" The default value is \\\"16000\\\".

\"\ },\ \"SnsTopicArn\":{\ \"shape\":\"SnsTopicArn\",\ @@ -847,7 +848,7 @@ - (NSString *)definitionString { \"members\":{\ \"Engine\":{\ \"shape\":\"Engine\",\ - \"documentation\":\"

Specifies the engine (standard or neural) 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.

\"\ + \"documentation\":\"

Specifies the engine (standard, neural or long-form) 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.

\"\ },\ \"TaskId\":{\ \"shape\":\"TaskId\",\ @@ -887,7 +888,7 @@ - (NSString *)definitionString { },\ \"SampleRate\":{\ \"shape\":\"SampleRate\",\ - \"documentation\":\"

The audio frequency specified in Hz.

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\\\".

Valid values for pcm are \\\"8000\\\" and \\\"16000\\\" The default value is \\\"16000\\\".

\"\ + \"documentation\":\"

The audio frequency specified in Hz.

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\\\".

Valid values for pcm are \\\"8000\\\" and \\\"16000\\\" The default value is \\\"16000\\\".

\"\ },\ \"SpeechMarkTypes\":{\ \"shape\":\"SpeechMarkTypeList\",\ @@ -931,7 +932,7 @@ - (NSString *)definitionString { \"members\":{\ \"Engine\":{\ \"shape\":\"Engine\",\ - \"documentation\":\"

Specifies the engine (standard or neural) 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 Available Voices.

NTTS-only voices

When using NTTS-only voices such as Kevin (en-US), this parameter is required and must be set to neural. If the engine is not specified, or is set to standard, this will result in an error.

Type: String

Valid Values: standard | neural

Required: Yes

Standard voices

For standard voices, this is not required; the engine parameter defaults to standard. If the engine is not specified, or is set to standard and an NTTS-only voice is selected, this will result in an error.

\"\ + \"documentation\":\"

Specifies the engine (standard, neural or long-form) 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 Available Voices.

NTTS-only voices

When using NTTS-only voices such as Kevin (en-US), this parameter is required and must be set to neural. If the engine is not specified, or is set to standard, this will result in an error.

long-form-only voices

When using long-form-only voices such as Danielle (en-US), this parameter is required and must be set to long-form. If the engine is not specified, or is set to standard or neural, this will result in an error.

Type: String

Valid Values: standard | neural | long-form

Required: Yes

Standard voices

For standard voices, this is not required; the engine parameter defaults to standard. If the engine is not specified, or is set to standard and an NTTS-only voice is selected, this will result in an error.

\"\ },\ \"LanguageCode\":{\ \"shape\":\"LanguageCode\",\ @@ -947,7 +948,7 @@ - (NSString *)definitionString { },\ \"SampleRate\":{\ \"shape\":\"SampleRate\",\ - \"documentation\":\"

The audio frequency specified in Hz.

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\\\".

Valid values for pcm are \\\"8000\\\" and \\\"16000\\\" The default value is \\\"16000\\\".

\"\ + \"documentation\":\"

The audio frequency specified in Hz.

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\\\".

Valid values for pcm are \\\"8000\\\" and \\\"16000\\\" The default value is \\\"16000\\\".

\"\ },\ \"SpeechMarkTypes\":{\ \"shape\":\"SpeechMarkTypeList\",\ @@ -1067,7 +1068,7 @@ - (NSString *)definitionString { },\ \"SupportedEngines\":{\ \"shape\":\"EngineList\",\ - \"documentation\":\"

Specifies which engines (standard or neural) that are supported by a given voice.

\"\ + \"documentation\":\"

Specifies which engines (standard, neural or long-form) are supported by a given voice.

\"\ }\ },\ \"documentation\":\"

Description of the voice.

\"\ @@ -1167,7 +1168,9 @@ - (NSString *)definitionString { \"Sofie\",\ \"Lisa\",\ \"Isabelle\",\ - \"Zayd\"\ + \"Zayd\",\ + \"Danielle\",\ + \"Gregory\"\ ]\ },\ \"VoiceList\":{\