diff --git a/src/core/pipeline/mod.rs b/src/core/pipeline/mod.rs index 3481a1a9..c1ff2eaf 100644 --- a/src/core/pipeline/mod.rs +++ b/src/core/pipeline/mod.rs @@ -35,7 +35,7 @@ pub async fn store_asrx_chunks(db: &PostgresDb, uuid: &str) -> Result<()> { "end_frame": segment.end_frame, }); pre_chunks.push(( - segment.start_frame as i64, + segment.start_frame.unwrap_or(0) as i64, Some(segment.start_time), data, None, diff --git a/src/core/processor/asrx.rs b/src/core/processor/asrx.rs index fa0a2e46..770b0aa9 100644 --- a/src/core/processor/asrx.rs +++ b/src/core/processor/asrx.rs @@ -51,9 +51,9 @@ pub struct AsrxSegment { #[serde(alias = "end")] pub end_time: f64, #[serde(default)] - pub start_frame: u64, + pub start_frame: Option, #[serde(default)] - pub end_frame: u64, + pub end_frame: Option, pub text: String, pub speaker_id: Option, #[serde(default)] @@ -209,8 +209,8 @@ mod tests { segments: vec![AsrxSegment { start_time: 0.0, end_time: 2.5, - start_frame: 0, - end_frame: 75, + start_frame: Some(0), + end_frame: Some(75), text: "Hello".to_string(), speaker_id: Some("SPEAKER_00".to_string()), language: None, @@ -262,8 +262,8 @@ mod tests { let segment = AsrxSegment { start_time: 0.0, end_time: 5.0, - start_frame: 0, - end_frame: 150, + start_frame: Some(0), + end_frame: Some(150), text: "Test".to_string(), speaker_id: None, language: None, @@ -286,7 +286,7 @@ mod tests { assert_eq!(result.segments[0].start_time, 10.0); assert_eq!(result.segments[0].end_time, 12.5); assert_eq!(result.segments[0].text, "Hello"); - assert_eq!(result.segments[0].start_frame, 0); - assert_eq!(result.segments[0].end_frame, 0); + assert_eq!(result.segments[0].start_frame, None); + assert_eq!(result.segments[0].end_frame, None); } } diff --git a/src/worker/job_worker.rs b/src/worker/job_worker.rs index b9a0a471..8a3a05e3 100644 --- a/src/worker/job_worker.rs +++ b/src/worker/job_worker.rs @@ -2821,13 +2821,15 @@ impl JobWorker { } } - if has_face && has_asrx { + if has_face { let mut pp = PipelineProgress::new(uuid); pp.update_stage("processors", 1.0, "completed", None); publish_pipeline_progress(self.redis.as_ref(), uuid, &pp).await; // 🚀 P2 Trigger: Face Trace + DB Store (after Face) // Runs face_tracker.py (IoU+embedding tracking), stores trace_id + position in DB + // Note: trigger is gated on face alone (not has_asrx) so no-face videos still + // get face_traced.json written via the fast-path, unblocking FaceCluster. if has_face { let traced_path = format!( "{}/{}.face_traced.json", diff --git a/src/worker/processor.rs b/src/worker/processor.rs index 6c7ff972..4c8c6aca 100644 --- a/src/worker/processor.rs +++ b/src/worker/processor.rs @@ -1521,7 +1521,7 @@ impl ProcessorPool { }); pre_chunks_to_store.push(( - segment.start_frame as i64, + segment.start_frame.unwrap_or(0) as i64, Some(segment.start_time), data, None,