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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user