Package com.google.cloud.texttospeech.v1
Enum AudioEncoding
- All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite,com.google.protobuf.ProtocolMessageEnum,Serializable,Comparable<AudioEncoding>
@Generated
public enum AudioEncoding
extends Enum<AudioEncoding>
implements com.google.protobuf.ProtocolMessageEnum
Configuration to set up audio encoder. The encoding determines the output audio format that we'd like.Protobuf enum
google.cloud.texttospeech.v1.AudioEncoding-
Enum Constant Summary
Enum ConstantsEnum ConstantDescription8-bit samples that compand 14-bit audio samples using G.711 PCMU/A-law.Not specified.Uncompressed 16-bit signed little-endian samples (Linear PCM).M4A audio.MP3 audio at 32kbps.8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.Opus encoded audio wrapped in an ogg container.Uncompressed 16-bit signed little-endian samples (Linear PCM). -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final int8-bit samples that compand 14-bit audio samples using G.711 PCMU/A-law.static final intNot specified.static final intUncompressed 16-bit signed little-endian samples (Linear PCM).static final intM4A audio.static final intMP3 audio at 32kbps.static final int8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.static final intOpus encoded audio wrapped in an ogg container.static final intUncompressed 16-bit signed little-endian samples (Linear PCM). -
Method Summary
Modifier and TypeMethodDescriptionstatic AudioEncodingforNumber(int value) static com.google.protobuf.Descriptors.EnumDescriptorfinal com.google.protobuf.Descriptors.EnumDescriptorfinal intfinal com.google.protobuf.Descriptors.EnumValueDescriptorstatic com.google.protobuf.Internal.EnumLiteMap<AudioEncoding>static AudioEncodingvalueOf(int value) Deprecated.static AudioEncodingvalueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) Returns the enum constant of this type with the specified name.static AudioEncodingReturns the enum constant of this type with the specified name.static AudioEncoding[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
Enum Constant Details
-
AUDIO_ENCODING_UNSPECIFIED
Not specified. Only used by GenerateVoiceCloningKey. Otherwise, will return result [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
AUDIO_ENCODING_UNSPECIFIED = 0; -
LINEAR16
Uncompressed 16-bit signed little-endian samples (Linear PCM). Audio content returned as LINEAR16 also contains a WAV header.
LINEAR16 = 1; -
MP3
MP3 audio at 32kbps.
MP3 = 2; -
OGG_OPUS
Opus encoded audio wrapped in an ogg container. The result is a file which can be played natively on Android, and in browsers (at least Chrome and Firefox). The quality of the encoding is considerably higher than MP3 while using approximately the same bitrate.
OGG_OPUS = 3; -
MULAW
8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. Audio content returned as MULAW also contains a WAV header.
MULAW = 5; -
ALAW
8-bit samples that compand 14-bit audio samples using G.711 PCMU/A-law. Audio content returned as ALAW also contains a WAV header.
ALAW = 6; -
PCM
Uncompressed 16-bit signed little-endian samples (Linear PCM). Note that as opposed to LINEAR16, audio won't be wrapped in a WAV (or any other) header.
PCM = 7; -
M4A
M4A audio.
M4A = 8; -
UNRECOGNIZED
-
-
Field Details
-
AUDIO_ENCODING_UNSPECIFIED_VALUE
public static final int AUDIO_ENCODING_UNSPECIFIED_VALUENot specified. Only used by GenerateVoiceCloningKey. Otherwise, will return result [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
AUDIO_ENCODING_UNSPECIFIED = 0;- See Also:
-
LINEAR16_VALUE
public static final int LINEAR16_VALUEUncompressed 16-bit signed little-endian samples (Linear PCM). Audio content returned as LINEAR16 also contains a WAV header.
LINEAR16 = 1;- See Also:
-
MP3_VALUE
public static final int MP3_VALUEMP3 audio at 32kbps.
MP3 = 2;- See Also:
-
OGG_OPUS_VALUE
public static final int OGG_OPUS_VALUEOpus encoded audio wrapped in an ogg container. The result is a file which can be played natively on Android, and in browsers (at least Chrome and Firefox). The quality of the encoding is considerably higher than MP3 while using approximately the same bitrate.
OGG_OPUS = 3;- See Also:
-
MULAW_VALUE
public static final int MULAW_VALUE8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law. Audio content returned as MULAW also contains a WAV header.
MULAW = 5;- See Also:
-
ALAW_VALUE
public static final int ALAW_VALUE8-bit samples that compand 14-bit audio samples using G.711 PCMU/A-law. Audio content returned as ALAW also contains a WAV header.
ALAW = 6;- See Also:
-
PCM_VALUE
public static final int PCM_VALUEUncompressed 16-bit signed little-endian samples (Linear PCM). Note that as opposed to LINEAR16, audio won't be wrapped in a WAV (or any other) header.
PCM = 7;- See Also:
-
M4A_VALUE
public static final int M4A_VALUEM4A audio.
M4A = 8;- See Also:
-
-
Method Details
-
values
Returns an array containing the constants of this enum type, in the order they are declared.- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
getNumber
public final int getNumber()- Specified by:
getNumberin interfacecom.google.protobuf.Internal.EnumLite- Specified by:
getNumberin interfacecom.google.protobuf.ProtocolMessageEnum
-
valueOf
Deprecated.Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
value- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
forNumber
- Parameters:
value- The numeric wire value of the corresponding enum entry.- Returns:
- The enum associated with the given numeric wire value.
-
internalGetValueMap
-
getValueDescriptor
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()- Specified by:
getValueDescriptorin interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptorForType
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()- Specified by:
getDescriptorForTypein interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptor
public static com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() -
valueOf
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)- Parameters:
desc- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-