Struct google_api_proto::google::cloud::speech::v2::ExplicitDecodingConfig
source · pub struct ExplicitDecodingConfig {
pub encoding: i32,
pub sample_rate_hertz: i32,
pub audio_channel_count: i32,
}
Expand description
Explicitly specified decoding parameters.
Fields§
§encoding: i32
Required. Encoding of the audio data sent for recognition.
sample_rate_hertz: i32
Sample rate in Hertz of the audio data sent for recognition. Valid values are: 8000-48000. 16000 is optimal. For best results, set the sampling rate of the audio source to 16000 Hz. If that’s not possible, use the native sample rate of the audio source (instead of re-sampling). Supported for the following encodings:
-
LINEAR16: Headerless 16-bit signed little-endian PCM samples.
-
MULAW: Headerless 8-bit companded mulaw samples.
-
ALAW: Headerless 8-bit companded alaw samples.
audio_channel_count: i32
Number of channels present in the audio data sent for recognition. Supported for the following encodings:
-
LINEAR16: Headerless 16-bit signed little-endian PCM samples.
-
MULAW: Headerless 8-bit companded mulaw samples.
-
ALAW: Headerless 8-bit companded alaw samples.
The maximum allowed value is 8.
Implementations§
source§impl ExplicitDecodingConfig
impl ExplicitDecodingConfig
sourcepub fn encoding(&self) -> AudioEncoding
pub fn encoding(&self) -> AudioEncoding
Returns the enum value of encoding
, or the default if the field is set to an invalid enum value.
sourcepub fn set_encoding(&mut self, value: AudioEncoding)
pub fn set_encoding(&mut self, value: AudioEncoding)
Sets encoding
to the provided enum value.
Trait Implementations§
source§impl Clone for ExplicitDecodingConfig
impl Clone for ExplicitDecodingConfig
source§fn clone(&self) -> ExplicitDecodingConfig
fn clone(&self) -> ExplicitDecodingConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for ExplicitDecodingConfig
impl Debug for ExplicitDecodingConfig
source§impl Default for ExplicitDecodingConfig
impl Default for ExplicitDecodingConfig
source§impl Message for ExplicitDecodingConfig
impl Message for ExplicitDecodingConfig
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for ExplicitDecodingConfig
impl PartialEq for ExplicitDecodingConfig
source§fn eq(&self, other: &ExplicitDecodingConfig) -> bool
fn eq(&self, other: &ExplicitDecodingConfig) -> bool
self
and other
values to be equal, and is used
by ==
.impl Copy for ExplicitDecodingConfig
impl StructuralPartialEq for ExplicitDecodingConfig
Auto Trait Implementations§
impl Freeze for ExplicitDecodingConfig
impl RefUnwindSafe for ExplicitDecodingConfig
impl Send for ExplicitDecodingConfig
impl Sync for ExplicitDecodingConfig
impl Unpin for ExplicitDecodingConfig
impl UnwindSafe for ExplicitDecodingConfig
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request