Open-source project
ibab/tensorflow-wavenet avatar
ibab/tensorflow-wavenet

tensorflow-wavenet: A 2017 WaveNet Port That Still Teaches the Architecture

GitHub describes it as A TensorFlow implementation of DeepMind's WaveNet paper. The repository metadata lists Python as its primary language. The metadata lists the MIT license. This article stays within the project description and details documented in the GitHub repository README.

5,423 stars1,262 forksPythonMIT

At a glance

What is it?
ibab/tensorflow-wavenet is an MIT-licensed TensorFlow implementation of DeepMind's WaveNet paper, aimed at engineers who want to train and generate raw audio waveforms. It is a faithful but dated port, with global conditioning for speaker IDs and fast generation, but it has clear limitations for modern use.
Who is it for?
Adopt tensorflow-wavenet if you are learning the WaveNet architecture or need a minimal, readable reference implementation for research or education, and you can work with TensorFlow 1.x and Python 2.7/3.5. Do not use it for production audio synthesis or for new projects expecting modern TensorFlow 2.x support.
Can I use it commercially?
Yes. MIT is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Probably not. The repository last received commits 39 months ago, on July 12, 2023.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 22, 2026, and from our analysis. They are not legal advice.

From daily snapshots

Star history

  • ibab/tensorflow-wavenet5,423 ★ · -5
Star history
Repository2026-08-132026-10-22
ibab/tensorflow-wavenet5.4k5.4k

-5 Stars in the last 70 days, measured from the daily GitHub snapshot. Compare with other projects

Editorial analysis

What This Implementation Actually Solves

The repository addresses a specific gap: turning the WaveNet paper into runnable code. WaveNet generates raw audio waveforms sample by sample, modeling the conditional probability of the next sample given all previous ones. For engineers and researchers in 2017, the paper was influential but not easy to reproduce. This implementation gives you a training script, a generation script, and a model definition in wavenet/model.py. It is for people who want to study the architecture, experiment with audio generation on small corpora, or build a baseline for text-to-speech research. It is not a product. The README is explicit that it is a TensorFlow implementation, and the code is structured for clarity rather than deployment. If you need a drop-in audio generator, this is the wrong starting point.

The Data Flow: From WAV to One-Hot and Back

The pipeline is described in the README and visible in the repository layout. Audio is preprocessed and quantized to a fixed integer range. Those integer amplitudes are one-hot encoded into a tensor of shape (num_samples, num_channels). A convolutional layer that only accesses current and previous inputs reduces the channel dimension. Then the core is a stack of causal dilated layers, each a dilated convolution with holes, restricted to current and past samples. The outputs of all layers are combined and extended back to the original channel count by dense postprocessing layers, followed by a softmax to produce a categorical distribution. The loss is cross-entropy between the output for each timestep and the input at the next timestep. This is a clean, textbook implementation. The causal constraint is the key architectural point: no future information leaks into the prediction. The README does not specify the exact dilation schedule or layer count, but the structure is faithful to the paper's design.

Getting It Running: Commands and Config

The README gives concrete steps. First, install dependencies with pip install -r requirements.txt, or requirements_gpu.txt for GPU support. TensorFlow 1.0.1 is the tested version, and librosa is required for audio I/O. Training is straightforward: python train.py --data_dir=corpus, where corpus is a directory of .wav files, collected recursively. Model parameters live in wavenet_params.json, and the README warns that these must stay identical between training and generation. For generation, you run python generate.py --samples 16000 logdir/train/2017-02-13T16-45-34/model.ckpt-80000, where the checkpoint path has no extension. The --samples flag controls how many audio samples to produce; 16000 equals one second by default. You can write the output to a .wav file with --wav_out_path. There is a test suite: pip install -r requirements_test.txt and ./ci/test.sh. These commands are real and verifiable from the README.

Global Conditioning: Speaker IDs and a Hard-Wired Assumption

Global conditioning is a notable feature. It lets you specify a speaker ID during training and generation, so the model can mimic a particular voice from the VCTK corpus. To enable it, you pass --gc_channels=32 to train.py, which sets the embedding size. The logic in train.py and audio_reader.py is hard-wired to VCTK's file naming pattern to infer the speaker ID. That is a real constraint. If you use a different corpus, you must modify the code. The README says it can be easily modified, but that is an assumption, not a guarantee. At generation time, you must supply --gc_channels, --gc_cardinality, and --gc_id. The cardinality is the total number of speakers, and the id selects which one to mimic. The example uses --gc_cardinality=377 because 376 is the largest speaker ID in VCTK. This works, but it means the model is coupled to a specific dataset's naming convention. For a general-purpose tool, that is a limitation.

Fast Generation: A Borrowed Optimization with a Cost

The repository includes fast generation by default, using an implementation from the Fast Wavenet repository. The README says this reduces generation time to a few minutes, though it does not specify for what length of audio. You can disable it with --fast_generation=false. The fast path is a caching mechanism for the dilated convolutions, avoiding recomputation of the same activations. This is a practical addition, but it is borrowed code, not original. The trade-off is complexity: if you want to understand the generation loop, the fast path adds indirection. The README links to Fast Wavenet for an explanation, so you are expected to go elsewhere for details. For engineers evaluating this project, the fast generation is a sign that the original author cared about usability, but it also means the core logic is not entirely self-contained.

