rfwave
rfwave copied to clipboard
RFWave: Multi-band Rectified Flow for Audio Waveform Reconstruction.
TL;DR
RFWave is a diffusion-based vocoder. It can generate high-quality audio waveforms from Mel-spectrograms at a speed that is 90 times quicker than real-time on an Nvidia 4090.
Abstract
Recent advancements in generative modeling have led to significant progress in audio waveform reconstruction from diverse representations. Although diffusion models have been used for reconstructing audio waveforms, they tend to exhibit latency issues because they operate at the level of individual sample points and require a relatively large number of sampling steps. In this study, we introduce RFWave, a novel multi-band Rectified Flow approach that reconstructs high-fidelity audio waveforms from Mel-spectrograms. RFWave is distinctive for generating complex spectrograms and operating at the frame level, processing all subbands concurrently to enhance efficiency. Thanks to Rectified Flow, which aims for a flat transport trajectory, RFWave requires only 10 sampling steps. Empirical evaluations demonstrate that RFWave achieves exceptional reconstruction quality and superior computational efficiency, capable of generating audio at a speed 90 times faster than real-time.
Usage
Setup
- Install the requirements.
- Download and extract the LJ Speech dataset
- Update the wav paths in filelists
sed -i -- 's,LJSPEECH_PATH,ljs_dataset_folder,g' LJSpeech/*.filelist - Update the
filelist_pathin configs/*.yaml.
Vocoder
- Train a vocoder
python3 train.py -c configs/rfwave.yaml - Test a trained vocoder with
inference_voc.py
Encodec Decoder
- Train an Encodec Decoder
python3 train.py -c configs/rfwave-encodec.yaml
Text to Speech
- Download the alignment from the SyntaSpeech repo
- Convert the alignments and build a phoneset with
scripts/ljspeech_synta.py - Modify the
filelist_pathandphonesetpath inconfigs/rfwave-dur.yamlandconfigs/rfwave-tts-ctx.yaml - Train a duration model
python3 train.py -c configs/rfwave-dur.yaml - Train an acoustic model
python3 train.py -c configs/rfwave-tts-ctx.yaml - Test the trained model with
inference_tts.py
Pre-trained models
Coming soon
Thanks
This repository uses code from Vocos, audiocraft