Skip to content

Commit

Permalink
adjust segment.json format
Browse files Browse the repository at this point in the history
  • Loading branch information
loubbrad committed Sep 5, 2024
1 parent c137ce7 commit 2566ec6
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions amt/run.py
Original file line number Diff line number Diff line change
Expand Up @@ -467,13 +467,14 @@ def transcribe(

files_to_process = []
for audio_path in file_paths:
if segments_by_audio_file.get(audio_path, None) is not None:
abs_audio_path = os.path.abspath(audio_path)
if segments_by_audio_file.get(abs_audio_path, None) is not None:
file_info = {
"path": audio_path,
"segments": segments_by_audio_file[audio_path],
"path": abs_audio_path,
"segments": segments_by_audio_file[abs_audio_path]["segments"],
}
else:
file_info = {"path": audio_path}
file_info = {"path": abs_audio_path}

files_to_process.append(file_info)

Expand Down

0 comments on commit 2566ec6

Please sign in to comment.