pub struct SynthesisRequest {
pub language: Option<String>,
pub speaker: Option<String>,
pub text: String,
pub audio_parameters: Option<AudioParameters>,
pub split_strategy: Option<i32>,
pub coda_parameters: Option<CodaParameters>,
pub mist_parameters: Option<MistParameters>,
pub timestamps: Option<TimestampOptions>,
pub custom_lexicon: Vec<PronunciationEntry>,
}Fields§
§language: Option<String>BCP-47 language tag, e.g. “en”. Used to route the frontend pipeline and set backend language.
speaker: Option<String>Speaker name, e.g. “luna”.
text: StringText to synthesize.
audio_parameters: Option<AudioParameters>§split_strategy: Option<i32>Controls how input text is split before synthesis. Defaults to SPLIT_STRATEGY_SENTENCE when unset.
coda_parameters: Option<CodaParameters>§mist_parameters: Option<MistParameters>§timestamps: Option<TimestampOptions>Timestamps of the spoken spans of the synthesized audio, delivered in the trailer once the audio has drained. Off unless requested.
custom_lexicon: Vec<PronunciationEntry>Per-request pronunciation overrides. Validated against the request language’s phonology (an ill-formed entry fails the request) and applied by the segmenter and the pronunciation stages. See engine/src/pipeline/pronunciation.rs.
Implementations§
Source§impl SynthesisRequest
impl SynthesisRequest
Sourcepub fn language(&self) -> &str
pub fn language(&self) -> &str
Returns the value of language, or the default value if language is unset.
Sourcepub fn speaker(&self) -> &str
pub fn speaker(&self) -> &str
Returns the value of speaker, or the default value if speaker is unset.
Sourcepub fn split_strategy(&self) -> SplitStrategy
pub fn split_strategy(&self) -> SplitStrategy
Returns the enum value of split_strategy, or the default if the field is unset or set to an invalid enum value.
Sourcepub fn set_split_strategy(&mut self, value: SplitStrategy)
pub fn set_split_strategy(&mut self, value: SplitStrategy)
Sets split_strategy to the provided enum value.
Trait Implementations§
Source§impl Clone for SynthesisRequest
impl Clone for SynthesisRequest
Source§impl Debug for SynthesisRequest
impl Debug for SynthesisRequest
Source§impl Default for SynthesisRequest
impl Default for SynthesisRequest
§impl<'de> Deserialize<'de> for SynthesisRequest
impl<'de> Deserialize<'de> for SynthesisRequest
§fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
fn deserialize<D>(deserializer: D) -> Result<Self, D::Error>where
D: Deserializer<'de>,
Source§impl Message for SynthesisRequest
impl Message for SynthesisRequest
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 SynthesisRequest
impl PartialEq for SynthesisRequest
§impl Serialize for SynthesisRequest
impl Serialize for SynthesisRequest
impl StructuralPartialEq for SynthesisRequest
Auto Trait Implementations§
impl Freeze for SynthesisRequest
impl RefUnwindSafe for SynthesisRequest
impl Send for SynthesisRequest
impl Sync for SynthesisRequest
impl Unpin for SynthesisRequest
impl UnsafeUnpin for SynthesisRequest
impl UnwindSafe for SynthesisRequest
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§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