Class Voice
- All Implemented Interfaces:
Serializable
,SdkPojo
,ToCopyableBuilder<Voice.Builder,
Voice>
Description of the voice.
- See Also:
-
Nested Class Summary
-
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.static Voice.Builder
builder()
final boolean
final boolean
equalsBySdkFields
(Object obj) Indicates whether some other object is "equal to" this one by SDK fields.final Gender
gender()
Gender of the voice.final String
Gender of the voice.final <T> Optional
<T> getValueForField
(String fieldName, Class<T> clazz) final boolean
For responses, this returns true if the service returned a value for the AdditionalLanguageCodes property.final int
hashCode()
final boolean
For responses, this returns true if the service returned a value for the SupportedEngines property.final VoiceId
id()
Amazon Polly assigned voice ID.final String
Amazon Polly assigned voice ID.final LanguageCode
Language code of the voice.final String
Language code of the voice.final String
Human readable name of the language in English.final String
name()
Name of the voice (for example, Salli, Kendra, etc.).static Class
<? extends Voice.Builder> Specifies which engines (standard
,neural
orlong-form
) are supported by a given voice.Specifies which engines (standard
,neural
orlong-form
) 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 String
toString()
Returns a string representation of this object.Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
Method Details
-
gender
Gender of the voice.
If the service returns an enum value that is not available in the current SDK version,
gender
will returnGender.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromgenderAsString()
.- Returns:
- Gender of the voice.
- See Also:
-
genderAsString
Gender of the voice.
If the service returns an enum value that is not available in the current SDK version,
gender
will returnGender.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromgenderAsString()
.- Returns:
- Gender of the voice.
- See Also:
-
id
Amazon Polly assigned voice ID. This is the ID that you specify when calling the
SynthesizeSpeech
operation.If the service returns an enum value that is not available in the current SDK version,
id
will returnVoiceId.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromidAsString()
.- Returns:
- Amazon Polly assigned voice ID. This is the ID that you specify when calling the
SynthesizeSpeech
operation. - See Also:
-
idAsString
Amazon Polly assigned voice ID. This is the ID that you specify when calling the
SynthesizeSpeech
operation.If the service returns an enum value that is not available in the current SDK version,
id
will returnVoiceId.UNKNOWN_TO_SDK_VERSION
. The raw value returned by the service is available fromidAsString()
.- Returns:
- Amazon Polly assigned voice ID. This is the ID that you specify when calling the
SynthesizeSpeech
operation. - See Also:
-
languageCode
Language code of the voice.
If the service returns an enum value that is not available in the current SDK version,
languageCode
will 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,
languageCode
will 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
Name of the voice (for example, Salli, Kendra, etc.). This provides a human readable voice name that you might display in your application.
- Returns:
- Name of the voice (for example, Salli, Kendra, etc.). This provides a human readable voice name that you might display in your application.
-
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
orlong-form
) 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
orlong-form
) 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
orlong-form
) 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
orlong-form
) are supported by a given voice.
-
toBuilder
Description copied from interface:ToCopyableBuilder
Take this object and create a builder that contains all of the current property values of this object.- Specified by:
toBuilder
in interfaceToCopyableBuilder<Voice.Builder,
Voice> - Returns:
- a builder for type T
-
builder
-
serializableBuilderClass
-
hashCode
public final int hashCode() -
equals
-
equalsBySdkFields
Description copied from interface:SdkPojo
Indicates whether some other object is "equal to" this one by SDK fields. An SDK field is a modeled, non-inherited field in anSdkPojo
class, and is generated based on a service model.If an
SdkPojo
class does not have any inherited fields,equalsBySdkFields
andequals
are essentially the same.- Specified by:
equalsBySdkFields
in 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
Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be redacted from this string using a placeholder value. -
getValueForField
-
sdkFields
-