Enum speech_synthesis::UtteranceEvent
source · #[non_exhaustive]pub enum UtteranceEvent {
SsmlMark {
at_millis: f32,
mark: Box<str>,
},
WordBoundary {
from_millis: f32,
to_millis: f32,
text: Box<str>,
},
SentenceBoundary {
from_millis: f32,
to_millis: f32,
text: Box<str>,
},
BlendShapeVisemesChunk(Box<[BlendShapeVisemeFrame]>),
VisemesChunk(Box<[BasicVisemeFrame]>),
AudioChunk(Box<[u8]>),
}Expand description
An event emitted by a speech synthesiser’s UtteranceEventStream.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
SsmlMark
Fields
Marks the audio offset of an SSML <mark />.
WordBoundary
Fields
§
from_millis: f32The position in milliseconds the spoken word begun, relative to the beginning of the audio stream.
Marks the time boundary of a spoken word in the audio.
SentenceBoundary
Fields
§
from_millis: f32The position in milliseconds the sentence begun, relative to the beginning of the audio stream.
Marks the time boundary of a sentence in the audio.
BlendShapeVisemesChunk(Box<[BlendShapeVisemeFrame]>)
A chunk of viseme frames in blend shape format.
VisemesChunk(Box<[BasicVisemeFrame]>)
A chunk of frames of ‘basic’ visemes.
AudioChunk(Box<[u8]>)
A chunk of synthesised speech audio in the requested format.
Trait Implementations§
Auto Trait Implementations§
impl RefUnwindSafe for UtteranceEvent
impl Send for UtteranceEvent
impl Sync for UtteranceEvent
impl Unpin for UtteranceEvent
impl UnwindSafe for UtteranceEvent
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