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:
@@ -111,8 +111,8 @@ impl SyncDb {
|
||||
"rule": "rule1",
|
||||
"data": {
|
||||
"text": segment.text,
|
||||
"start": segment.start,
|
||||
"end": segment.end,
|
||||
"start_time": segment.start_time,
|
||||
"end_time": segment.end_time,
|
||||
},
|
||||
});
|
||||
let metadata = serde_json::json!({
|
||||
@@ -132,8 +132,8 @@ impl SyncDb {
|
||||
format!("{}", i),
|
||||
ChunkType::Sentence,
|
||||
ChunkRule::Rule1,
|
||||
segment.start,
|
||||
segment.end,
|
||||
segment.start_time,
|
||||
segment.end_time,
|
||||
24.0, // fps
|
||||
content,
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user