What Is Missing and Where It Fails

The README is honest about missing features. There is no local conditioning on extra information, which would allow context stacks or controlling what speech is generated. That is a significant gap for text-to-speech applications, where you typically want to condition on phonemes or text. Without it, you can only generate unconditioned audio or speaker-conditioned audio via global conditioning. The project also depends on TensorFlow 1.0.1, which is obsolete. Modern TensorFlow 2.x has a different API, so this code will not run without substantial changes. The documentation mentions Python 2.7 and 3.5, both of which are end-of-life. If you are on a current system, you will likely face dependency conflicts. The repository has no recent releases and no indication of updates, so maintenance is effectively frozen. This is a case where the project is wrong for production but right for historical study.

Alternatives: What to Use Instead

The README lists related projects, including tex-wavenet for text generation and an image-wave... (truncated). A more direct alternative is the original Fast Wavenet repository, which this project uses for fast generation. Fast Wavenet takes a different approach: it focuses solely on efficient inference, providing a reusable module for causal dilated convolutions. In contrast, tensorflow-wavenet is a full training and generation pipeline. If you want to build a modern WaveNet, you would look at PyTorch implementations or TensorFlow 2.x ports, but those are not in this repository. The key difference is that tensorflow-wavenet is a faithful paper reproduction, while Fast Wavenet is an optimization layer. For a production system, you would need a maintained framework with local conditioning support, such as a TTS library. The choice depends on whether you need to learn the architecture or ship audio.

Maintenance and Licensing: What You Are Signing Up For

The project is MIT-licensed, which is permissive and allows commercial use, modification, and redistribution, with attribution. There is no legal advice here, but the license is a known quantity. The repository has no recent releases, no archived status, and no visible maintenance activity. The last push is unknown, but the code targets TensorFlow 1.0.1, which places it around 2017. This means you are adopting a static codebase. If you need to fix a bug or add a feature, you are on your own. The test suite exists, but it is tied to the old TensorFlow API. Upgrade cost is high: migrating to TensorFlow 2.x would require rewriting the model definition, the training loop, and the generation script. The README does not mention any roadmap or contribution guidelines. For a learning project, this is acceptable. For a long-term dependency, it is a risk.

Editorial conclusion

Adopt tensorflow-wavenet if you are learning the WaveNet architecture or need a minimal, readable reference implementation for research or education, and you can work with TensorFlow 1.x and Python 2.7/3.5. Do not use it for production audio synthesis or for new projects expecting modern TensorFlow 2.x support. Before committing, verify that your corpus has a flat .wav structure, that you can install the pinned dependencies, and that you accept the lack of local conditioning. The project is a snapshot of 2017 practice, not a maintained tool.

Frequently asked questions

How does the WaveNet architecture work in tensorflow-wavenet?

The waveform is quantized to a fixed integer range and one-hot encoded into a tensor of shape (num_samples, num_channels), then a stack of causal dilated layers, convolutions with holes that access only current and past samples, feeds dense postprocessing layers and a softmax that produces a categorical distribution. The implementation is in wavenet/model.py.

Which packages do I install to run tensorflow-wavenet?

Run pip install -r requirements.txt for the base packages, librosa>=0.5 and tensorflow>=1.0.0, or pip install -r requirements_gpu.txt for GPU support. Librosa handles reading and writing audio, and TensorFlow has to be installed before the training script runs.

How do I train tensorflow-wavenet on my own audio?

Point train.py at a directory with python train.py --data_dir=corpus, and the script collects every .wav file in it recursively. The project has mainly used the VCTK corpus, around 10.4GB with over a hundred speakers. python train.py --help prints the settings, and the model configuration lives in wavenet_params.json.

How do I generate audio from a tensorflow-wavenet checkpoint?

Pass the checkpoint prefix without its extension to generate.py, for example logdir/train/2017-02-13T16-45-34/model.ckpt-80000, and set the length with --samples, where 16000 is one second by default. Add --wav_out_path=generated.wav to write a file, or --save_every 2000 to write the in-progress waveform every n samples.

Can tensorflow-wavenet condition on anything besides the speaker id?

No. The README states there is no local conditioning on extra information, which would allow context stacks or controlling what speech is generated. Global conditioning covers mutually exclusive speaker categories only, and its logic in train.py and audio_reader.py expects the VCTK file naming pattern.

Official sources

  1. Official README
  2. Project repository
  3. README
  4. Releases
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/ibab-tensorflow-wavenet.svg)](https://hysenlabs.com/projects/ibab-tensorflow-wavenet)

Star history chart for your README

markdown
[![Star history](https://hysenlabs.com/chart/ibab-tensorflow-wavenet.svg)](https://hysenlabs.com/projects/ibab-tensorflow-wavenet)