Struct googapis::google::cloud::dialogflow::cx::v3::InputAudioConfig [−][src]
pub struct InputAudioConfig {
pub audio_encoding: i32,
pub sample_rate_hertz: i32,
pub enable_word_info: bool,
pub phrase_hints: Vec<String>,
pub model: String,
pub model_variant: i32,
pub single_utterance: bool,
}
Expand description
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
Sample rate (in Hertz) of the audio content sent in the query. Refer to Cloud Speech API documentation for more details.
enable_word_info: bool
Optional. If true
, Dialogflow returns [SpeechWordInfo][google.cloud.dialogflow.cx.v3.SpeechWordInfo] in
[StreamingRecognitionResult][google.cloud.dialogflow.cx.v3.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>
Optional. 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.
model: String
Optional. 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
Optional. Which variant of the [Speech model][google.cloud.dialogflow.cx.v3.InputAudioConfig.model] to use.
single_utterance: bool
Optional. 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.
Implementations
Returns the enum value of audio_encoding
, or the default if the field is set to an invalid enum value.
Sets audio_encoding
to the provided enum value.
Returns the enum value of model_variant
, or the default if the field is set to an invalid enum value.
Sets model_variant
to the provided enum value.
Trait Implementations
fn merge_field<B>(
&mut self,
tag: u32,
wire_type: WireType,
buf: &mut B,
ctx: DecodeContext
) -> Result<(), DecodeError> where
B: Buf,
Returns the encoded length of the message without a length delimiter.
Encodes the message to a buffer. Read more
Encodes the message to a newly allocated buffer.
Encodes the message with a length-delimiter to a buffer. Read more
Encodes the message with a length-delimiter to a newly allocated buffer.
Decodes an instance of the message from a buffer. Read more
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError> where
Self: Default,
B: Buf,
fn decode_length_delimited<B>(buf: B) -> Result<Self, DecodeError> where
Self: Default,
B: Buf,
Decodes a length-delimited instance of the message from the buffer.
Decodes an instance of the message from a buffer, and merges it into self
. Read more
Decodes a length-delimited instance of the message from buffer, and
merges it into self
. Read more
This method tests for self
and other
values to be equal, and is used
by ==
. Read more
This method tests for !=
.
Auto Trait Implementations
impl RefUnwindSafe for InputAudioConfig
impl Send for InputAudioConfig
impl Sync for InputAudioConfig
impl Unpin for InputAudioConfig
impl UnwindSafe for InputAudioConfig
Blanket Implementations
Mutably borrows from an owned value. Read more
Wrap the input message T
in a tonic::Request
pub fn vzip(self) -> V
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more