pub struct CaptionSegment {
pub text: String,
pub start_ms: u64,
pub duration_ms: u64,
}Expand description
A single word-level caption with timing information.
Produced by TTS providers that support alignment data (e.g. ElevenLabs). Used for subtitle rendering and media segment timing.
Fields§
§text: StringThe word or token text.
start_ms: u64Start time in milliseconds from the beginning of the audio.
duration_ms: u64Duration in milliseconds.
Trait Implementations§
Source§impl Clone for CaptionSegment
impl Clone for CaptionSegment
Source§fn clone(&self) -> CaptionSegment
fn clone(&self) -> CaptionSegment
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 CaptionSegment
impl Debug for CaptionSegment
Source§impl<'de> Deserialize<'de> for CaptionSegment
impl<'de> Deserialize<'de> for CaptionSegment
Source§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>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for CaptionSegment
impl RefUnwindSafe for CaptionSegment
impl Send for CaptionSegment
impl Sync for CaptionSegment
impl Unpin for CaptionSegment
impl UnsafeUnpin for CaptionSegment
impl UnwindSafe for CaptionSegment
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