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 and 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 |
| Modifier and Type | Field and 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.
|
| Modifier and Type | Method and 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(com.google.protobuf.Descriptors.EnumValueDescriptor desc) |
static AudioEncoding |
valueOf(int value)
Deprecated.
Use
forNumber(int) instead. |
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.
|
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;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;public static final AudioEncoding MP3
MP3 audio at 32kbps.
MP3 = 2;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;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;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;public static final AudioEncoding UNRECOGNIZED
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;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;public static final int MP3_VALUE
MP3 audio at 32kbps.
MP3 = 2;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;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;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;public static AudioEncoding[] values()
for (AudioEncoding c : AudioEncoding.values()) System.out.println(c);
public static AudioEncoding valueOf(String name)
name - the name of the enum constant to be returned.IllegalArgumentException - if this enum type has no constant with the specified nameNullPointerException - if the argument is nullpublic final int getNumber()
getNumber in interface com.google.protobuf.Internal.EnumLitegetNumber in interface com.google.protobuf.ProtocolMessageEnum@Deprecated public static AudioEncoding valueOf(int value)
forNumber(int) instead.value - The numeric wire value of the corresponding enum entry.public static AudioEncoding forNumber(int value)
value - The numeric wire value of the corresponding enum entry.public static com.google.protobuf.Internal.EnumLiteMap<AudioEncoding> internalGetValueMap()
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor()
getValueDescriptor in interface com.google.protobuf.ProtocolMessageEnumpublic final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType()
getDescriptorForType in interface com.google.protobuf.ProtocolMessageEnumpublic static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor()
public static AudioEncoding valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc)
Copyright © 2023 Google LLC. All rights reserved.