#[non_exhaustive]pub struct OutputAudioConfig {
pub audio_encoding: OutputAudioEncoding,
pub sample_rate_hertz: i32,
pub synthesize_speech_config: Option<SynthesizeSpeechConfig>,
/* private fields */
}participants or sessions only.Expand description
Instructs the speech synthesizer on how to generate the output audio content. If this audio config is supplied in a request, it overrides all existing text-to-speech settings applied to the agent.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.audio_encoding: OutputAudioEncodingRequired. Audio encoding of the synthesized audio content.
sample_rate_hertz: i32The synthesis sample rate (in hertz) for this audio. If not provided, then the synthesizer will use the default sample rate based on the audio encoding. If this is different from the voice’s natural sample rate, then the synthesizer will honor this request by converting to the desired sample rate (which might result in worse audio quality).
synthesize_speech_config: Option<SynthesizeSpeechConfig>Configuration of how speech should be synthesized.
Implementations§
Source§impl OutputAudioConfig
impl OutputAudioConfig
pub fn new() -> Self
Sourcepub fn set_audio_encoding<T: Into<OutputAudioEncoding>>(self, v: T) -> Self
pub fn set_audio_encoding<T: Into<OutputAudioEncoding>>(self, v: T) -> Self
Sets the value of audio_encoding.
§Example
use google_cloud_dialogflow_v2::model::OutputAudioEncoding;
let x0 = OutputAudioConfig::new().set_audio_encoding(OutputAudioEncoding::Linear16);
let x1 = OutputAudioConfig::new().set_audio_encoding(OutputAudioEncoding::Mp3);
let x2 = OutputAudioConfig::new().set_audio_encoding(OutputAudioEncoding::Mp364Kbps);Sourcepub fn set_sample_rate_hertz<T: Into<i32>>(self, v: T) -> Self
pub fn set_sample_rate_hertz<T: Into<i32>>(self, v: T) -> Self
Sets the value of sample_rate_hertz.
§Example
let x = OutputAudioConfig::new().set_sample_rate_hertz(42);Sourcepub fn set_synthesize_speech_config<T>(self, v: T) -> Selfwhere
T: Into<SynthesizeSpeechConfig>,
pub fn set_synthesize_speech_config<T>(self, v: T) -> Selfwhere
T: Into<SynthesizeSpeechConfig>,
Sets the value of synthesize_speech_config.
§Example
use google_cloud_dialogflow_v2::model::SynthesizeSpeechConfig;
let x = OutputAudioConfig::new().set_synthesize_speech_config(SynthesizeSpeechConfig::default()/* use setters */);Sourcepub fn set_or_clear_synthesize_speech_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<SynthesizeSpeechConfig>,
pub fn set_or_clear_synthesize_speech_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<SynthesizeSpeechConfig>,
Sets or clears the value of synthesize_speech_config.
§Example
use google_cloud_dialogflow_v2::model::SynthesizeSpeechConfig;
let x = OutputAudioConfig::new().set_or_clear_synthesize_speech_config(Some(SynthesizeSpeechConfig::default()/* use setters */));
let x = OutputAudioConfig::new().set_or_clear_synthesize_speech_config(None::<SynthesizeSpeechConfig>);Trait Implementations§
Source§impl Clone for OutputAudioConfig
impl Clone for OutputAudioConfig
Source§fn clone(&self) -> OutputAudioConfig
fn clone(&self) -> OutputAudioConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more