#[non_exhaustive]pub struct ExplicitDecodingConfig {
pub encoding: AudioEncoding,
pub sample_rate_hertz: i32,
pub audio_channel_count: i32,
/* private fields */
}Expand description
Explicitly specified decoding parameters.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.encoding: AudioEncodingRequired. Encoding of the audio data sent for recognition.
sample_rate_hertz: i32Optional. Sample rate in Hertz of the audio data sent for recognition. Valid values are: 8000-48000, and 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 resampling). Note that this field is marked as OPTIONAL for backward compatibility reasons. It is (and has always been) effectively REQUIRED.
audio_channel_count: i32Optional. Number of channels present in the audio data sent for recognition. Note that this field is marked as OPTIONAL for backward compatibility reasons. It is (and has always been) effectively REQUIRED.
The maximum allowed value is 8.
Implementations§
Source§impl ExplicitDecodingConfig
impl ExplicitDecodingConfig
Sourcepub fn set_encoding<T: Into<AudioEncoding>>(self, v: T) -> Self
pub fn set_encoding<T: Into<AudioEncoding>>(self, v: T) -> Self
Sets the value of encoding.
§Example
use google_cloud_speech_v2::model::explicit_decoding_config::AudioEncoding;
let x0 = ExplicitDecodingConfig::new().set_encoding(AudioEncoding::Linear16);
let x1 = ExplicitDecodingConfig::new().set_encoding(AudioEncoding::Mulaw);
let x2 = ExplicitDecodingConfig::new().set_encoding(AudioEncoding::Alaw);Sourcepub fn set_sample_rate_hertz<T: Into<i32>>(self, v: T) -> Self
pub fn set_sample_rate_hertz<T: Into<i32>>(self, v: T) -> Self
Sets the value of sample_rate_hertz.
§Example
let x = ExplicitDecodingConfig::new().set_sample_rate_hertz(42);Sourcepub fn set_audio_channel_count<T: Into<i32>>(self, v: T) -> Self
pub fn set_audio_channel_count<T: Into<i32>>(self, v: T) -> Self
Sets the value of audio_channel_count.
§Example
let x = ExplicitDecodingConfig::new().set_audio_channel_count(42);Trait Implementations§
Source§impl Clone for ExplicitDecodingConfig
impl Clone for ExplicitDecodingConfig
Source§fn clone(&self) -> ExplicitDecodingConfig
fn clone(&self) -> ExplicitDecodingConfig
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 ExplicitDecodingConfig
impl Debug for ExplicitDecodingConfig
Source§impl Default for ExplicitDecodingConfig
impl Default for ExplicitDecodingConfig
Source§fn default() -> ExplicitDecodingConfig
fn default() -> ExplicitDecodingConfig
Source§impl Message for ExplicitDecodingConfig
impl Message for ExplicitDecodingConfig
Source§impl PartialEq for ExplicitDecodingConfig
impl PartialEq 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 UnsafeUnpin 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<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> FutureExt for T
impl<T> FutureExt for T
Source§fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
fn with_context(self, otel_cx: Context) -> WithContext<Self> ⓘ
Source§fn with_current_context(self) -> WithContext<Self> ⓘ
fn with_current_context(self) -> WithContext<Self> ⓘ
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> 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