pub struct VadSyncDetector { /* private fields */ }Expand description
VAD-based subtitle synchronization detector.
Uses Voice Activity Detection to analyze audio files and calculate subtitle timing offsets by comparing detected speech segments with subtitle timing information.
Implementations§
Source§impl VadSyncDetector
impl VadSyncDetector
Sourcepub async fn detect_sync_offset(
&self,
audio_path: &Path,
subtitle: &Subtitle,
_analysis_window_seconds: u32,
) -> Result<SyncResult>
pub async fn detect_sync_offset( &self, audio_path: &Path, subtitle: &Subtitle, _analysis_window_seconds: u32, ) -> Result<SyncResult>
Detect synchronization offset between audio and subtitle.
Analyzes the entire audio file using VAD to identify speech segments and compares them with subtitle timing to calculate the offset.
§Arguments
audio_path- Path to the audio file to analyzesubtitle- Subtitle data with timing information_analysis_window_seconds- Ignored parameter (processes entire file)
§Returns
Synchronization result with detected offset and confidence
§Errors
Returns an error if:
- Audio analysis fails
- Subtitle has no entries
- VAD processing fails
Auto Trait Implementations§
impl Freeze for VadSyncDetector
impl RefUnwindSafe for VadSyncDetector
impl Send for VadSyncDetector
impl Sync for VadSyncDetector
impl Unpin for VadSyncDetector
impl UnwindSafe for VadSyncDetector
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