feat: ASR output frame numbers + rename start/end to start_time/end_time

- Python: asr_processor.py detects FPS from CUT/ffprobe (no fallback), outputs start_frame/end_frame
- Rust: All AsrSegment structs use start_time/end_time with #[serde(alias)] for backward compat
- store_asr_chunks: prefers ASR output frames, falls back to time-based conversion
- Added backward compatibility test for old JSON format (start/end)

Breaking change: ffprobe/CUT FPS failure now aborts instead of using default 24fps
This commit is contained in:
Accusys
2026-05-19 13:22:38 +08:00
parent 26725dcab7
commit 67ca846ccd
9 changed files with 572 additions and 68 deletions
+4 -4
View File
@@ -51,8 +51,8 @@ impl ChunkSplitter {
format!("{}", index),
ChunkType::Sentence,
ChunkRule::Rule1,
segment.start,
segment.end,
segment.start_time,
segment.end_time,
self.fps,
serde_json::json!({
"text": segment.text,
@@ -67,8 +67,8 @@ impl ChunkSplitter {
#[derive(Debug, Clone)]
pub struct AsrSegment {
pub start: f64,
pub end: f64,
pub start_time: f64,
pub end_time: f64,
pub text: String,
pub speaker_id: Option<String>,
}