#[non_exhaustive]pub struct SpeechConfig {
pub voice_config: Option<VoiceConfig>,
pub language_code: String,
pub multi_speaker_voice_config: Option<MultiSpeakerVoiceConfig>,
/* private fields */
}Available on crate features
llm-utility-service or prediction-service only.Expand description
Configuration for speech generation.
Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.voice_config: Option<VoiceConfig>The configuration for the voice to use.
language_code: StringOptional. The language code (ISO 639-1) for the speech synthesis.
multi_speaker_voice_config: Option<MultiSpeakerVoiceConfig>The configuration for a multi-speaker text-to-speech request.
This field is mutually exclusive with voice_config.
Implementations§
Source§impl SpeechConfig
impl SpeechConfig
pub fn new() -> Self
Sourcepub fn set_voice_config<T>(self, v: T) -> Selfwhere
T: Into<VoiceConfig>,
pub fn set_voice_config<T>(self, v: T) -> Selfwhere
T: Into<VoiceConfig>,
Sets the value of voice_config.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::VoiceConfig;
let x = SpeechConfig::new().set_voice_config(VoiceConfig::default()/* use setters */);Sourcepub fn set_or_clear_voice_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<VoiceConfig>,
pub fn set_or_clear_voice_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<VoiceConfig>,
Sets or clears the value of voice_config.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::VoiceConfig;
let x = SpeechConfig::new().set_or_clear_voice_config(Some(VoiceConfig::default()/* use setters */));
let x = SpeechConfig::new().set_or_clear_voice_config(None::<VoiceConfig>);Sourcepub fn set_language_code<T: Into<String>>(self, v: T) -> Self
pub fn set_language_code<T: Into<String>>(self, v: T) -> Self
Sets the value of language_code.
§Example
ⓘ
let x = SpeechConfig::new().set_language_code("example");Sourcepub fn set_multi_speaker_voice_config<T>(self, v: T) -> Selfwhere
T: Into<MultiSpeakerVoiceConfig>,
pub fn set_multi_speaker_voice_config<T>(self, v: T) -> Selfwhere
T: Into<MultiSpeakerVoiceConfig>,
Sets the value of multi_speaker_voice_config.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::MultiSpeakerVoiceConfig;
let x = SpeechConfig::new().set_multi_speaker_voice_config(MultiSpeakerVoiceConfig::default()/* use setters */);Sourcepub fn set_or_clear_multi_speaker_voice_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<MultiSpeakerVoiceConfig>,
pub fn set_or_clear_multi_speaker_voice_config<T>(self, v: Option<T>) -> Selfwhere
T: Into<MultiSpeakerVoiceConfig>,
Sets or clears the value of multi_speaker_voice_config.
§Example
ⓘ
use google_cloud_aiplatform_v1::model::MultiSpeakerVoiceConfig;
let x = SpeechConfig::new().set_or_clear_multi_speaker_voice_config(Some(MultiSpeakerVoiceConfig::default()/* use setters */));
let x = SpeechConfig::new().set_or_clear_multi_speaker_voice_config(None::<MultiSpeakerVoiceConfig>);Trait Implementations§
Source§impl Clone for SpeechConfig
impl Clone for SpeechConfig
Source§fn clone(&self) -> SpeechConfig
fn clone(&self) -> SpeechConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for SpeechConfig
impl Debug for SpeechConfig
Source§impl Default for SpeechConfig
impl Default for SpeechConfig
Source§fn default() -> SpeechConfig
fn default() -> SpeechConfig
Returns the “default value” for a type. Read more
Source§impl Message for SpeechConfig
impl Message for SpeechConfig
Source§impl PartialEq for SpeechConfig
impl PartialEq for SpeechConfig
impl StructuralPartialEq for SpeechConfig
Auto Trait Implementations§
impl Freeze for SpeechConfig
impl RefUnwindSafe for SpeechConfig
impl Send for SpeechConfig
impl Sync for SpeechConfig
impl Unpin for SpeechConfig
impl UnwindSafe for SpeechConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more