Downloads · 30 days
3.4M
6% of all-time downloads
charactr/vocos-mel-24khz
vocos-mel-24khz is a machine learning model from charactr. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as mit.
Audio samples | Paper [[abs]](https://arxiv.org/abs/2306.00814) [[pdf]](https://arxiv.org/pdf/2306.00814.pdf)
Downloads · 30 days
3.4M
6% of all-time downloads
All-time downloads
56.7M
Public
Repo size
163 MB
Likes
57
Trending 1
Click a slice to open those files.
.bin54.4 MB · 100%
From the Hugging Face model README
Audio samples | Paper [abs] [pdf]
Vocos is a fast neural vocoder designed to synthesize audio waveforms from acoustic features. Trained using a Generative Adversarial Network (GAN) objective, Vocos can generate waveforms in a single forward pass. Unlike other typical GAN-based vocoders, Vocos does not model audio samples in the time domain. Instead, it generates spectral coefficients, facilitating rapid audio reconstruction through inverse Fourier transform.
To use Vocos only in inference mode, install it using:
pip install vocos
If you wish to train the model, install it with additional dependencies:
pip install vocos[train]
import torch
from vocos import Vocos
vocos = Vocos.from_pretrained("charactr/vocos-mel-24khz")
mel = torch.randn(1, 100, 256) # B, C, T
audio = vocos.decode(mel)
Copy-synthesis from a file:
import torchaudio
y, sr = torchaudio.load(YOUR_AUDIO_FILE)
if y.size(0) > 1: # mix to mono
y = y.mean(dim=0, keepdim=True)
y = torchaudio.functional.resample(y, orig_freq=sr, new_freq=24000)
y_hat = vocos(y)
If this code contributes to your research, please cite our work:
@article{siuzdak2023vocos,
title={Vocos: Closing the gap between time-domain and Fourier-based neural vocoders for high-quality audio synthesis},
author={Siuzdak, Hubert},
journal={arXiv preprint arXiv:2306.00814},
year={2023}
}
The code in this repository is released under the MIT license.