Skip to content

Commit bd06bc6

Browse files
authored
Adjust format for segments.json(#55)
1 parent c137ce7 commit bd06bc6

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

amt/run.py

+5-4
Original file line numberDiff line numberDiff line change
@@ -467,13 +467,14 @@ def transcribe(
467467

468468
files_to_process = []
469469
for audio_path in file_paths:
470-
if segments_by_audio_file.get(audio_path, None) is not None:
470+
abs_audio_path = os.path.abspath(audio_path)
471+
if segments_by_audio_file.get(abs_audio_path, None) is not None:
471472
file_info = {
472-
"path": audio_path,
473-
"segments": segments_by_audio_file[audio_path],
473+
"path": abs_audio_path,
474+
"segments": segments_by_audio_file[abs_audio_path]["segments"],
474475
}
475476
else:
476-
file_info = {"path": audio_path}
477+
file_info = {"path": abs_audio_path}
477478

478479
files_to_process.append(file_info)
479480

0 commit comments

Comments
 (0)