Skip to content

Commit

Permalink
feat(pre-sd): add leading zeros for 4-digit width of the output file …
Browse files Browse the repository at this point in the history
…name's numeric part #1154 (#1155)
  • Loading branch information
annagorshunova committed Apr 11, 2024
1 parent 50f6d79 commit 41b147f
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ def _process_one(
speaker_count[speaker] += 1
audio_cut = audio[int(segment.start * sr) : int(segment.end * sr)]
sf.write(
(output_dir / f"{speaker}_{speaker_count[speaker]}.wav"),
(output_dir / f"{speaker}_{speaker_count[speaker]:04d}.wav"),
audio_cut,
sr,
)
Expand Down

0 comments on commit 41b147f

Please sign in to comment.