Struct google_api_proto::google::cloud::videointelligence::v1p3beta1::SpeechTranscriptionConfig
source · pub struct SpeechTranscriptionConfig {
pub language_code: String,
pub max_alternatives: i32,
pub filter_profanity: bool,
pub speech_contexts: Vec<SpeechContext>,
pub enable_automatic_punctuation: bool,
pub audio_tracks: Vec<i32>,
pub enable_speaker_diarization: bool,
pub diarization_speaker_count: i32,
pub enable_word_confidence: bool,
}Expand description
Config for SPEECH_TRANSCRIPTION.
Fields§
§language_code: StringRequired. Required The language of the supplied audio as a BCP-47 language tag. Example: “en-US”. See Language Support for a list of the currently supported language codes.
max_alternatives: i32Optional. Maximum number of recognition hypotheses to be returned.
Specifically, the maximum number of SpeechRecognitionAlternative messages
within each SpeechTranscription. The server may return fewer than
max_alternatives. Valid values are 0-30. A value of 0 or 1 will
return a maximum of one. If omitted, will return a maximum of one.
filter_profanity: boolOptional. If set to true, the server will attempt to filter out
profanities, replacing all but the initial character in each filtered word
with asterisks, e.g. “f***”. If set to false or omitted, profanities
won’t be filtered out.
speech_contexts: Vec<SpeechContext>Optional. A means to provide context to assist the speech recognition.
enable_automatic_punctuation: boolOptional. If ‘true’, adds punctuation to recognition result hypotheses. This feature is only available in select languages. Setting this for requests in other languages has no effect at all. The default ‘false’ value does not add punctuation to result hypotheses. NOTE: “This is currently offered as an experimental service, complimentary to all users. In the future this may be exclusively available as a premium feature.”
audio_tracks: Vec<i32>Optional. For file formats, such as MXF or MKV, supporting multiple audio tracks, specify up to two tracks. Default: track 0.
enable_speaker_diarization: boolOptional. If ‘true’, enables speaker detection for each recognized word in the top alternative of the recognition result using a speaker_tag provided in the WordInfo. Note: When this is true, we send all the words from the beginning of the audio for the top alternative in every consecutive response. This is done in order to improve our speaker tags as our models learn to identify the speakers in the conversation over time.
diarization_speaker_count: i32Optional. If set, specifies the estimated number of speakers in the conversation. If not set, defaults to ‘2’. Ignored unless enable_speaker_diarization is set to true.
enable_word_confidence: boolOptional. If true, the top result includes a list of words and the
confidence for those words. If false, no word-level confidence
information is returned. The default is false.
Trait Implementations§
source§impl Clone for SpeechTranscriptionConfig
impl Clone for SpeechTranscriptionConfig
source§fn clone(&self) -> SpeechTranscriptionConfig
fn clone(&self) -> SpeechTranscriptionConfig
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moresource§impl Debug for SpeechTranscriptionConfig
impl Debug for SpeechTranscriptionConfig
source§impl Default for SpeechTranscriptionConfig
impl Default for SpeechTranscriptionConfig
source§impl Message for SpeechTranscriptionConfig
impl Message for SpeechTranscriptionConfig
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 SpeechTranscriptionConfig
impl PartialEq for SpeechTranscriptionConfig
source§fn eq(&self, other: &SpeechTranscriptionConfig) -> bool
fn eq(&self, other: &SpeechTranscriptionConfig) -> bool
self and other values to be equal, and is used
by ==.impl StructuralPartialEq for SpeechTranscriptionConfig
Auto Trait Implementations§
impl Freeze for SpeechTranscriptionConfig
impl RefUnwindSafe for SpeechTranscriptionConfig
impl Send for SpeechTranscriptionConfig
impl Sync for SpeechTranscriptionConfig
impl Unpin for SpeechTranscriptionConfig
impl UnwindSafe for SpeechTranscriptionConfig
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