#[non_exhaustive]pub struct UtteranceConfig {
pub emit_word_boundary_events: bool,
pub emit_sentence_boundary_events: bool,
pub emit_visemes: bool,
pub voice: Option<Box<str>>,
pub language: Option<Box<str>>,
}
Expand description
Configuration for a single speech synthesis utterance.
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.emit_word_boundary_events: bool
Whether to emit UtteranceEvent::WordBoundary
events.
emit_sentence_boundary_events: bool
Whether to emit UtteranceEvent::SentenceBoundary
events.
emit_visemes: bool
Whether to emit UtteranceEvent::VisemesChunk
/UtteranceEvent::BlendShapeVisemesChunk
events.
voice: Option<Box<str>>
The name of the voice to use for synthesis.
language: Option<Box<str>>
The language to use for raw text synthesis.
Implementations§
Source§impl UtteranceConfig
impl UtteranceConfig
Sourcepub fn with_emit_word_boundary_events(self, x: bool) -> Self
pub fn with_emit_word_boundary_events(self, x: bool) -> Self
Configures whether to emit UtteranceEvent::WordBoundary
events.
Sourcepub fn with_emit_sentence_boundary_events(self, x: bool) -> Self
pub fn with_emit_sentence_boundary_events(self, x: bool) -> Self
Configures whether to emit UtteranceEvent::SentenceBoundary
events.
Sourcepub fn with_emit_visemes(self, x: bool) -> Self
pub fn with_emit_visemes(self, x: bool) -> Self
Configures whether to emit UtteranceEvent::VisemesChunk
/UtteranceEvent::BlendShapeVisemesChunk
events.
Sourcepub fn with_voice(self, x: impl Into<Box<str>>) -> Self
pub fn with_voice(self, x: impl Into<Box<str>>) -> Self
Configures the name of the voice to use for synthesis.
This is generally only used for text synthesis and will be ignored with SSML synthesis.
Sourcepub fn with_language(self, x: impl Into<Box<str>>) -> Self
pub fn with_language(self, x: impl Into<Box<str>>) -> Self
Configures the language to use for raw text synthesis.
This is generally only used for text synthesis and will be ignored with SSML synthesis.
Trait Implementations§
Source§impl Clone for UtteranceConfig
impl Clone for UtteranceConfig
Source§fn clone(&self) -> UtteranceConfig
fn clone(&self) -> UtteranceConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source
. Read more