Class Voice
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<Voice.Builder,Voice>
Describes a voice. Amazon Polly provides voices, and you can create custom voices with CreateVoice.
Origin indicates whether Amazon Polly provides the voice or you created it. DescribeVoices
returns a subset of the fields for each voice. GetVoice returns all fields of a custom voice.
- See Also:
-
Nested Class Summary
Nested Classes -
Method Summary
Modifier and TypeMethodDescriptionfinal List<LanguageCode> Additional codes for languages available for the specified voice in addition to its default language.Additional codes for languages available for the specified voice in addition to its default language.final Stringarn()The Amazon Resource Name (ARN) of a custom voice, in the formarn:partition:polly:region:account-id:voice/voice-id.static Voice.Builderbuilder()final InstantThe date and time when you created the custom voice.The customer managed key that encrypts your custom voice.final booleanfinal booleanequalsBySdkFields(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final Gendergender()The gender of the voice.final StringThe gender of the voice.final <T> Optional<T> getValueForField(String fieldName, Class<T> clazz) final booleanFor responses, this returns true if the service returned a value for the AdditionalLanguageCodes property.final inthashCode()final booleanFor responses, this returns true if the service returned a value for the SupportedEngines property.final VoiceIdid()The voice ID that Amazon Polly assigns.final StringThe voice ID that Amazon Polly assigns.final LanguageCodeLanguage code of the voice.final StringLanguage code of the voice.final StringHuman readable name of the language in English.final Stringname()The name of the voice, for example, Salli or Kendra.final VoiceOriginorigin()Indicates who provides the voice.final StringIndicates who provides the voice.static Class<? extends Voice.Builder> final VoiceStatusstatus()The status of a custom voice.final StringThe status of a custom voice.final StringAdditional information about the status of a custom voice.Specifies which engines (standard,neural,long-formorgenerative) are supported by a given voice.Specifies which engines (standard,neural,long-formorgenerative) are supported by a given voice.Take this object and create a builder that contains all of the current property values of this object.final StringtoString()Returns a string representation of this object.final VoiceCreationDataThe data from which you created the custom voice.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
arn
The Amazon Resource Name (ARN) of a custom voice, in the form
arn:partition:polly:region:account-id:voice/voice-id.CreateVoiceandGetVoicereturn this field. Voices that Amazon Polly provides don't have an ARN.- Returns:
- The Amazon Resource Name (ARN) of a custom voice, in the form
arn:partition:polly:region:account-id:voice/voice-id.CreateVoiceandGetVoicereturn this field. Voices that Amazon Polly provides don't have an ARN.
-
gender
The gender of the voice. Custom voices don't include this field.
If the service returns an enum value that is not available in the current SDK version,
genderwill returnGender.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromgenderAsString().- Returns:
- The gender of the voice. Custom voices don't include this field.
- See Also:
-
genderAsString
The gender of the voice. Custom voices don't include this field.
If the service returns an enum value that is not available in the current SDK version,
genderwill returnGender.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromgenderAsString().- Returns:
- The gender of the voice. Custom voices don't include this field.
- See Also:
-
id
The voice ID that Amazon Polly assigns. You specify this ID when you call the
SynthesizeSpeechoperation. For a custom voice, Amazon Polly assigns an ID that consists ofvc-followed by hexadecimal characters, for example,vc-9a8fa85dd3.If the service returns an enum value that is not available in the current SDK version,
idwill returnVoiceId.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromidAsString().- Returns:
- The voice ID that Amazon Polly assigns. You specify this ID when you call the
SynthesizeSpeechoperation. For a custom voice, Amazon Polly assigns an ID that consists ofvc-followed by hexadecimal characters, for example,vc-9a8fa85dd3. - See Also:
-
idAsString
The voice ID that Amazon Polly assigns. You specify this ID when you call the
SynthesizeSpeechoperation. For a custom voice, Amazon Polly assigns an ID that consists ofvc-followed by hexadecimal characters, for example,vc-9a8fa85dd3.If the service returns an enum value that is not available in the current SDK version,
idwill returnVoiceId.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromidAsString().- Returns:
- The voice ID that Amazon Polly assigns. You specify this ID when you call the
SynthesizeSpeechoperation. For a custom voice, Amazon Polly assigns an ID that consists ofvc-followed by hexadecimal characters, for example,vc-9a8fa85dd3. - See Also:
-
languageCode
Language code of the voice.
If the service returns an enum value that is not available in the current SDK version,
languageCodewill returnLanguageCode.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromlanguageCodeAsString().- Returns:
- Language code of the voice.
- See Also:
-
languageCodeAsString
Language code of the voice.
If the service returns an enum value that is not available in the current SDK version,
languageCodewill returnLanguageCode.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromlanguageCodeAsString().- Returns:
- Language code of the voice.
- See Also:
-
languageName
Human readable name of the language in English.
- Returns:
- Human readable name of the language in English.
-
name
The name of the voice, for example, Salli or Kendra. The name is human-readable, and you might display it in your application. For a custom voice, this is the
Namethat you specified inCreateVoice.- Returns:
- The name of the voice, for example, Salli or Kendra. The name is human-readable, and you might display it
in your application. For a custom voice, this is the
Namethat you specified inCreateVoice.
-
origin
Indicates who provides the voice. The origin is one of the following:
- aws
-
A voice that Amazon Polly provides.
- customer
-
A custom voice that you created with
CreateVoice.
If the service returns an enum value that is not available in the current SDK version,
originwill returnVoiceOrigin.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromoriginAsString().- Returns:
- Indicates who provides the voice. The origin is one of the following:
- aws
-
A voice that Amazon Polly provides.
- customer
-
A custom voice that you created with
CreateVoice.
- See Also:
-
originAsString
Indicates who provides the voice. The origin is one of the following:
- aws
-
A voice that Amazon Polly provides.
- customer
-
A custom voice that you created with
CreateVoice.
If the service returns an enum value that is not available in the current SDK version,
originwill returnVoiceOrigin.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromoriginAsString().- Returns:
- Indicates who provides the voice. The origin is one of the following:
- aws
-
A voice that Amazon Polly provides.
- customer
-
A custom voice that you created with
CreateVoice.
- See Also:
-
status
The status of a custom voice. Voices that Amazon Polly provides don't include this field. The status is one of the following:
- pending
-
Amazon Polly is creating the voice.
- active
-
The voice is ready for speech synthesis.
- failed
-
Amazon Polly couldn't create the voice.
StatusReasondescribes why.
If the service returns an enum value that is not available in the current SDK version,
statuswill returnVoiceStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromstatusAsString().- Returns:
- The status of a custom voice. Voices that Amazon Polly provides don't include this field. The status is
one of the following:
- pending
-
Amazon Polly is creating the voice.
- active
-
The voice is ready for speech synthesis.
- failed
-
Amazon Polly couldn't create the voice.
StatusReasondescribes why.
- See Also:
-
statusAsString
The status of a custom voice. Voices that Amazon Polly provides don't include this field. The status is one of the following:
- pending
-
Amazon Polly is creating the voice.
- active
-
The voice is ready for speech synthesis.
- failed
-
Amazon Polly couldn't create the voice.
StatusReasondescribes why.
If the service returns an enum value that is not available in the current SDK version,
statuswill returnVoiceStatus.UNKNOWN_TO_SDK_VERSION. The raw value returned by the service is available fromstatusAsString().- Returns:
- The status of a custom voice. Voices that Amazon Polly provides don't include this field. The status is
one of the following:
- pending
-
Amazon Polly is creating the voice.
- active
-
The voice is ready for speech synthesis.
- failed
-
Amazon Polly couldn't create the voice.
StatusReasondescribes why.
- See Also:
-
statusReason
Additional information about the status of a custom voice. When the status is
failed, this field describes why Amazon Polly couldn't create the voice.- Returns:
- Additional information about the status of a custom voice. When the status is
failed, this field describes why Amazon Polly couldn't create the voice.
-
additionalLanguageCodes
Additional codes for languages available for the specified voice in addition to its default language.
For example, the default language for Aditi is Indian English (en-IN) because it was first used for that language. Since Aditi is bilingual and fluent in both Indian English and Hindi, this parameter would show the code
hi-IN.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasAdditionalLanguageCodes()method.- Returns:
- Additional codes for languages available for the specified voice in addition to its default language.
For example, the default language for Aditi is Indian English (en-IN) because it was first used for that language. Since Aditi is bilingual and fluent in both Indian English and Hindi, this parameter would show the code
hi-IN.
-
hasAdditionalLanguageCodes
public final boolean hasAdditionalLanguageCodes()For responses, this returns true if the service returned a value for the AdditionalLanguageCodes property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
additionalLanguageCodesAsStrings
Additional codes for languages available for the specified voice in addition to its default language.
For example, the default language for Aditi is Indian English (en-IN) because it was first used for that language. Since Aditi is bilingual and fluent in both Indian English and Hindi, this parameter would show the code
hi-IN.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasAdditionalLanguageCodes()method.- Returns:
- Additional codes for languages available for the specified voice in addition to its default language.
For example, the default language for Aditi is Indian English (en-IN) because it was first used for that language. Since Aditi is bilingual and fluent in both Indian English and Hindi, this parameter would show the code
hi-IN.
-
supportedEngines
Specifies which engines (
standard,neural,long-formorgenerative) are supported by a given voice.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasSupportedEngines()method.- Returns:
- Specifies which engines (
standard,neural,long-formorgenerative) are supported by a given voice.
-
hasSupportedEngines
public final boolean hasSupportedEngines()For responses, this returns true if the service returned a value for the SupportedEngines property. This DOES NOT check that the value is non-empty (for which, you should check theisEmpty()method on the property). This is useful because the SDK will never return a null collection or map, but you may need to differentiate between the service returning nothing (or null) and the service returning an empty collection or map. For requests, this returns true if a value for the property was specified in the request builder, and false if a value was not specified. -
supportedEnginesAsStrings
Specifies which engines (
standard,neural,long-formorgenerative) are supported by a given voice.Attempts to modify the collection returned by this method will result in an UnsupportedOperationException.
This method will never return null. If you would like to know whether the service returned this field (so that you can differentiate between null and empty), you can use the
hasSupportedEngines()method.- Returns:
- Specifies which engines (
standard,neural,long-formorgenerative) are supported by a given voice.
-
voiceCreationData
The data from which you created the custom voice.
CreateVoiceandGetVoicereturn this field. The response doesn't include the audio: a recording that Amazon Polly read from Amazon S3 includes itsS3Url, and a recording that you passed asByteshas no fields inData.- Returns:
- The data from which you created the custom voice.
CreateVoiceandGetVoicereturn this field. The response doesn't include the audio: a recording that Amazon Polly read from Amazon S3 includes itsS3Url, and a recording that you passed asByteshas no fields inData.
-
customerManagedEncryption
The customer managed key that encrypts your custom voice.
CreateVoiceandGetVoicereturn this field if you specified a key inCreateVoice.- Returns:
- The customer managed key that encrypts your custom voice.
CreateVoiceandGetVoicereturn this field if you specified a key inCreateVoice.
-
creationTime
The date and time when you created the custom voice. Voices that Amazon Polly provides don't include this field.
- Returns:
- The date and time when you created the custom voice. Voices that Amazon Polly provides don't include this field.
-
toBuilder
Description copied from interface:ToCopyableBuilderTake this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilderin interfaceToCopyableBuilder<Voice.Builder,Voice> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
-
equals
-
equalsBySdkFields
Description copied from interface:SdkPojoIndicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojoclass, and is generated based on a service model.If an
SdkPojoclass does not have any inherited fields,equalsBySdkFieldsandequalsare essentially the same.- Specified by:
equalsBySdkFieldsin interfaceSdkPojo- Parameters:
obj- the object to be compared with- Returns:
- true if the other object equals to this object by sdk fields, false otherwise.
-
toString
-
getValueForField
-
sdkFields
-
sdkFieldNameToField
- Specified by:
sdkFieldNameToFieldin interfaceSdkPojo- Returns:
- The mapping between the field name and its corresponding field.
-