Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yoyololicon/wavenet-like-vocoder
Basic wavenet and fftnet vocoder model.
https://github.com/yoyololicon/wavenet-like-vocoder
fftnet mel-spectrogram pytorch vocoder wavenet
Last synced: 21 days ago
JSON representation
Basic wavenet and fftnet vocoder model.
- Host: GitHub
- URL: https://github.com/yoyololicon/wavenet-like-vocoder
- Owner: yoyololicon
- Created: 2018-12-10T07:28:54.000Z (almost 6 years ago)
- Default Branch: master
- Last Pushed: 2022-02-07T13:16:50.000Z (almost 3 years ago)
- Last Synced: 2024-10-04T13:31:23.537Z (about 1 month ago)
- Topics: fftnet, mel-spectrogram, pytorch, vocoder, wavenet
- Language: Python
- Size: 46.9 KB
- Stars: 19
- Watchers: 3
- Forks: 2
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# WaveNet-like vocoder models
Basic implementations of WaveNet and modified FFTNet in PyTorch. The project structre is brought from [pytorch-template].
## Requirements
* NumPy
* SciPy
* PyTorch >= 0.4.1
* tqdm
* librosa## Quick Start
The code in this repo by default will train a WaveNet (or FFTNet) using 80-dimension mel-spectrogram with linear interpolation.
### Preprocess
Use `preprocess.py` to convert your wave files into mel-spectrograms.
```
python preprocess.py wave/files/folder -c config.json --out data
```The preprocessed data will be stored in `./data`.
You can change the configurations of "feature" in the `.json` file.### Train
```
python train.py -c config.json
```### Test
Use `preprocess.py` to convert a single wave file into mel-spectrogram feature.
```
python preprocess.py example.wav -c config.json --out test
```The result is stored in `test.npz`.
Then use the latest checkpoint file in the `./saved` folder to decoded `test.npz` back to waveform.
The generating process will run on gpu if you add `--cuda`.```
python test.py test.npz outfile.wav -r saved/your-model-name/XXXX_XXXXXX/checkpoint-stepXXXXX.pth --cuda
```That's it. Other instructions and advanced usage can be found in [pytorch-template], I didn't change too much of the whole structure.
## Customization
I add a new folder `feature` which is different from [pytorch-template].
To use other feature like mfcc instead of mel-spectrogram, you can add your own function in `./feature/features.py` with similar arguments style of `get_logmel()`.Other customization method can be found in [pytorch-template].
[pytorch-template]: https://github.com/victoresque/pytorch-template
## Fast inference
In `test.py` I implement fast-wavenet generation process in a very naive way. Use `fast_inference.py` you can get a huge speed up (CPU only).
The speed is around 1500 samples/s on FFTNet and 300 samples/s on WaveNet.