[][src]Struct google_speech1_beta1::RecognitionConfig

pub struct RecognitionConfig {
    pub language_code: Option<String>,
    pub speech_context: Option<SpeechContext>,
    pub encoding: Option<String>,
    pub profanity_filter: Option<bool>,
    pub sample_rate: Option<i32>,
    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>

Optional The language of the supplied audio as a BCP-47 language tag. Example: "en-GB" https://www.rfc-editor.org/rfc/bcp/bcp47.txt If omitted, defaults to "en-US". See Language Support for a list of the currently supported language codes.

speech_context: Option<SpeechContext>

Optional A means to provide context to assist the speech recognition.

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.

sample_rate: 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).

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 Clone for RecognitionConfig[src]

impl Debug for RecognitionConfig[src]

impl Default for RecognitionConfig[src]

impl<'de> Deserialize<'de> for RecognitionConfig[src]

impl Part for RecognitionConfig[src]

impl Serialize for RecognitionConfig[src]

Auto Trait Implementations

Blanket Implementations

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> DeserializeOwned for T where
    T: for<'de> Deserialize<'de>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Typeable for T where
    T: Any