Practical overview
When it fits
Use Diffwave when you have a conditioning spectrogram and need a speech waveform, or when you want the documented training workflow for a prepared mono WAV dataset.
Who it is for
- Developers who need a waveform-generation stage for spectrogram-based speech workflows.
- Python practitioners who want to call speech waveform inference programmatically.
- Researchers or developers preparing mono WAV data to train a speech synthesis model.
Documented uses
- Generate a speech waveform from a spectrogram using a pretrained model.
- Write generated audio to a WAV file through the command-line interface.
- Call waveform inference from Python and receive audio plus its sample rate.
- Preprocess mono WAV files and train a model.
Requirements & limits
The public repository identifies the project as open source under the Apache-2.0 license.
- The Python inference example expects spectrogram data in [N,C,W] format and returns audio in [N,T] format.
- Training data must consist of 16-bit mono WAV files; the default sample rate is 22.05 kHz.
- The documented CLI writes WAV output, while the Python interface returns a GPU tensor and sample rate.
- The README lists a 22.05 kHz pretrained model and reports a real-time factor of 0.87 for it.
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
Use the documented command-line interface to write a waveform as a WAV file.
Before you start
- Install the Diffwave package with pip or from the repository.
- Have a model directory and a spectrogram file available.
Steps
Install Diffwave using the repository's documented installation method.
Run the command below.
python -m diffwave.inference --fast /path/to/model /path/to/spectrogram -o output.wav
Expected outcome
The CLI writes the generated audio to the specified WAV output path.
Guide limitations
- The README does not specify a command for preparing or converting an input spectrogram.
Prepare a dataset and start model training
Preprocess a folder of qualifying WAV files and launch Diffwave training.
Before you start
- A directory containing 16-bit mono WAV files.
- A Python environment with Diffwave installed.
- The default training sample rate is 22.05 kHz; changing it requires editing params.py.
Steps
Run the command below.
python -m diffwave.preprocess /path/to/dir/containing/wavsStart training with the command below.
python -m diffwave /path/to/model/dir /path/to/dir/containing/wavsIn another shell, monitor progress with
tensorboard --logdir /path/to/model/dir --bind_all.
Expected outcome
Training runs using the prepared WAV directory, with progress available through TensorBoard.
Guide limitations
- The repository describes intelligible but noisy speech as an expected result at about 8,000 steps; this is not a guarantee of training quality.
- By default, the implementation uses as many GPUs as PyTorch reports through
torch.cuda.device_count().
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 5 November 2026
- Original website title
- lmnt-com/diffwave · Official homepage title · retained in its source language

