[][src]Struct gcp_client::google::cloud::dialogflow::v2beta1::InputAudioConfig

pub struct InputAudioConfig {
    pub audio_encoding: i32,
    pub sample_rate_hertz: i32,
    pub language_code: String,
    pub enable_word_info: bool,
    pub phrase_hints: Vec<String>,
    pub speech_contexts: Vec<SpeechContext>,
    pub model: String,
    pub model_variant: i32,
    pub single_utterance: bool,
}

Instructs the speech recognizer on how to process the audio content.

Fields

audio_encoding: i32

Required. Audio encoding of the audio content to process.

sample_rate_hertz: i32

Required. Sample rate (in Hertz) of the audio content sent in the query. Refer to Cloud Speech API documentation for more details.

language_code: String

Required. The language of the supplied audio. Dialogflow does not do translations. See Language Support for a list of the currently supported language codes. Note that queries in the same session do not necessarily need to specify the same language.

enable_word_info: bool

If true, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.v2beta1.SpeechWordInfo] in [StreamingRecognitionResult][google.cloud.dialogflow.v2beta1.StreamingRecognitionResult] with information about the recognized speech words, e.g. start and end time offsets. If false or unspecified, Speech doesn't return any word-level information.

phrase_hints: Vec<String>

A list of strings containing words and phrases that the speech recognizer should recognize with higher likelihood.

See the Cloud Speech documentation for more details.

This field is deprecated. Please use speech_contexts instead. If you specify both phrase_hints and speech_contexts, Dialogflow will treat the phrase_hints as a single additional SpeechContext.

speech_contexts: Vec<SpeechContext>

Context information to assist speech recognition.

See the Cloud Speech documentation for more details.

model: String

Which Speech model to select for the given request. Select the model best suited to your domain to get best results. If a model is not explicitly specified, then we auto-select a model based on the parameters in the InputAudioConfig. If enhanced speech model is enabled for the agent and an enhanced version of the specified model for the language does not exist, then the speech is recognized using the standard version of the specified model. Refer to Cloud Speech API documentation for more details.

model_variant: i32

Which variant of the [Speech model][google.cloud.dialogflow.v2beta1.InputAudioConfig.model] to use.

single_utterance: bool

If false (default), recognition does not cease until the client closes the stream. If true, the recognizer will detect a single spoken utterance in input audio. Recognition ceases when it detects the audio's voice has stopped or paused. In this case, once a detected intent is received, the client should close the stream and start a new request with a new stream as needed. Note: This setting is relevant only for streaming methods. Note: When specified, InputAudioConfig.single_utterance takes precedence over StreamingDetectIntentRequest.single_utterance.

Implementations

impl InputAudioConfig[src]

pub fn audio_encoding(&self) -> AudioEncoding[src]

Returns the enum value of audio_encoding, or the default if the field is set to an invalid enum value.

pub fn set_audio_encoding(&mut self, value: AudioEncoding)[src]

Sets audio_encoding to the provided enum value.

pub fn model_variant(&self) -> SpeechModelVariant[src]

Returns the enum value of model_variant, or the default if the field is set to an invalid enum value.

pub fn set_model_variant(&mut self, value: SpeechModelVariant)[src]

Sets model_variant to the provided enum value.

Trait Implementations

impl Clone for InputAudioConfig[src]

impl Debug for InputAudioConfig[src]

impl Default for InputAudioConfig[src]

impl Message for InputAudioConfig[src]

impl PartialEq<InputAudioConfig> for InputAudioConfig[src]

impl StructuralPartialEq for InputAudioConfig[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> From<T> for T[src]

impl<T> Instrument for T[src]

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

impl<T> IntoRequest<T> for 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<V, T> VZip<V> for T where
    V: MultiLane<T>, 

impl<T> WithSubscriber for T[src]