Skip to content
Switch branches/tags

Latest commit


Git stats


Failed to load latest commit information.
Latest commit message
Commit time

Conditional WaveGAN

Official implementation of CWaveGAN | paper | slides

Chae Young Lee, Anoop Toffy.

In this paper, we developed Conditional WaveGAN to synthesize speech / audio samples that are conditioned on class labels. The thus synthesized raw audio is used for improving the baseline ASR system.


Generative models are successfully used for image synthesis in the recent years. But when it comes to other modalities like audio, text, and etc, little progress has been made. Recent works focus on generating audio from a generative model in an unsupervised setting. We explore the possibility of using generative models conditioned on class labels.



Training can be done in both GPU and TPU settings. Both versions of code implement bias scaling method.


  • Tensorflow 1.x.x
  • Python 2.x, 3.x
  • tqdm


  1. Techsorflow Challenge Raw SC09
  2. TFRecord SC09

Data must assume the form of tf.Data.TFRecord. The label data must be in one hot encoded for concatenation based conditioning, whereas it must be simple integers for bias based conditioning. Thus, the code to make the TFRecord differs by the type of conditioning.

python3 \
	../sc09/train \
	../sc09_tf \
	--name train --labels \
	--ext wav \
	--fs 16000 \
	--nshards 128 \
	--slice_len 1

Training in GPU

To begin or resume training

python gpu/ train ./gpu/train \
	--data_dir ./data/customdataset

To log and monitor training

# saves checkpoints every 60 minutes
python gpu/ ./gpu/train 60

# generates preview audio files every time a checkpoint is saved
python gpu/ preview ./gpu/train

Note that the training directory for train, backup, and preview must be identical.

Training in TPU

Setting up TPU is explained here.

To begin or resume training

python tpu/

Create a bucket for backup checkpoints and name it [CKPT_BUCKET_NAME]-backup. To save the checkpoints every specified minutes while training

# save checkpoints every 60 minutes
python tpu/ gs://ckpt 60

To generate 20 preview audio samples with two per class

python tpu/

Synthesized audio samples (Demo)


  • Donahue, Chris, Julian McAuley, and Miller Puckette. "Synthesizing Audio with Generative Adversarial Networks." arXiv preprint arXiv:1802.04208 (2018). paper
  • Shen, Jonathan, et al. "Natural TTS synthesis by conditioning wavenet on mel spectrogram predictions." arXiv preprint arXiv:1712.05884 (2017). paper
  • Perez, Anthony, Chris Proctor, and Archa Jain. Style transfer for prosodic speech. Tech. Rep., Stanford University, 2017. paper
  • Goodfellow, Ian, et al. "Generative adversarial nets." Advances in neural information processing systems. 2014. paper
  • Salimans, Tim, et al. "Improved techniques for training gans." Advances in Neural Information Processing Systems. 2016. paper
  • Grinstein, Eric, et al. "Audio style transfer." arXiv preprint arXiv:1710.11385 (2017). paper
  • Pascual, Santiago, Antonio Bonafonte, and Joan Serra. "SEGAN: Speech enhancement generative adversarial network." arXiv preprint arXiv:1703.09452 (2017). paper
  • Yongcheng Jing, Yezhou Yang, Zunlei Feng, Jingwen Ye, Yizhou Yu, Mingli Song. "Neural Style Transfer: A Review" arXiv:1705.04058 (2017) paper
  • Van Den Oord, Aäron, et al. "Wavenet: A generative model for raw audio." CoRR abs/1609.03499 (2016). paper
  • Glow: Generative Flow with Invertible 1×1 Convolutions paper
  • Kingma, Diederik P., et al. "Semi-supervised learning with deep generative models." Advances in Neural Information Processing Systems. 2014. paper
  • Van Den Oord, Aäron, et al. "Wavenet: A generative model for raw audio." CoRR abs/1609.03499 (2016). paper



This project is licensed under the MIT License - see the LICENSE file for details


  • We used our baseline mode from waveGAN paper by Chris Donahue et al. (2018)
  title={Synthesizing Audio with Generative Adversarial Networks},
  author={Donahue, Chris and McAuley, Julian and Puckette, Miller},
  journal={arXiv preprint arXiv:1802.04208},
  • TPU Implementations are based on the DCGAN implemenatation released by Tensorflow Hub. link


  • Dr. Gue Jun Jung, Speech Recognition Tech, SK Telecom
  • Dr. Woo-Jin Han, Netmarble IGS
  • Google Mentors
  • Tensorflow Korea
  • Google

This was supported by Deep Learning Camp Jeju 2018 which was organized by TensorFlow Korea User Group.


Conditional WaveGAN: Generating audio samples conditioned on class labels




No releases published


No packages published