Practical overview
When it fits
Use WaveGrad as the waveform-synthesis stage after a speech pipeline has generated a log-scaled Mel spectrogram, or when building and training a custom neural vocoder.
Who it is for
- Speech-generation developers whose pipelines already produce log-scaled Mel spectrograms.
- Researchers or engineers training a vocoder on 16-bit mono WAV datasets.
- Developers who need local command-line or Python-based waveform synthesis.
Documented uses
- Convert a Mel spectrogram into synthesized waveform audio.
- Use the pretrained 24 kHz model for inference.
- Train a custom vocoder from preprocessed WAV data.
- Search for a dataset-specific noise schedule to reduce inference iterations.
Requirements & limits
The repository is public and lists an Apache-2.0 license. It documents installation through pip or from GitHub; the pretrained model is provided as a 24 kHz download.
- The input to inference is a log-scaled Mel spectrogram; the API expects shape [N,C,W].
- The CLI writes WAV output, while the Python API returns audio as a GPU tensor and a sample rate.
- The default schedule uses 1,000 iterations and runs slower than real time; faster-than-real-time synthesis depends on finding a suitable schedule for the dataset.
- The documented training dataset uses 16-bit mono WAV files, with a default 22 kHz sample rate.
- The repository includes a 24 kHz pretrained model, while its training instructions default to 22 kHz.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Run CLI inference from a spectrogram
Convert a spectrogram file into WAV output with the documented command-line interface.
Before you start
- Install WaveGrad with pip or from the GitHub repository.
- Have a model directory and a spectrogram file; the README does not specify every accepted spectrogram-file format.
Steps
Install WaveGrad using the command below or clone the repository and run the command below.
pip install wavegradpip install .Run the command below, substituting the model directory and spectrogram path.
python -m wavegrad.inference /path/to/model /path/to/spectrogram -o output.wav
Expected outcome
The CLI is configured to write synthesized audio to the specified WAV output path.
Guide limitations
- The README does not detail all accepted spectrogram file formats.
- The default schedule uses 1,000 refinement iterations and runs slower than real time.
Prepare WAV data and start custom training
Preprocess a WAV dataset and launch WaveGrad training.
Before you start
- Install WaveGrad with pip or from the GitHub repository.
- Prepare a dataset of 16-bit mono WAV files; directory structure may vary. The default sample rate is 22 kHz.
Steps
Run the command below on the dataset directory.
python -m wavegrad.preprocess /path/to/dir/containing/wavsRun the command below to start training.
python -m wavegrad /path/to/model/dir /path/to/dir/containing/wavsOptionally monitor training with
tensorboard --logdir /path/to/model/dir --bind_allin another shell.
Expected outcome
The documented workflow preprocesses the WAV dataset and starts training into the selected model directory.
Guide limitations
- Changing the default sample rate requires editing
params.py. - The README gives an expected training progress estimate, not a guaranteed completion time or outcome.
Compare options for Model inference and serving
These projects document a common task and share a project role. This is a source-based comparison, not an execution benchmark or a guarantee of interchangeability.
| Project | Documented purpose | Platform | Access and requirements |
|---|---|---|---|
| Wavegrad — lmnt-com | Convert a Mel spectrogram into synthesized waveform audio. | Linux, macOS, Windows, CLI, Server, Self-hosted | The repository is public and lists an Apache-2.0 license. It documents installation through pip or from GitHub; the pretrained model is provided as a 24 kHz download. |
| Diffgan Tts | Generate a speech utterance from a text string using a pretrained checkpoint. | Linux, Server, Self-hosted | |
| Wavegrad | Generate audio waveforms from mel-spectrograms through command-line or notebook inference. | Linux, Windows, macOS, Self-hosted | The implementation is available in a public GitHub repository under the BSD-3-Clause license. |
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 20 November 2026
- Original website title
- lmnt-com/wavegrad · Official homepage title · retained in its source language

