Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
JinZr committed Nov 30, 2024
1 parent a1ade8e commit 6ae4884
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -516,9 +516,15 @@ def main():
for idx, part in enumerate(cut_sets):
if args.audio_extractor:
if args.audio_extractor == "Encodec":
storage_path = f"{args.output_dir}/{args.prefix}_encodec_{partition}_{idx if split > 1 else ''}"
if split > 1:
storage_path = f"{args.output_dir}/{args.prefix}_encodec_{partition}_{idx}"
else:
storage_path = f"{args.output_dir}/{args.prefix}_encodec_{partition}"
else:
storage_path = f"{args.output_dir}/{args.prefix}_fbank_{partition}_{idx if split > 1 else ''}"
if split > 1:
storage_path = f"{args.output_dir}/{args.prefix}_fbank_{partition}_{idx}"
else:
storage_path = f"{args.output_dir}/{args.prefix}_fbank_{partition}"

if args.prefix.lower() in [
"ljspeech",
Expand Down Expand Up @@ -587,9 +593,11 @@ def main():
].normalized_text, "normalized_text is None"

# Save each part with an index if split > 1
cuts_filename = (
f"{prefix}cuts_{partition}.{idx if split > 1 else ''}.{args.suffix}"
)
if split > 1:
cuts_filename = f"{prefix}cuts_{partition}.{idx}.{args.suffix}"
else:
cuts_filename = f"{prefix}cuts_{partition}.{args.suffix}"

part.to_file(f"{args.output_dir}/{cuts_filename}")
logging.info(f"Saved {cuts_filename}")

Expand Down
2 changes: 2 additions & 0 deletions egs/wenetspeech4tts/TTS/valle/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
phonemizer==3.2.1
git+https://github.com/facebookresearch/encodec.git

0 comments on commit 6ae4884

Please sign in to comment.