Struct google_speech1::RecognitionConfig [−][src]
pub struct RecognitionConfig { pub language_code: Option<String>, pub sample_rate_hertz: Option<i32>, pub encoding: Option<String>, pub profanity_filter: Option<bool>, pub enable_word_time_offsets: Option<bool>, pub speech_contexts: Option<Vec<SpeechContext>>, pub max_alternatives: Option<i32>, }
Provides information to the recognizer that specifies how to process the request.
This type is not used in any activity, and only used as part of another schema.
Fields
language_code: Option<String>
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.
sample_rate_hertz: Option<i32>
Required Sample rate in Hertz of the audio data sent in all
RecognitionAudio
messages. 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).
encoding: Option<String>
Required Encoding of audio data sent in all RecognitionAudio
messages.
profanity_filter: Option<bool>
Optional 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.
enable_word_time_offsets: Option<bool>
Optional If true
, the top result includes a list of words and
the start and end time offsets (timestamps) for those words. If
false
, no word-level time offset information is returned. The default is
false
.
speech_contexts: Option<Vec<SpeechContext>>
Optional A means to provide context to assist the speech recognition.
max_alternatives: Option<i32>
Optional Maximum number of recognition hypotheses to be returned.
Specifically, the maximum number of SpeechRecognitionAlternative
messages
within each SpeechRecognitionResult
.
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.
Trait Implementations
impl Default for RecognitionConfig
[src]
impl Default for RecognitionConfig
fn default() -> RecognitionConfig
[src]
fn default() -> RecognitionConfig
Returns the "default value" for a type. Read more
impl Clone for RecognitionConfig
[src]
impl Clone for RecognitionConfig
fn clone(&self) -> RecognitionConfig
[src]
fn clone(&self) -> RecognitionConfig
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)
1.0.0[src]
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from source
. Read more
impl Debug for RecognitionConfig
[src]
impl Debug for RecognitionConfig
fn fmt(&self, f: &mut Formatter) -> Result
[src]
fn fmt(&self, f: &mut Formatter) -> Result
Formats the value using the given formatter. Read more
impl Part for RecognitionConfig
[src]
impl Part for RecognitionConfig
Auto Trait Implementations
impl Send for RecognitionConfig
impl Send for RecognitionConfig
impl Sync for RecognitionConfig
impl Sync for RecognitionConfig