Package com.google.cloud.texttospeech.v1
Enum AudioEncoding
- java.lang.Object
-
- java.lang.Enum<AudioEncoding>
-
- com.google.cloud.texttospeech.v1.AudioEncoding
-
- All Implemented Interfaces:
com.google.protobuf.Internal.EnumLite
,com.google.protobuf.ProtocolMessageEnum
,Serializable
,Comparable<AudioEncoding>
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 enumgoogle.cloud.texttospeech.v1.AudioEncoding
-
-
Enum Constant Summary
Enum Constants Enum Constant Description ALAW
8-bit samples that compand 14-bit audio samples using G.711 PCMU/A-law.AUDIO_ENCODING_UNSPECIFIED
Not specified.LINEAR16
Uncompressed 16-bit signed little-endian samples (Linear PCM).MP3
MP3 audio at 32kbps.MULAW
8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.OGG_OPUS
Opus encoded audio wrapped in an ogg container.UNRECOGNIZED
-
Field Summary
Fields Modifier and Type Field Description static int
ALAW_VALUE
8-bit samples that compand 14-bit audio samples using G.711 PCMU/A-law.static int
AUDIO_ENCODING_UNSPECIFIED_VALUE
Not specified.static int
LINEAR16_VALUE
Uncompressed 16-bit signed little-endian samples (Linear PCM).static int
MP3_VALUE
MP3 audio at 32kbps.static int
MULAW_VALUE
8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.static int
OGG_OPUS_VALUE
Opus encoded audio wrapped in an ogg container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description static AudioEncoding
forNumber(int value)
static com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor()
com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType()
int
getNumber()
com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor()
static com.google.protobuf.Internal.EnumLiteMap<AudioEncoding>
internalGetValueMap()
static AudioEncoding
valueOf(int value)
Deprecated.static AudioEncoding
valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
Returns the enum constant of this type with the specified name.static AudioEncoding
valueOf(String name)
Returns 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 Detail
-
AUDIO_ENCODING_UNSPECIFIED
public static final AudioEncoding AUDIO_ENCODING_UNSPECIFIED
Not specified. Will return result [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
AUDIO_ENCODING_UNSPECIFIED = 0;
-
LINEAR16
public static final AudioEncoding LINEAR16
Uncompressed 16-bit signed little-endian samples (Linear PCM). Audio content returned as LINEAR16 also contains a WAV header.
LINEAR16 = 1;
-
MP3
public static final AudioEncoding MP3
MP3 audio at 32kbps.
MP3 = 2;
-
OGG_OPUS
public static final AudioEncoding OGG_OPUS
Opus encoded audio wrapped in an ogg container. The result will be 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
public static final AudioEncoding 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
public static final AudioEncoding 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;
-
UNRECOGNIZED
public static final AudioEncoding UNRECOGNIZED
-
-
Field Detail
-
AUDIO_ENCODING_UNSPECIFIED_VALUE
public static final int AUDIO_ENCODING_UNSPECIFIED_VALUE
Not specified. Will return result [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
AUDIO_ENCODING_UNSPECIFIED = 0;
- See Also:
- Constant Field Values
-
LINEAR16_VALUE
public static final int LINEAR16_VALUE
Uncompressed 16-bit signed little-endian samples (Linear PCM). Audio content returned as LINEAR16 also contains a WAV header.
LINEAR16 = 1;
- See Also:
- Constant Field Values
-
MP3_VALUE
public static final int MP3_VALUE
MP3 audio at 32kbps.
MP3 = 2;
- See Also:
- Constant Field Values
-
OGG_OPUS_VALUE
public static final int OGG_OPUS_VALUE
Opus encoded audio wrapped in an ogg container. The result will be 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:
- Constant Field Values
-
MULAW_VALUE
public static final int MULAW_VALUE
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;
- See Also:
- Constant Field Values
-
ALAW_VALUE
public static final int ALAW_VALUE
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;
- See Also:
- Constant Field Values
-
-
Method Detail
-
values
public static AudioEncoding[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:for (AudioEncoding c : AudioEncoding.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static AudioEncoding valueOf(String name)
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:
getNumber
in interfacecom.google.protobuf.Internal.EnumLite
- Specified by:
getNumber
in interfacecom.google.protobuf.ProtocolMessageEnum
-
valueOf
@Deprecated public static AudioEncoding valueOf(int value)
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
public static AudioEncoding forNumber(int value)
- Parameters:
value
- The numeric wire value of the corresponding enum entry.- Returns:
- The enum associated with the given numeric wire value.
-
internalGetValueMap
public static com.google.protobuf.Internal.EnumLiteMap<AudioEncoding> internalGetValueMap()
-
getValueDescriptor
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
- Specified by:
getValueDescriptor
in interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptorForType
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
- Specified by:
getDescriptorForType
in interfacecom.google.protobuf.ProtocolMessageEnum
-
getDescriptor
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
-
valueOf
public static AudioEncoding valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
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
-
-