Skip to content

Commit

Permalink
Update infer.py
Browse files Browse the repository at this point in the history
  • Loading branch information
JinZr committed Nov 4, 2024
1 parent 6e5c3e4 commit 19f386c
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions egs/ljspeech/TTS/matcha/infer.py
Original file line number Diff line number Diff line change
Expand Up @@ -179,16 +179,16 @@ def infer_dataset(
output["waveform"] = to_waveform(output["mel"], vocoder, denoiser)

sf.write(
file=params.save_wave_dir / f"{cut_ids[i]}_pred.wav",
data=output["waveform"],
samplerate=params.sampling_rate,
subtype="PCM_16"
file=params.save_wave_dir / f"{cut_ids[i]}_pred.wav",
data=output["waveform"],
samplerate=params.sampling_rate,
subtype="PCM_16",
)
sf.write(
file=params.save_wave_dir / f"{cut_ids[i]}_gt.wav",
data=audio[i].numpy(),
samplerate=params.sampling_rate,
subtype="PCM_16"
file=params.save_wave_dir / f"{cut_ids[i]}_gt.wav",
data=audio[i].numpy(),
samplerate=params.sampling_rate,
subtype="PCM_16",
)

num_cuts += batch_size
Expand Down

0 comments on commit 19f386c

Please sign in to comment.