#[non_exhaustive]pub enum AudioEncoding {
Unspecified,
Linear16,
Flac,
Mulaw,
Amr,
AmrWb,
OggOpus,
SpeexWithHeaderByte,
Alaw,
UnknownValue(UnknownValue),
}conversation-profiles or conversations or participants or sessions only.Expand description
Audio encoding of the audio content sent in the conversational query request. Refer to the Cloud Speech API documentation for more details.
§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.
Linear16
Uncompressed 16-bit signed little-endian samples (Linear PCM).
Flac
FLAC (Free Lossless Audio
Codec) is the recommended encoding because it is lossless (therefore
recognition is not compromised) and requires only about half the
bandwidth of LINEAR16. FLAC stream encoding supports 16-bit and
24-bit samples, however, not all fields in STREAMINFO are supported.
Mulaw
8-bit samples that compand 14-bit audio samples using G.711 PCMU/mu-law.
Amr
Adaptive Multi-Rate Narrowband codec. sample_rate_hertz must be 8000.
AmrWb
Adaptive Multi-Rate Wideband codec. sample_rate_hertz must be 16000.
OggOpus
Opus encoded audio frames in Ogg container
(OggOpus).
sample_rate_hertz must be 16000.
SpeexWithHeaderByte
Although the use of lossy encodings is not recommended, if a very low
bitrate encoding is required, OGG_OPUS is highly preferred over
Speex encoding. The Speex encoding supported by
Dialogflow API has a header byte in each block, as in MIME type
audio/x-speex-with-header-byte.
It is a variant of the RTP Speex encoding defined in
RFC 5574.
The stream is a sequence of blocks, one block per RTP packet. Each block
starts with a byte containing the length of the block, in bytes, followed
by one or more frames of Speex data, padded to an integral number of
bytes (octets) as specified in RFC 5574. In other words, each RTP header
is replaced with a single byte containing the block length. Only Speex
wideband is supported. sample_rate_hertz must be 16000.
Alaw
8-bit samples that compand 13-bit audio samples using G.711 PCMU/a-law.
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 · 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§impl Serialize for AudioEncoding
impl Serialize for AudioEncoding
impl StructuralPartialEq for AudioEncoding
Auto Trait Implementations§
impl Freeze for AudioEncoding
impl RefUnwindSafe for AudioEncoding
impl Send for AudioEncoding
impl Sync for AudioEncoding
impl Unpin for AudioEncoding
impl UnwindSafe for AudioEncoding
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> PolicyExt for Twhere
T: ?Sized,
impl<T> PolicyExt for Twhere
T: ?Sized,
Source§impl<T> ToStringFallible for Twhere
T: Display,
impl<T> ToStringFallible for Twhere
T: Display,
Source§fn try_to_string(&self) -> Result<String, TryReserveError>
fn try_to_string(&self) -> Result<String, TryReserveError>
ToString::to_string, but without panic on OOM.