Practical overview
When it fits
Use Fastdiff when you need an adaptable, locally run implementation for speech synthesis or vocoding and can manage its Python dependencies and model inputs.
Who it is for
- Researchers experimenting with conditional diffusion for speech synthesis.
- Developers building self-hosted text-to-speech or neural-vocoder pipelines.
- Teams that need to generate speech from text, WAV inputs or mel-spectrograms using repository code.
Documented uses
- Generate WAV speech from text using a supported text-to-speech model and Fastdiff checkpoint.
- Apply Fastdiff as a neural vocoder to Tacotron output or other generated mel-spectrograms.
- Run inference from WAV files.
- Prepare a dataset for a Fastdiff training workflow.
Requirements & limits
The repository provides code and pretrained models for local use; it does not document a hosted Fastdiff service or API.
- The repository identifies PyTorch, librosa and NATSpeech as dependencies.
- The custom-dataset instructions specify NVIDIA GPU, CUDA and cuDNN.
- For text-to-speech inference, the demo documents Portaspeech, FastSpeech 2 and DiffSpeech model choices.
- The reverse-sampling setting N trades off speed against quality.
- A mismatch between acoustic-model and vocoder mel preprocessing can produce noisy output.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Generate speech from text with the Fastdiff demo
Use a pretrained LJSpeech checkpoint and a supported text-to-speech model to generate a WAV file.
Before you start
- Fastdiff repository and its listed dependencies: PyTorch, librosa and NATSpeech.
- An LJSpeech checkpoint.
- A local GPU environment; the command example uses CUDA_VISIBLE_DEVICES.
Steps
Download the LJSpeech checkpoint and place it at checkpoint/FastDiff/model_ckpt_steps_*.ckpt.
Set the input text and choose a model index: 0 for Portaspeech, 1 for FastSpeech 2 or 2 for DiffSpeech.
Choose N, the reverse-sampling setting that trades off speed and quality.
Run CUDA_VISIBLE_DEVICES=$GPU python egs/demo_tts.py --N $N --text $text --model $model_index.
Expected outcome
The generated WAV file is saved in checkpoints/FastDiff/ by default.
Guide limitations
- The repository recommends fine-tuning Fastdiff for better quality.
- The example uses a pretrained LJSpeech checkpoint.
Prepare a custom dataset for Fastdiff training
Configure and preprocess a dataset for the repository's training workflow.
Before you start
- A local machine with an NVIDIA GPU, CUDA and cuDNN.
- A dataset structured to match the repository's audio pre-alignment scripts, or a custom pre_align.py implementation.
- A Fastdiff configuration file and configured audio preprocessing settings.
Steps
Set raw_data_dir, processed_data_dir and binary_data_dir in the configuration file.
For a custom dataset, set audio preprocessing options in modules/FastDiff/config/base.yaml.
Place the dataset in raw_data_dir.
Run python data_gen/tts/bin/pre_align.py --config $path/to/config, then run CUDA_VISIBLE_DEVICES=$GPU python data_gen/tts/bin/binarize.py --config $path/to/config.
Expected outcome
The data is prepared and binarized for the subsequent model-training workflow.
Guide limitations
- Custom dataset layouts may require rewriting pre_align.py.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 14 November 2026
- Original website title
- Rongjiehuang/FastDiff · Official homepage title · retained in its source language

