Class Voice
- java.lang.Object
-
- software.amazon.awssdk.services.polly.model.Voice
-
- All Implemented Interfaces:
Serializable,SdkPojo,ToCopyableBuilder<Voice.Builder,Voice>
@Generated("software.amazon.awssdk:codegen") public final class Voice extends Object implements SdkPojo, Serializable, ToCopyableBuilder<Voice.Builder,Voice>
Description of the voice.
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interfaceVoice.Builder
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description List<LanguageCode>additionalLanguageCodes()Additional codes for languages available for the specified voice in addition to its default language.List<String>additionalLanguageCodesAsStrings()Additional codes for languages available for the specified voice in addition to its default language.static Voice.Builderbuilder()booleanequals(Object obj)booleanequalsBySdkFields(Object obj)Gendergender()Gender of the voice.StringgenderAsString()Gender of the voice.<T> Optional<T>getValueForField(String fieldName, Class<T> clazz)booleanhasAdditionalLanguageCodes()For responses, this returns true if the service returned a value for the AdditionalLanguageCodes property.inthashCode()booleanhasSupportedEngines()For responses, this returns true if the service returned a value for the SupportedEngines property.VoiceIdid()Amazon Polly assigned voice ID.StringidAsString()Amazon Polly assigned voice ID.LanguageCodelanguageCode()Language code of the voice.StringlanguageCodeAsString()Language code of the voice.StringlanguageName()Human readable name of the language in English.Stringname()Name of the voice (for example, Salli, Kendra, etc.).List<SdkField<?>>sdkFields()static Class<? extends Voice.Builder>serializableBuilderClass()List<Engine>supportedEngines()Specifies which engines (standard,neuralorlong-form) are supported by a given voice.List<String>supportedEnginesAsStrings()Specifies which engines (standard,neuralorlong-form) are supported by a given voice.Voice.BuildertoBuilder()StringtoString()Returns a string representation of this object.-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface software.amazon.awssdk.utils.builder.ToCopyableBuilder
copy
-
-
-
-
Method Detail
-
gender
public final Gender gender()
Gender of the voice.
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:
- Gender of the voice.
- See Also:
Gender
-
genderAsString
public final String genderAsString()
Gender of the voice.
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:
- Gender of the voice.
- See Also:
Gender
-
id
public final VoiceId id()
Amazon Polly assigned voice ID. This is the ID that you specify when calling the
SynthesizeSpeechoperation.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:
- Amazon Polly assigned voice ID. This is the ID that you specify when calling the
SynthesizeSpeechoperation. - See Also:
VoiceId
-
idAsString
public final String idAsString()
Amazon Polly assigned voice ID. This is the ID that you specify when calling the
SynthesizeSpeechoperation.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:
- Amazon Polly assigned voice ID. This is the ID that you specify when calling the
SynthesizeSpeechoperation. - See Also:
VoiceId
-
languageCode
public final LanguageCode 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:
LanguageCode
-
languageCodeAsString
public final String 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:
LanguageCode
-
languageName
public final String languageName()
Human readable name of the language in English.
- Returns:
- Human readable name of the language in English.
-
name
public final String 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
public final List<LanguageCode> 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
public final List<String> 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
public final List<Engine> supportedEngines()
Specifies which engines (
standard,neuralorlong-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,neuralorlong-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
public final List<String> supportedEnginesAsStrings()
Specifies which engines (
standard,neuralorlong-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,neuralorlong-form) are supported by a given voice.
-
toBuilder
public Voice.Builder toBuilder()
- Specified by:
toBuilderin interfaceToCopyableBuilder<Voice.Builder,Voice>
-
builder
public static Voice.Builder builder()
-
serializableBuilderClass
public static Class<? extends Voice.Builder> serializableBuilderClass()
-
equalsBySdkFields
public final boolean equalsBySdkFields(Object obj)
- Specified by:
equalsBySdkFieldsin interfaceSdkPojo
-
toString
public final String 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.
-
-