Struct google_api_proto::google::cloud::speech::v2::RecognitionConfig
source · pub struct RecognitionConfig {
pub model: String,
pub language_codes: Vec<String>,
pub features: Option<RecognitionFeatures>,
pub adaptation: Option<SpeechAdaptation>,
pub transcript_normalization: Option<TranscriptNormalization>,
pub translation_config: Option<TranslationConfig>,
pub decoding_config: Option<DecodingConfig>,
}
Expand description
Provides information to the Recognizer that specifies how to process the recognition request.
Fields§
§model: String
Optional. Which model to use for recognition requests. Select the model best suited to your domain to get best results.
Guidance for choosing which model to use can be found in the Transcription Models Documentation and the models supported in each region can be found in the Table Of Supported Models.
language_codes: Vec<String>
Optional. The language of the supplied audio as a BCP-47 language tag. Language tags are normalized to BCP-47 before they are used eg “en-us” becomes “en-US”.
Supported languages for each model are listed in the Table of Supported Models.
If additional languages are provided, recognition result will contain recognition in the most likely language detected. The recognition result will include the language tag of the language detected in the audio.
features: Option<RecognitionFeatures>
Speech recognition features to enable.
adaptation: Option<SpeechAdaptation>
Speech adaptation context that weights recognizer predictions for specific words and phrases.
transcript_normalization: Option<TranscriptNormalization>
Optional. Use transcription normalization to automatically replace parts of the transcript with phrases of your choosing. For StreamingRecognize, this normalization only applies to stable partial transcripts (stability > 0.8) and final transcripts.
translation_config: Option<TranslationConfig>
Optional. Optional configuration used to automatically run translation on the given audio to the desired language for supported models.
decoding_config: Option<DecodingConfig>
Decoding parameters for audio being sent for recognition.
Trait Implementations§
source§impl Clone for RecognitionConfig
impl Clone for RecognitionConfig
source§fn clone(&self) -> RecognitionConfig
fn clone(&self) -> RecognitionConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for RecognitionConfig
impl Debug for RecognitionConfig
source§impl Default for RecognitionConfig
impl Default for RecognitionConfig
source§impl Message for RecognitionConfig
impl Message for RecognitionConfig
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 RecognitionConfig
impl PartialEq for RecognitionConfig
source§fn eq(&self, other: &RecognitionConfig) -> bool
fn eq(&self, other: &RecognitionConfig) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for RecognitionConfig
Auto Trait Implementations§
impl Freeze for RecognitionConfig
impl RefUnwindSafe for RecognitionConfig
impl Send for RecognitionConfig
impl Sync for RecognitionConfig
impl Unpin for RecognitionConfig
impl UnwindSafe for RecognitionConfig
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