fix: ASR fails to find cut.json when executor uses .tmp output path

- ASR script used output_path.replace('.asr.json', '.cut.json') to find CUT file
- Executor passes output path with .tmp suffix (xxx.asr.json.tmp)
- This produced wrong path: xxx.cut.json.tmp (doesn't exist)
- Fix: use --uuid to construct CUT path from output_dir instead
- Also added executor Full command logging for debugging

Fixed IMG_9449 (1).MOV ASR failure: status changed from failed → completed
This commit is contained in:
Accusys
2026-08-05 01:45:59 +08:00
parent 3d13a06bd9
commit 15967929ef
2 changed files with 7 additions and 1 deletions
+6 -1
View File
@@ -181,7 +181,12 @@ def run_asr(video_path, output_path, uuid: str = "", fps: float = None):
if fps is not None:
print(f"[ASR] Using CLI-provided FPS: {fps}", file=sys.stderr)
else:
cut_path_check = output_path.replace(".asr.json", ".cut.json")
# Use uuid to construct CUT path (output_path may have .tmp suffix from executor)
output_dir = os.path.dirname(output_path)
if uuid and output_dir:
cut_path_check = os.path.join(output_dir, f"{uuid}.cut.json")
else:
cut_path_check = output_path.replace(".asr.json", ".cut.json")
fps = get_fps_from_cut(cut_path_check)
if fps:
print(f"[ASR] FPS from CUT: {fps}", file=sys.stderr)