#[non_exhaustive]pub enum AudioEncoding {
Unspecified,
Linear16,
Mp3,
OggOpus,
Mulaw,
Alaw,
Pcm,
M4A,
UnknownValue(UnknownValue),
}Expand description
Configuration to set up audio encoder. The encoding determines the output audio format that we’d like.
§Working with unknown values
This enum is defined as #[non_exhaustive] because Google Cloud may add
additional enum variants at any time. Adding new variants is not considered
a breaking change. Applications should write their code in anticipation of:
- New values appearing in future releases of the client library, and
- New values received dynamically, without application changes.
Please consult the Working with enums section in the user guide for some guidelines.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Unspecified
Not specified. Only used by GenerateVoiceCloningKey. Otherwise, will return result [google.rpc.Code.INVALID_ARGUMENT][google.rpc.Code.INVALID_ARGUMENT].
Linear16
Uncompressed 16-bit signed little-endian samples (Linear PCM). Audio content returned as LINEAR16 also contains a WAV header.
Mp3
MP3 audio at 32kbps.
OggOpus
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.
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.
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.
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.
M4A
M4A audio.
UnknownValue(UnknownValue)
If set, the enum was initialized with an unknown value.
Applications can examine the value using AudioEncoding::value or AudioEncoding::name.
Implementations§
Trait Implementations§
Source§impl Clone for AudioEncoding
impl Clone for AudioEncoding
Source§fn clone(&self) -> AudioEncoding
fn clone(&self) -> AudioEncoding
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for AudioEncoding
impl Debug for AudioEncoding
Source§impl Default for AudioEncoding
impl Default for AudioEncoding
Source§impl<'de> Deserialize<'de> for AudioEncoding
impl<'de> Deserialize<'de> for AudioEncoding
Source§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Source§impl Display for AudioEncoding
impl Display for AudioEncoding
Source§impl From<&str> for AudioEncoding
impl From<&str> for AudioEncoding
Source§impl From<i32> for AudioEncoding
impl From<i32> for AudioEncoding
Source§impl PartialEq for AudioEncoding
impl PartialEq for AudioEncoding
Source§fn eq(&self, other: &AudioEncoding) -> bool
fn eq(&self, other: &AudioEncoding) -> bool
self and other values to be equal, and is used by ==.