FastSpeech2
FastSpeech2 copied to clipboard
Weird noise introduced by `prepare_align.py`
After data preprocessing using prepare_align.py, strange noise appears in the audio file.
The following figure is the spectrum of the noise in the audio file in the demo directory.

The problem was solved by using soundfile to save audio
Modify the file preprocessor/ljspeech.py:
# from scipy.io import wavfile
import soundfile as sf
# ...
wav = wav / max(abs(wav))
sf.write(
os.path.join(out_dir, speaker, "{}.wav".format(base_name)),
wav,
sampling_rate,
subtype='PCM_16'
)
# wav = wav / max(abs(wav)) * max_wav_value
# wavfile.write(
# os.path.join(out_dir, speaker, "{}.wav".format(base_name)),
# sampling_rate,
# wav.astype(np.int16),
# )