Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AWSPolly Update models to latest #5327

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion AWSPolly.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -14,5 +14,5 @@ Pod::Spec.new do |s|
s.requires_arc = true
s.dependency 'AWSCore', '2.36.1'
s.source_files = 'AWSPolly/*.{h,m}'
s.resource_bundle = { 'AWSPolly' => ['AWSPolly/PrivacyInfo.xcprivacy']}
s.resource_bundle = { 'AWSPolly' => ['AWSPolly/PrivacyInfo.xcprivacy'] }
end
17 changes: 9 additions & 8 deletions AWSPolly/AWSPollyModel.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ typedef NS_ENUM(NSInteger, AWSPollyEngine) {
AWSPollyEngineStandard,
AWSPollyEngineNeural,
AWSPollyEngineLongForm,
AWSPollyEngineGenerative,
};

typedef NS_ENUM(NSInteger, AWSPollyGender) {
Expand Down Expand Up @@ -284,7 +285,7 @@ typedef NS_ENUM(NSInteger, AWSPollyVoiceId) {


/**
<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>
*/
@property (nonatomic, assign) AWSPollyEngine engine;

Expand Down Expand Up @@ -559,7 +560,7 @@ typedef NS_ENUM(NSInteger, AWSPollyVoiceId) {


/**
<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>
*/
@property (nonatomic, assign) AWSPollyEngine engine;

Expand Down Expand Up @@ -589,7 +590,7 @@ typedef NS_ENUM(NSInteger, AWSPollyVoiceId) {
@property (nonatomic, strong) NSString * _Nullable outputS3KeyPrefix;

/**
<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". 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>
<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". The default value for long-form voices 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>
*/
@property (nonatomic, strong) NSString * _Nullable sampleRate;

Expand Down Expand Up @@ -645,7 +646,7 @@ typedef NS_ENUM(NSInteger, AWSPollyVoiceId) {
@property (nonatomic, strong) NSDate * _Nullable creationTime;

/**
<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>
*/
@property (nonatomic, assign) AWSPollyEngine engine;

Expand Down Expand Up @@ -675,7 +676,7 @@ typedef NS_ENUM(NSInteger, AWSPollyVoiceId) {
@property (nonatomic, strong) NSNumber * _Nullable requestCharacters;

/**
<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". 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>
<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". The default value for long-form voices 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>
*/
@property (nonatomic, strong) NSString * _Nullable sampleRate;

Expand Down Expand Up @@ -723,7 +724,7 @@ typedef NS_ENUM(NSInteger, AWSPollyVoiceId) {


/**
<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> | <code>long-form</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>
<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>generative</code></p><p>Required: Yes</p>
*/
@property (nonatomic, assign) AWSPollyEngine engine;

Expand All @@ -743,7 +744,7 @@ typedef NS_ENUM(NSInteger, AWSPollyVoiceId) {
@property (nonatomic, assign) AWSPollyOutputFormat outputFormat;

/**
<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". 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>
<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". The default value for long-form voices 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>
*/
@property (nonatomic, strong) NSString * _Nullable sampleRate;

Expand Down Expand Up @@ -829,7 +830,7 @@ typedef NS_ENUM(NSInteger, AWSPollyVoiceId) {
@property (nonatomic, strong) NSString * _Nullable name;

/**
<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>
*/
@property (nonatomic, strong) NSArray<NSString *> * _Nullable supportedEngines;

Expand Down
20 changes: 20 additions & 0 deletions AWSPolly/AWSPollyModel.m
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,9 @@ + (NSValueTransformer *)engineJSONTransformer {
if ([value caseInsensitiveCompare:@"long-form"] == NSOrderedSame) {
return @(AWSPollyEngineLongForm);
}
if ([value caseInsensitiveCompare:@"generative"] == NSOrderedSame) {
return @(AWSPollyEngineGenerative);
}
return @(AWSPollyEngineUnknown);
} reverseBlock:^NSString *(NSNumber *value) {
switch ([value integerValue]) {
Expand All @@ -75,6 +78,8 @@ + (NSValueTransformer *)engineJSONTransformer {
return @"neural";
case AWSPollyEngineLongForm:
return @"long-form";
case AWSPollyEngineGenerative:
return @"generative";
default:
return nil;
}
Expand Down Expand Up @@ -800,6 +805,9 @@ + (NSValueTransformer *)engineJSONTransformer {
if ([value caseInsensitiveCompare:@"long-form"] == NSOrderedSame) {
return @(AWSPollyEngineLongForm);
}
if ([value caseInsensitiveCompare:@"generative"] == NSOrderedSame) {
return @(AWSPollyEngineGenerative);
}
return @(AWSPollyEngineUnknown);
} reverseBlock:^NSString *(NSNumber *value) {
switch ([value integerValue]) {
Expand All @@ -809,6 +817,8 @@ + (NSValueTransformer *)engineJSONTransformer {
return @"neural";
case AWSPollyEngineLongForm:
return @"long-form";
case AWSPollyEngineGenerative:
return @"generative";
default:
return nil;
}
Expand Down Expand Up @@ -1629,6 +1639,9 @@ + (NSValueTransformer *)engineJSONTransformer {
if ([value caseInsensitiveCompare:@"long-form"] == NSOrderedSame) {
return @(AWSPollyEngineLongForm);
}
if ([value caseInsensitiveCompare:@"generative"] == NSOrderedSame) {
return @(AWSPollyEngineGenerative);
}
return @(AWSPollyEngineUnknown);
} reverseBlock:^NSString *(NSNumber *value) {
switch ([value integerValue]) {
Expand All @@ -1638,6 +1651,8 @@ + (NSValueTransformer *)engineJSONTransformer {
return @"neural";
case AWSPollyEngineLongForm:
return @"long-form";
case AWSPollyEngineGenerative:
return @"generative";
default:
return nil;
}
Expand Down Expand Up @@ -2457,6 +2472,9 @@ + (NSValueTransformer *)engineJSONTransformer {
if ([value caseInsensitiveCompare:@"long-form"] == NSOrderedSame) {
return @(AWSPollyEngineLongForm);
}
if ([value caseInsensitiveCompare:@"generative"] == NSOrderedSame) {
return @(AWSPollyEngineGenerative);
}
return @(AWSPollyEngineUnknown);
} reverseBlock:^NSString *(NSNumber *value) {
switch ([value integerValue]) {
Expand All @@ -2466,6 +2484,8 @@ + (NSValueTransformer *)engineJSONTransformer {
return @"neural";
case AWSPollyEngineLongForm:
return @"long-form";
case AWSPollyEngineGenerative:
return @"generative";
default:
return nil;
}
Expand Down
Loading
Loading