Struct google_api_proto::google::cloud::texttospeech::v1::VoiceSelectionParams
source · pub struct VoiceSelectionParams {
pub language_code: String,
pub name: String,
pub ssml_gender: i32,
pub custom_voice: Option<CustomVoiceParams>,
}
Expand description
Description of which voice to use for a synthesis request.
Fields§
§language_code: String
Required. The language (and potentially also the region) of the voice expressed as a BCP-47 language tag, e.g. “en-US”. This should not include a script tag (e.g. use “cmn-cn” rather than “cmn-Hant-cn”), because the script will be inferred from the input provided in the SynthesisInput. The TTS service will use this parameter to help choose an appropriate voice. Note that the TTS service may choose a voice with a slightly different language code than the one selected; it may substitute a different region (e.g. using en-US rather than en-CA if there isn’t a Canadian voice available), or even a different language, e.g. using “nb” (Norwegian Bokmal) instead of “no” (Norwegian)“.
name: String
The name of the voice. If both the name and the gender are not set, the service will choose a voice based on the other parameters such as language_code.
ssml_gender: i32
The preferred gender of the voice. If not set, the service will choose a voice based on the other parameters such as language_code and name. Note that this is only a preference, not requirement; if a voice of the appropriate gender is not available, the synthesizer should substitute a voice with a different gender rather than failing the request.
custom_voice: Option<CustomVoiceParams>
The configuration for a custom voice. If [CustomVoiceParams.model] is set, the service will choose the custom voice matching the specified configuration.
Implementations§
source§impl VoiceSelectionParams
impl VoiceSelectionParams
sourcepub fn ssml_gender(&self) -> SsmlVoiceGender
pub fn ssml_gender(&self) -> SsmlVoiceGender
Returns the enum value of ssml_gender
, or the default if the field is set to an invalid enum value.
sourcepub fn set_ssml_gender(&mut self, value: SsmlVoiceGender)
pub fn set_ssml_gender(&mut self, value: SsmlVoiceGender)
Sets ssml_gender
to the provided enum value.
Trait Implementations§
source§impl Clone for VoiceSelectionParams
impl Clone for VoiceSelectionParams
source§fn clone(&self) -> VoiceSelectionParams
fn clone(&self) -> VoiceSelectionParams
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read moresource§impl Debug for VoiceSelectionParams
impl Debug for VoiceSelectionParams
source§impl Default for VoiceSelectionParams
impl Default for VoiceSelectionParams
source§impl Message for VoiceSelectionParams
impl Message for VoiceSelectionParams
source§fn encoded_len(&self) -> usize
fn encoded_len(&self) -> usize
source§fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
fn encode(&self, buf: &mut impl BufMut) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
fn encode_length_delimited(
&self,
buf: &mut impl BufMut,
) -> Result<(), EncodeError>where
Self: Sized,
source§fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
fn encode_length_delimited_to_vec(&self) -> Vec<u8>where
Self: Sized,
source§fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
fn decode_length_delimited(buf: impl Buf) -> Result<Self, DecodeError>where
Self: Default,
source§fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
. Read moresource§fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
fn merge_length_delimited(&mut self, buf: impl Buf) -> Result<(), DecodeError>where
Self: Sized,
self
.source§impl PartialEq for VoiceSelectionParams
impl PartialEq for VoiceSelectionParams
source§fn eq(&self, other: &VoiceSelectionParams) -> bool
fn eq(&self, other: &VoiceSelectionParams) -> bool
self
and other
values to be equal, and is used
by ==
.impl StructuralPartialEq for VoiceSelectionParams
Auto Trait Implementations§
impl Freeze for VoiceSelectionParams
impl RefUnwindSafe for VoiceSelectionParams
impl Send for VoiceSelectionParams
impl Sync for VoiceSelectionParams
impl Unpin for VoiceSelectionParams
impl UnwindSafe for VoiceSelectionParams
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
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T
in a tonic::Request