arxiv_db / papers /1802 /1802.04208.tex
taesiri's picture
Initial commit
8cf8144
raw
history blame
61 kB
\documentclass{article} \usepackage{iclr2019_conference,times}
\usepackage{amsmath,amsfonts,bm}
\newcommand{\figleft}{{\em (Left)}}
\newcommand{\figcenter}{{\em (Center)}}
\newcommand{\figright}{{\em (Right)}}
\newcommand{\figtop}{{\em (Top)}}
\newcommand{\figbottom}{{\em (Bottom)}}
\newcommand{\captiona}{{\em (a)}}
\newcommand{\captionb}{{\em (b)}}
\newcommand{\captionc}{{\em (c)}}
\newcommand{\captiond}{{\em (d)}}
\newcommand{\newterm}[1]{{\bf #1}}
\def\figref#1{figure~\ref{#1}}
\def\Figref#1{Figure~\ref{#1}}
\def\twofigref#1#2{figures \ref{#1} and \ref{#2}}
\def\quadfigref#1#2#3#4{figures \ref{#1}, \ref{#2}, \ref{#3} and \ref{#4}}
\def\secref#1{section~\ref{#1}}
\def\Secref#1{Section~\ref{#1}}
\def\twosecrefs#1#2{sections \ref{#1} and \ref{#2}}
\def\secrefs#1#2#3{sections \ref{#1}, \ref{#2} and \ref{#3}}
\def\eqref#1{equation~\ref{#1}}
\def\Eqref#1{Equation~\ref{#1}}
\def\plaineqref#1{\ref{#1}}
\def\chapref#1{chapter~\ref{#1}}
\def\Chapref#1{Chapter~\ref{#1}}
\def\rangechapref#1#2{chapters\ref{#1}--\ref{#2}}
\def\algref#1{algorithm~\ref{#1}}
\def\Algref#1{Algorithm~\ref{#1}}
\def\twoalgref#1#2{algorithms \ref{#1} and \ref{#2}}
\def\Twoalgref#1#2{Algorithms \ref{#1} and \ref{#2}}
\def\partref#1{part~\ref{#1}}
\def\Partref#1{Part~\ref{#1}}
\def\twopartref#1#2{parts \ref{#1} and \ref{#2}}
\def\ceil#1{\lceil #1 \rceil}
\def\floor#1{\lfloor #1 \rfloor}
\def\1{\bm{1}}
\newcommand{\train}{\mathcal{D}}
\newcommand{\valid}{\mathcal{D_{\mathrm{valid}}}}
\newcommand{\test}{\mathcal{D_{\mathrm{test}}}}
\def\eps{{\epsilon}}
\def\reta{{\textnormal{$\eta$}}}
\def\ra{{\textnormal{a}}}
\def\rb{{\textnormal{b}}}
\def\rc{{\textnormal{c}}}
\def\rd{{\textnormal{d}}}
\def\re{{\textnormal{e}}}
\def\rf{{\textnormal{f}}}
\def\rg{{\textnormal{g}}}
\def\rh{{\textnormal{h}}}
\def\ri{{\textnormal{i}}}
\def\rj{{\textnormal{j}}}
\def\rk{{\textnormal{k}}}
\def\rl{{\textnormal{l}}}
\def\rn{{\textnormal{n}}}
\def\ro{{\textnormal{o}}}
\def\rp{{\textnormal{p}}}
\def\rq{{\textnormal{q}}}
\def\rr{{\textnormal{r}}}
\def\rs{{\textnormal{s}}}
\def\rt{{\textnormal{t}}}
\def\ru{{\textnormal{u}}}
\def\rv{{\textnormal{v}}}
\def\rw{{\textnormal{w}}}
\def\rx{{\textnormal{x}}}
\def\ry{{\textnormal{y}}}
\def\rz{{\textnormal{z}}}
\def\rvepsilon{{\mathbf{\epsilon}}}
\def\rvtheta{{\mathbf{\theta}}}
\def\rva{{\mathbf{a}}}
\def\rvb{{\mathbf{b}}}
\def\rvc{{\mathbf{c}}}
\def\rvd{{\mathbf{d}}}
\def\rve{{\mathbf{e}}}
\def\rvf{{\mathbf{f}}}
\def\rvg{{\mathbf{g}}}
\def\rvh{{\mathbf{h}}}
\def\rvu{{\mathbf{i}}}
\def\rvj{{\mathbf{j}}}
\def\rvk{{\mathbf{k}}}
\def\rvl{{\mathbf{l}}}
\def\rvm{{\mathbf{m}}}
\def\rvn{{\mathbf{n}}}
\def\rvo{{\mathbf{o}}}
\def\rvp{{\mathbf{p}}}
\def\rvq{{\mathbf{q}}}
\def\rvr{{\mathbf{r}}}
\def\rvs{{\mathbf{s}}}
\def\rvt{{\mathbf{t}}}
\def\rvu{{\mathbf{u}}}
\def\rvv{{\mathbf{v}}}
\def\rvw{{\mathbf{w}}}
\def\rvx{{\mathbf{x}}}
\def\rvy{{\mathbf{y}}}
\def\rvz{{\mathbf{z}}}
\def\erva{{\textnormal{a}}}
\def\ervb{{\textnormal{b}}}
\def\ervc{{\textnormal{c}}}
\def\ervd{{\textnormal{d}}}
\def\erve{{\textnormal{e}}}
\def\ervf{{\textnormal{f}}}
\def\ervg{{\textnormal{g}}}
\def\ervh{{\textnormal{h}}}
\def\ervi{{\textnormal{i}}}
\def\ervj{{\textnormal{j}}}
\def\ervk{{\textnormal{k}}}
\def\ervl{{\textnormal{l}}}
\def\ervm{{\textnormal{m}}}
\def\ervn{{\textnormal{n}}}
\def\ervo{{\textnormal{o}}}
\def\ervp{{\textnormal{p}}}
\def\ervq{{\textnormal{q}}}
\def\ervr{{\textnormal{r}}}
\def\ervs{{\textnormal{s}}}
\def\ervt{{\textnormal{t}}}
\def\ervu{{\textnormal{u}}}
\def\ervv{{\textnormal{v}}}
\def\ervw{{\textnormal{w}}}
\def\ervx{{\textnormal{x}}}
\def\ervy{{\textnormal{y}}}
\def\ervz{{\textnormal{z}}}
\def\rmA{{\mathbf{A}}}
\def\rmB{{\mathbf{B}}}
\def\rmC{{\mathbf{C}}}
\def\rmD{{\mathbf{D}}}
\def\rmE{{\mathbf{E}}}
\def\rmF{{\mathbf{F}}}
\def\rmG{{\mathbf{G}}}
\def\rmH{{\mathbf{H}}}
\def\rmI{{\mathbf{I}}}
\def\rmJ{{\mathbf{J}}}
\def\rmK{{\mathbf{K}}}
\def\rmL{{\mathbf{L}}}
\def\rmM{{\mathbf{M}}}
\def\rmN{{\mathbf{N}}}
\def\rmO{{\mathbf{O}}}
\def\rmP{{\mathbf{P}}}
\def\rmQ{{\mathbf{Q}}}
\def\rmR{{\mathbf{R}}}
\def\rmS{{\mathbf{S}}}
\def\rmT{{\mathbf{T}}}
\def\rmU{{\mathbf{U}}}
\def\rmV{{\mathbf{V}}}
\def\rmW{{\mathbf{W}}}
\def\rmX{{\mathbf{X}}}
\def\rmY{{\mathbf{Y}}}
\def\rmZ{{\mathbf{Z}}}
\def\ermA{{\textnormal{A}}}
\def\ermB{{\textnormal{B}}}
\def\ermC{{\textnormal{C}}}
\def\ermD{{\textnormal{D}}}
\def\ermE{{\textnormal{E}}}
\def\ermF{{\textnormal{F}}}
\def\ermG{{\textnormal{G}}}
\def\ermH{{\textnormal{H}}}
\def\ermI{{\textnormal{I}}}
\def\ermJ{{\textnormal{J}}}
\def\ermK{{\textnormal{K}}}
\def\ermL{{\textnormal{L}}}
\def\ermM{{\textnormal{M}}}
\def\ermN{{\textnormal{N}}}
\def\ermO{{\textnormal{O}}}
\def\ermP{{\textnormal{P}}}
\def\ermQ{{\textnormal{Q}}}
\def\ermR{{\textnormal{R}}}
\def\ermS{{\textnormal{S}}}
\def\ermT{{\textnormal{T}}}
\def\ermU{{\textnormal{U}}}
\def\ermV{{\textnormal{V}}}
\def\ermW{{\textnormal{W}}}
\def\ermX{{\textnormal{X}}}
\def\ermY{{\textnormal{Y}}}
\def\ermZ{{\textnormal{Z}}}
\def\vzero{{\bm{0}}}
\def\vone{{\bm{1}}}
\def\vmu{{\bm{\mu}}}
\def\vtheta{{\bm{\theta}}}
\def\va{{\bm{a}}}
\def\vb{{\bm{b}}}
\def\vc{{\bm{c}}}
\def\vd{{\bm{d}}}
\def\ve{{\bm{e}}}
\def\vf{{\bm{f}}}
\def\vg{{\bm{g}}}
\def\vh{{\bm{h}}}
\def\vi{{\bm{i}}}
\def\vj{{\bm{j}}}
\def\vk{{\bm{k}}}
\def\vl{{\bm{l}}}
\def\vm{{\bm{m}}}
\def\vn{{\bm{n}}}
\def\vo{{\bm{o}}}
\def\vp{{\bm{p}}}
\def\vq{{\bm{q}}}
\def\vr{{\bm{r}}}
\def\vs{{\bm{s}}}
\def\vt{{\bm{t}}}
\def\vu{{\bm{u}}}
\def\vv{{\bm{v}}}
\def\vw{{\bm{w}}}
\def\vx{{\bm{x}}}
\def\vy{{\bm{y}}}
\def\vz{{\bm{z}}}
\def\evalpha{{\alpha}}
\def\evbeta{{\beta}}
\def\evepsilon{{\epsilon}}
\def\evlambda{{\lambda}}
\def\evomega{{\omega}}
\def\evmu{{\mu}}
\def\evpsi{{\psi}}
\def\evsigma{{\sigma}}
\def\evtheta{{\theta}}
\def\eva{{a}}
\def\evb{{b}}
\def\evc{{c}}
\def\evd{{d}}
\def\eve{{e}}
\def\evf{{f}}
\def\evg{{g}}
\def\evh{{h}}
\def\evi{{i}}
\def\evj{{j}}
\def\evk{{k}}
\def\evl{{l}}
\def\evm{{m}}
\def\evn{{n}}
\def\evo{{o}}
\def\evp{{p}}
\def\evq{{q}}
\def\evr{{r}}
\def\evs{{s}}
\def\evt{{t}}
\def\evu{{u}}
\def\evv{{v}}
\def\evw{{w}}
\def\evx{{x}}
\def\evy{{y}}
\def\evz{{z}}
\def\mA{{\bm{A}}}
\def\mB{{\bm{B}}}
\def\mC{{\bm{C}}}
\def\mD{{\bm{D}}}
\def\mE{{\bm{E}}}
\def\mF{{\bm{F}}}
\def\mG{{\bm{G}}}
\def\mH{{\bm{H}}}
\def\mI{{\bm{I}}}
\def\mJ{{\bm{J}}}
\def\mK{{\bm{K}}}
\def\mL{{\bm{L}}}
\def\mM{{\bm{M}}}
\def\mN{{\bm{N}}}
\def\mO{{\bm{O}}}
\def\mP{{\bm{P}}}
\def\mQ{{\bm{Q}}}
\def\mR{{\bm{R}}}
\def\mS{{\bm{S}}}
\def\mT{{\bm{T}}}
\def\mU{{\bm{U}}}
\def\mV{{\bm{V}}}
\def\mW{{\bm{W}}}
\def\mX{{\bm{X}}}
\def\mY{{\bm{Y}}}
\def\mZ{{\bm{Z}}}
\def\mBeta{{\bm{\beta}}}
\def\mPhi{{\bm{\Phi}}}
\def\mLambda{{\bm{\Lambda}}}
\def\mSigma{{\bm{\Sigma}}}
\DeclareMathAlphabet{\mathsfit}{\encodingdefault}{\sfdefault}{m}{sl}
\SetMathAlphabet{\mathsfit}{bold}{\encodingdefault}{\sfdefault}{bx}{n}
\newcommand{\tens}[1]{\bm{\mathsfit{#1}}}
\def\tA{{\tens{A}}}
\def\tB{{\tens{B}}}
\def\tC{{\tens{C}}}
\def\tD{{\tens{D}}}
\def\tE{{\tens{E}}}
\def\tF{{\tens{F}}}
\def\tG{{\tens{G}}}
\def\tH{{\tens{H}}}
\def\tI{{\tens{I}}}
\def\tJ{{\tens{J}}}
\def\tK{{\tens{K}}}
\def\tL{{\tens{L}}}
\def\tM{{\tens{M}}}
\def\tN{{\tens{N}}}
\def\tO{{\tens{O}}}
\def\tP{{\tens{P}}}
\def\tQ{{\tens{Q}}}
\def\tR{{\tens{R}}}
\def\tS{{\tens{S}}}
\def\tT{{\tens{T}}}
\def\tU{{\tens{U}}}
\def\tV{{\tens{V}}}
\def\tW{{\tens{W}}}
\def\tX{{\tens{X}}}
\def\tY{{\tens{Y}}}
\def\tZ{{\tens{Z}}}
\def\gA{{\mathcal{A}}}
\def\gB{{\mathcal{B}}}
\def\gC{{\mathcal{C}}}
\def\gD{{\mathcal{D}}}
\def\gE{{\mathcal{E}}}
\def\gF{{\mathcal{F}}}
\def\gG{{\mathcal{G}}}
\def\gH{{\mathcal{H}}}
\def\gI{{\mathcal{I}}}
\def\gJ{{\mathcal{J}}}
\def\gK{{\mathcal{K}}}
\def\gL{{\mathcal{L}}}
\def\gM{{\mathcal{M}}}
\def\gN{{\mathcal{N}}}
\def\gO{{\mathcal{O}}}
\def\gP{{\mathcal{P}}}
\def\gQ{{\mathcal{Q}}}
\def\gR{{\mathcal{R}}}
\def\gS{{\mathcal{S}}}
\def\gT{{\mathcal{T}}}
\def\gU{{\mathcal{U}}}
\def\gV{{\mathcal{V}}}
\def\gW{{\mathcal{W}}}
\def\gX{{\mathcal{X}}}
\def\gY{{\mathcal{Y}}}
\def\gZ{{\mathcal{Z}}}
\def\sA{{\mathbb{A}}}
\def\sB{{\mathbb{B}}}
\def\sC{{\mathbb{C}}}
\def\sD{{\mathbb{D}}}
\def\sF{{\mathbb{F}}}
\def\sG{{\mathbb{G}}}
\def\sH{{\mathbb{H}}}
\def\sI{{\mathbb{I}}}
\def\sJ{{\mathbb{J}}}
\def\sK{{\mathbb{K}}}
\def\sL{{\mathbb{L}}}
\def\sM{{\mathbb{M}}}
\def\sN{{\mathbb{N}}}
\def\sO{{\mathbb{O}}}
\def\sP{{\mathbb{P}}}
\def\sQ{{\mathbb{Q}}}
\def\sR{{\mathbb{R}}}
\def\sS{{\mathbb{S}}}
\def\sT{{\mathbb{T}}}
\def\sU{{\mathbb{U}}}
\def\sV{{\mathbb{V}}}
\def\sW{{\mathbb{W}}}
\def\sX{{\mathbb{X}}}
\def\sY{{\mathbb{Y}}}
\def\sZ{{\mathbb{Z}}}
\def\emLambda{{\Lambda}}
\def\emA{{A}}
\def\emB{{B}}
\def\emC{{C}}
\def\emD{{D}}
\def\emE{{E}}
\def\emF{{F}}
\def\emG{{G}}
\def\emH{{H}}
\def\emI{{I}}
\def\emJ{{J}}
\def\emK{{K}}
\def\emL{{L}}
\def\emM{{M}}
\def\emN{{N}}
\def\emO{{O}}
\def\emP{{P}}
\def\emQ{{Q}}
\def\emR{{R}}
\def\emS{{S}}
\def\emT{{T}}
\def\emU{{U}}
\def\emV{{V}}
\def\emW{{W}}
\def\emX{{X}}
\def\emY{{Y}}
\def\emZ{{Z}}
\def\emSigma{{\Sigma}}
\newcommand{\etens}[1]{\mathsfit{#1}}
\def\etLambda{{\etens{\Lambda}}}
\def\etA{{\etens{A}}}
\def\etB{{\etens{B}}}
\def\etC{{\etens{C}}}
\def\etD{{\etens{D}}}
\def\etE{{\etens{E}}}
\def\etF{{\etens{F}}}
\def\etG{{\etens{G}}}
\def\etH{{\etens{H}}}
\def\etI{{\etens{I}}}
\def\etJ{{\etens{J}}}
\def\etK{{\etens{K}}}
\def\etL{{\etens{L}}}
\def\etM{{\etens{M}}}
\def\etN{{\etens{N}}}
\def\etO{{\etens{O}}}
\def\etP{{\etens{P}}}
\def\etQ{{\etens{Q}}}
\def\etR{{\etens{R}}}
\def\etS{{\etens{S}}}
\def\etT{{\etens{T}}}
\def\etU{{\etens{U}}}
\def\etV{{\etens{V}}}
\def\etW{{\etens{W}}}
\def\etX{{\etens{X}}}
\def\etY{{\etens{Y}}}
\def\etZ{{\etens{Z}}}
\newcommand{\pdata}{p_{\rm{data}}}
\newcommand{\ptrain}{\hat{p}_{\rm{data}}}
\newcommand{\Ptrain}{\hat{P}_{\rm{data}}}
\newcommand{\pmodel}{p_{\rm{model}}}
\newcommand{\Pmodel}{P_{\rm{model}}}
\newcommand{\ptildemodel}{\tilde{p}_{\rm{model}}}
\newcommand{\pencode}{p_{\rm{encoder}}}
\newcommand{\pdecode}{p_{\rm{decoder}}}
\newcommand{\precons}{p_{\rm{reconstruct}}}
\newcommand{\laplace}{\mathrm{Laplace}}
\newcommand{\E}{\mathbb{E}}
\newcommand{\Ls}{\mathcal{L}}
\newcommand{\R}{\mathbb{R}}
\newcommand{\emp}{\tilde{p}}
\newcommand{\lr}{\alpha}
\newcommand{\reg}{\lambda}
\newcommand{\rect}{\mathrm{rectifier}}
\newcommand{\softmax}{\mathrm{softmax}}
\newcommand{\sigmoid}{\sigma}
\newcommand{\softplus}{\zeta}
\newcommand{\KL}{D_{\mathrm{KL}}}
\newcommand{\Var}{\mathrm{Var}}
\newcommand{\standarderror}{\mathrm{SE}}
\newcommand{\Cov}{\mathrm{Cov}}
\newcommand{\normlzero}{L^0}
\newcommand{\normlone}{L^1}
\newcommand{\normltwo}{L^2}
\newcommand{\normlp}{L^p}
\newcommand{\normmax}{L^\infty}
\newcommand{\parents}{Pa}
\DeclareMathOperator*{\argmax}{arg\,max}
\DeclareMathOperator*{\argmin}{arg\,min}
\DeclareMathOperator{\sign}{sign}
\DeclareMathOperator{\Tr}{Tr}
\let\ab\allowbreak
\usepackage{hyperref}
\usepackage{url}
\usepackage{booktabs}
\usepackage{bm}
\usepackage{siunitx}
\usepackage{graphicx}
\usepackage{amsfonts}
\usepackage{amsmath}
\usepackage{mathtools}
\usepackage{wrapfig}
\newcommand{\httplink}[1]{\href{http://#1}{\nolinkurl{#1}}}
\newcommand{\httpslink}[1]{\href{https://#1}{\nolinkurl{#1}}}
\newcommand\blfootnote[1]{\begingroup
\renewcommand\thefootnote{}\footnote{#1}\addtocounter{footnote}{-1}\endgroup
}
\title{Adversarial Audio Synthesis}
\author{Chris Donahue \\
Department of Music \\
UC San Diego \\
\texttt{cdonahue@ucsd.edu}
\And
Julian McAuley \\
Department of Computer Science \\
UC San Diego \\
\texttt{jmcauley@eng.ucsd.edu}
\And
Miller Puckette \\
Department of Music \\
UC San Diego \\
\texttt{msp@ucsd.edu}
}
\newcommand{\fix}{\marginpar{FIX}}
\newcommand{\new}{\marginpar{NEW}}
\iclrfinalcopy \begin{document}
\maketitle
\begin{abstract}
Audio signals are sampled at high temporal resolutions, and learning to synthesize audio requires capturing structure across a range of timescales. Generative adversarial networks (GANs) have seen wide success at generating images that are both locally and globally coherent, but they have seen little application to audio generation. In this paper we introduce WaveGAN, a first attempt at applying GANs to unsupervised synthesis of raw-waveform audio. WaveGAN is capable of synthesizing one second slices of audio waveforms with global coherence, suitable for sound effect generation. Our experiments demonstrate that---without labels---WaveGAN learns to produce intelligible words when trained on a small-vocabulary speech dataset, and can also synthesize audio from other domains such as drums, bird vocalizations, and piano. We compare WaveGAN to a method which applies GANs designed for image generation on image-like audio feature representations, finding both approaches to be promising.
\end{abstract}
\section{Introduction}
Synthesizing audio for specific domains has many practical applications in creative sound design for music and film.
Musicians and Foley artists scour large databases of sound effects to find particular audio recordings suitable for specific scenarios.
This strategy is painstaking
and may result in a negative outcome if the ideal sound effect does not exist in the library.
A better approach might allow a sound artist to explore a compact \emph{latent space} of audio,
taking broad steps to find the types of sounds they are looking for (e.g.~footsteps) and making small adjustments to latent variables to fine-tune (e.g.~a large boot lands on a gravel path).
However,
audio signals have high temporal resolution,
and
strategies that learn such a representation
must perform effectively in high dimensions.
Generative Adversarial Networks (GANs)~\citep{goodfellow2014generative} are one such unsupervised strategy for mapping low-dimensional latent vectors to high-dimensional data.
The potential advantages of GAN-based approaches to audio synthesis are numerous.
Firstly, GANs could be useful for data augmentation~\citep{shrivastava2017learning} in data-hungry speech recognition systems.
Secondly, GANs could enable rapid and straightforward sampling of large amounts of audio.
Furthermore, while the usefulness of generating static images with GANs is arguable,
there are many applications (e.g.~Foley) for which generating sound effects is immediately useful.
But despite their increasing fidelity at synthesizing images~\citep{radford2015unsupervised,berthelot2017began,karras2017progressive},
GANs have yet to be demonstrated capable of synthesizing audio in an unsupervised setting.
A na\"ive solution for applying image-generating GANs to audio would be to operate them on image-like \emph{spectrograms}, i.e.,~time-frequency representations of audio.
This practice of bootstrapping image recognition algorithms for audio tasks is commonplace in the discriminative setting~\citep{hershey2017cnn}.
In the generative setting however,
this approach is problematic as the most perceptually-informed spectrograms are non-invertible,
and hence cannot be listened to without
lossy
estimations~\citep{griffin1984signal} or learned inversion models~\citep{shen2017natural}.
Recent work~\citep{oord2016wavenet,mehri2016samplernn} has shown that neural networks
can be trained with autoregression to operate on \emph{raw audio}.
Such approaches are attractive as they dispense with engineered feature representations.
However,
unlike with GANs,
the autoregressive setting results in slow generation as output audio samples must be fed back into the model one at a time.
In this work,
we investigate both waveform and spectrogram strategies for generating one-second slices of audio with GANs.\footnote{Sound examples: \httpslink{chrisdonahue.com/wavegan_examples} \\
\hspace*{5mm} Drum demo: \httpslink{chrisdonahue.com/wavegan} \\
\hspace*{5mm} Generation with pre-trained models: \httpslink{bit.ly/2G8NWpi} \\
\hspace*{5mm} Training code: \httpslink{github.com/chrisdonahue/wavegan}}
For
our spectrogram approach (SpecGAN),
we first design a spectrogram representation that allows for approximate inversion,
and bootstrap the two-dimensional deep convolutional GAN (DCGAN) method~\citep{radford2015unsupervised} to operate on these spectrograms.
In WaveGAN,
our waveform approach,
we flatten the DCGAN architecture to operate in one dimension,
resulting in a model with the same number of parameters and numerical operations as its two-dimensional analog.
With WaveGAN,
we provide both a starting point for practical audio synthesis with GANs
and a recipe for modifying other image generation methods to operate on waveforms.
We primarily envisage our method being applied to the generation of short sound effects suitable for use in music and film.
For example, we trained a WaveGAN on drums, resulting in a procedural drum machine designed to assist electronic musicians
(demo \httpslink{chrisdonahue.com/wavegan}).
However, human evaluation for such domain-specific tasks would require expert listeners.
Therefore,
we also consider a speech benchmark,
facilitating straightforward assessment by human annotators.
Specifically, we explore a task where success can easily be judged by any English speaker:
generating examples of spoken digits ``zero'' through ``nine''.
Though our evaluation focuses on a speech generation task, we note that it is \emph{not} our goal to develop a text-to-speech synthesizer.
Instead, our investigation concerns whether unsupervised strategies can learn global structure (e.g.~words in speech data) implicit in high-dimensional audio signals without conditioning.
Our experiments on speech demonstrate that both WaveGAN and SpecGAN can generate spoken digits that are intelligible to humans.
On criteria of sound quality and speaker diversity,
human judges indicate a preference for the audio generated by WaveGAN compared to that from SpecGAN.
\section{GAN Preliminaries}
GANs learn mappings from low-dimensional latent vectors $\bm{z} \in \mathcal{Z}$,
i.i.d. samples from known prior $P_{Z}$,
to points in the space of natural data $\mathcal{X}$.
In their original formulation~\citep{goodfellow2014generative},
a generator $G : \mathcal{Z} \mapsto \mathcal{X}$
is pitted against a discriminator
$D : \mathcal{X} \mapsto [0, 1]$ in a two-player minimax game.
$G$ is trained to minimize the following value function,
while $D$ is trained to maximize it:
\begin{equation}
\label{eq:gan}
V(D, G) = \mathbb{E}_{\bm{x} \sim P_X}[\log D(\bm{x})] + \mathbb{E}_{\bm{z} \sim P_Z}[\log (1 - D(G(\bm{z})))].
\end{equation}
In other words,
$D$ is trained to determine if an example is real or fake, and
$G$ is trained to fool the discriminator into thinking its output is real.
\citet{goodfellow2014generative} demonstrate that their proposed training algorithm for Equation~\ref{eq:gan}
equates to minimizing the Jensen-Shannon divergence between
$P_{X}$, the data distribution,
and $P_{G}$, the implicit distribution of the generator when $\bm{z} \sim P_{Z}$.
In this original formulation, GANs are notoriously difficult to train,
and prone to catastrophic failure cases.
Instead of Jensen-Shannon divergence, \citet{arjovsky2017wasserstein} suggest minimizing the smoother Wasserstein-1 distance between generated and data distributions
\begin{equation}
\label{eq:w1}
W(P_X, P_G) = \sup_{\|f\|_L \leq 1} \mathbb{E}_{x \sim P_X}
[f(x)] - \mathbb{E}_{x \sim P_G}[f(x)]
\end{equation}
where $\|f\|_L \leq 1 : \mathcal{X} \mapsto \mathbb{R}$ is the family of functions that are $1$-Lipschitz.
To minimize Wasserstein distance,
they suggest a GAN training algorithm (WGAN),
similar to that of \citet{goodfellow2014generative},
for the following value function:
\begin{equation}
\label{eq:wgan}
V_{\text{WGAN}}(D_w, G) = \mathbb{E}_{\bm{x} \sim P_X}[D_w(\bm{x})]
- \mathbb{E}_{\bm{z} \sim P_Z}[D_w(G(\bm{z}))].
\end{equation}
With this formulation,
$D_{w} : \mathcal{X} \mapsto \mathbb{R}$ is not trained to identify examples as real or fake,
but instead is trained as a function that assists in computing the Wasserstein distance.
\citet{arjovsky2017wasserstein} suggest weight clipping as a means of enforcing that $D_{w}$ is 1-Lipschitz.
As an alternative strategy,
\citet{gulrajani2017improved} replace weight clipping
with a gradient penalty (WGAN-GP) that also enforces the constraint.
They demonstrate that their WGAN-GP strategy can successfully train a variety of model configurations where other GAN losses fail.
\section{WaveGAN}
We motivate our design choices for WaveGAN by first highlighting the different types of structure found in audio versus images.
\subsection{Intrinsic differences between audio and images}
\label{sec:a2i}
\begin{figure}[t]
\begin{center}
\includegraphics[width=0.5\linewidth]{figures/components_hor.pdf}
\end{center}
\caption{First eight principal components for $5$x$5$ patches from natural images (\textbf{left}) versus those of length-$25$ audio slices from speech (\textbf{right}).
Periodic patterns are unusual in natural images but a fundamental structure in audio.
}
\label{fig:pca}
\end{figure}
One way to illustrate the differences between audio and images is by examining the axes along which these types of data vary most substantially, i.e.~by principal component analysis.
In Figure~\ref{fig:pca},
we show the first eight principal components for patches from natural images and slices from speech.
While the principal components of images
generally capture intensity, gradient, and edge characteristics,
those from audio
form a periodic basis that decompose the audio into constituent frequency bands.
In general,
natural audio signals are more likely to exhibit periodicity than natural images.
As a consequence, correlations across large windows are commonplace in audio.
For example, in a waveform sampled at \SI{16}{\kilo\hertz},
a \SI{440}{\hertz} sinusoid (the musical note A$4$) takes over $36$ samples to complete a single cycle.
This suggests that filters with larger receptive fields are needed to process raw audio.
This same intuition motivated \citet{oord2016wavenet} in their design of WaveNet,
which uses dilated convolutions to exponentially increase the model's effective receptive field with linear increase in layer depth.
\subsection{WaveGAN architecture}
\begin{figure*}[t!]
\begin{center}
\includegraphics[width=0.99\linewidth]{figures/waveganlong_notext.pdf}
\end{center}
\caption{Depiction of the transposed convolution operation for the first layers of the DCGAN~\citep{radford2015unsupervised} (\textbf{left}) and WaveGAN (\textbf{right}) generators. DCGAN uses small ($5$x$5$), two-dimensional filters while WaveGAN uses longer (length-$25$), one-dimensional filters and a larger upsampling factor. Both strategies have the same number of parameters and numerical operations.}
\label{fig:wavegan}
\end{figure*}
We base our WaveGAN architecture off of DCGAN~\citep{radford2015unsupervised}
which popularized usage of GANs for image synthesis.
The DCGAN generator uses the \emph{transposed convolution} operation (Figure~\ref{fig:wavegan})
to iteratively upsample low-resolution feature maps into a high-resolution image.
Motivated by our above discussion,
we modify this transposed convolution operation
to widen its receptive field.
Specifically,
we use longer one-dimensional filters of length $25$ instead of two-dimensional filters of size $5$x$5$,
and we upsample by a factor of $4$ instead of $2$ at each layer (Figure~\ref{fig:wavegan}).
We modify the discriminator in a similar way,
using length-$25$ filters in one dimension and increasing stride from $2$ to $4$.
These changes result in WaveGAN having the same number of parameters,
numerical operations,
and output dimensionality as DCGAN.
Because DCGAN outputs $64$x$64$ pixel images ---
equivalent to just $4096$ audio samples ---
we add one additional layer to the model resulting in $16384$ samples,
slightly more than one second of audio at \SI{16}{\kilo\hertz}.
This length is already sufficient for certain sound domains (e.g.~sound effects, voice commands),
and future work adapting megapixel image generation techniques~\citep{karras2017progressive} could expand the output length to more than a minute.
We requantize the real data from its $16$-bit integer representation (linear pulse code modulation) to $32$-bit floating point, and our generator similarly outputs floating point waveforms.
A complete description of our model is in Appendix~\ref{sec:arch}.
In summary, we outline our modifications to the DCGAN~\citep{radford2015unsupervised} method which result in WaveGAN.
This straightforward recipe already produces reasonable audio,
and further contributions outlined below and in Appendix~\ref{sec:artifacts} serve to refine results.
\begin{enumerate}
\item Flatten $2$D convolutions into $1$D (e.g.~$5$x$5$ $2$D convolution becomes length-$25$ $1$D).
\item Increase the stride factor for all convolutions (e.g.~stride $2$x$2$ becomes stride $4$).
\item Remove batch normalization from the generator and discriminator.
\item Train using the WGAN-GP~\citep{gulrajani2017improved} strategy.
\end{enumerate}
\subsection{Phase shuffle}
\begin{wrapfigure}{r}{0.4\textwidth}
\vspace{-6mm}
\begin{center}
\includegraphics[width=1.\linewidth]{figures/realps2.pdf}
\end{center}
\caption{At each layer of the WaveGAN discriminator,
the phase shuffle operation perturbs the phase of each feature map by $\text{Uniform} \sim [-n, n]$ samples, filling in the missing samples (dashed outlines) by reflection.
Here we depict all possible outcomes for a layer with four feature maps ($n=1$).}
\label{fig:phinv}
\vspace{-6mm}
\end{wrapfigure}
Generative image models that upsample by transposed convolution
(such as DCGAN)
are known to produce characteristic ``checkerboard'' artifacts in images~\citep{odena2016deconvolution}.
Periodic patterns are less common in images (Section~\ref{sec:a2i}),
and thus the discriminator can learn to reject images that contain them.
For audio,
analogous artifacts are perceived as pitched noise
which may overlap with frequencies commonplace in the real data,
making the discriminator's objective more challenging.
However, the artifact frequencies will always occur at a particular phase, allowing the discriminator to learn a trivial policy to reject generated examples.
This may inhibit the overall optimization problem.
To prevent the discriminator from learning such a solution,
we propose the \emph{phase shuffle} operation with hyperparameter $n$.
Phase shuffle randomly perturbs the phase of each layer's activations by $-n$ to $n$ samples before input to the next layer (Figure~\ref{fig:phinv}).
We apply phase shuffle only to the discriminator,
as the latent vector already provides the generator a mechanism to manipulate the phase of a resultant waveform.
Intuitively speaking, phase shuffle makes the discriminator's job more challenging by requiring invariance to the phase of the input waveform.
\section{SpecGAN: Generating semi-invertible spectrograms}
While a minority of recent research in discriminative audio classification tasks has used raw audio input~\citep{sainath2015learning,lee2017sample},
most of these approaches operate on spectrogram representations of audio.
A generative model may also benefit from operating in such a time-frequency space.
However, commonly-used representations in the discriminative setting are uninvertible.
With SpecGAN,
our frequency-domain audio generation model,
we design a spectrogram representation that is both well-suited to GANs designed for image generation and \emph{can} be approximately inverted.
Additionally,
to facilitate direct comparison,
our representation is designed to use the same dimensionality per unit of time as WaveGAN ($16384$ samples yield a $128$x$128$ spectrogram).
To process audio into suitable spectrograms,
we first perform the short-time Fourier transform with \SI{16}{\milli\second} windows and \SI{8}{\milli\second} stride, resulting in $128$ frequency bins\footnote{The FFT for this window size actually produces $129$ frequency bins. We discard the top (Nyquist) bin from each example for training. During resynthesis, we replace it with the dataset's mean for that bin.} linearly spaced from $0$ to \SI{8}{\kilo\hertz}.
We take the magnitude of the resultant spectra and scale amplitude values logarithmically to better-align with human perception.
We then normalize each frequency bin to have zero mean and unit variance.
This type of preprocessing is commonplace in audio classification, but produce spectrograms with unbounded values---a departure from image representations.
We therefore clip the spectra to $3$ standard deviations and rescale to [$-1$, $1$].
Through an informal listening test, we determined that this clipping strategy did not produce an audible difference during inversion.
Once our dataset has been processed into this format,
we operate the DCGAN~\citep{radford2015unsupervised} algorithm on the resultant spectra.
To render the resultant generated spectrograms as waveforms,
we first invert the steps of spectrogram preprocessing described above,
resulting in linear-amplitude magnitude spectra.
We then employ the iterative Griffin-Lim algorithm~\citep{griffin1984signal} with $16$ iterations to estimate phase and produce $16384$ audio samples.
\section{Experimental protocol}
\label{sec:exp}
\begin{figure*}[t]
\begin{center}
\includegraphics[width=0.99\linewidth]{figures/wavegan_real_3x3.pdf}
\end{center}
\caption{\textbf{Top}: Random samples from each of the five datasets used in this study, illustrating the wide variety of spectral characteristics. \textbf{Middle}: Random samples generated by WaveGAN for each domain. WaveGAN operates in the time domain but results are displayed here in the frequency domain for visual comparison. \textbf{Bottom}: Random samples generated by SpecGAN for each domain.}
\label{fig:data}
\end{figure*}
To facilitate human evaluation,
our experimentation focuses on the \emph{Speech Commands Dataset}~\citep{warden2017speech}.
This dataset consists of many speakers recording individual words in uncontrolled recording conditions.
We explore a subset consisting of the spoken digits ``zero'' through ``nine'' and refer to this subset as the \emph{Speech Commands Zero Through Nine} (SC09) dataset.
While this dataset is intentionally reminiscent of the popular MNIST dataset of written digits, we note that examples from SC09 are much higher dimensional ($\mathbb{R}^{16000}$) than examples from MNIST ($\mathbb{R}^{28 \times 28 = 784}$).
These ten words encompass many phonemes and two consist of multiple syllables.
Each recording is one second in length, and we do not attempt to align the words in time.
There are $1850$ utterances of each word in the training set,
resulting in $5.3$ hours of speech.
The heterogeneity of alignments, speakers, and recording conditions make this a challenging dataset for generative modeling.
Our baseline configuration for WaveGAN
excludes phase shuffle.
We compare this to the performance of WaveGAN with phase shuffle ($n \in \{2,4\}$) and
a variant of WaveGAN which uses nearest-neighbor upsampling rather than transposed convolution~\citep{odena2016deconvolution}.
Hoping to reduce noisy artifacts,
we also experiment with adding a wide (length-$512$) post-processing filter to the output of the generator and learning its parameters with the rest of the generator variables (details in Appendix~\ref{sec:ppfilt}).
We use the WGAN-GP~\citep{gulrajani2017improved} algorithm for all experiments,
finding it to produce reasonable results where others~\citep{radford2015unsupervised, mao2017least,arjovsky2017wasserstein} failed.
We compare the performance of these configurations to that of SpecGAN.
We also perform experiments on four other datasets with different characteristics (Figure~\ref{fig:data}):
\begin{enumerate}
\item \emph{Drum sound effects} ($0.7$ hours): Drum samples for kicks, snares, toms, and cymbals
\item \emph{Bird vocalizations} ($12.2$ hours): In-the-wild recordings of many species~\citep{boesman2018birds}
\item \emph{Piano} ($0.3$ hours): Professional performer playing a variety of Bach compositions
\item \emph{Large vocab speech (TIMIT)} ($2.4$ hours): Multiple speakers, clean~\citep{garofolo1993timit}
\end{enumerate}
We train our networks using batches of size $64$ on a single NVIDIA P100 GPU.
During our quantitative evaluation of SC09 (discussed below),
our WaveGAN networks converge by their early stopping criteria (inception score) within four days ($200$k iterations, around $3500$ epochs), and produce speech-like audio within the first hour of training.
Our SpecGAN networks converge more quickly, within two days (around $1750$ epochs).
On the other four datasets,
we train WaveGAN for $200$k iterations representing nearly $1500$ epochs for the largest dataset.
Unlike with autoregressive methods~\citep{oord2016wavenet,mehri2016samplernn},
generation with WaveGAN is fully parallel
and can produce an hour of audio
in less than two seconds.
We list all hyperparameters in Appendix~\ref{sec:hyper}.
\section{Evaluation methodology}
\label{sec:eval}
Evaluation of generative models is a fraught topic.
\citet{theis2016note} demonstrate that quantitative measures of sample quality are poorly correlated with each other and human judgement.
Accordingly,
we use several quantitative evaluation metrics for hyperparameter validation and discussion,
and also evaluate our most promising models with human judges.
\subsection{Inception score}
\label{sec:incept}
\citet{salimans2016improved} propose the \emph{inception score},
which uses a pre-trained Inception classifier~\citep{szegedy2016rethinking}
to measure both the diversity and semantic discriminability of generated images,
finding that the measure correlates well with human judgement.
Given model scores $P(\bm{y} \mid \bm{x})$
with marginal $P(\bm{y})$,
the inception score is defined as
$\exp(
\mathbb{E}_{\bm{x}}
D_{\text{KL}}(P(\bm{y} \mid \bm{x}) || P(\bm{y})))$,
and is estimated over a large number of samples (e.g.~$50$k).
For $n$ classes,
this measure ranges from $1$ to $n$,
and is maximized when
the model is completely confident about each prediction \emph{and} predicts each label equally often.
We will use this measure as our primary quantitative evaluation method and early stopping criteria.
To measure inception score,
we train an audio classifier on SC09.
Our classifier first computes a
short-time Fourier transform of the input audio
with
\SI{64}{\milli\second} windows and
\SI{8}{\milli\second}
stride.
This representation is projected to $128$ frequency bins
equally spaced on the Mel scale~\citep{stevens1937scale} from \SI{40}{\hertz} to \SI{7800}{\hertz}.
Amplitudes are scaled logarithmically and normalized so that each bin has zero mean and unit variance.
We process this perceptually-informed representation with four layers of convolution and pooling,
projecting the result to a \emph{softmax} layer with $10$ classes.
We perform early stopping on the minimum negative log-likelihood of the validation set;
the resultant model achieves $93\%$ accuracy on the test set.
Because this classifier observes spectrograms,
our spectrogram-generating models may have a representational advantage over our waveform-generating models.
\subsection{Nearest neighbor comparisons}
\label{sec:nn}
Inception score
has two trivial failure cases in which a poor generative model can achieve a high score.
Firstly, a generative model that outputs a single example of each class with uniform probability will be assigned a high score.
Secondly, a generative model that overfits the training data will achieve a high score simply by outputting examples on which the classifier was trained.
We use two indicators metrics to determine if a high inception score has been caused by either of these two undesirable cases.
Our first indicator, $|D|_{\text{self}}$, measures the average Euclidean distance of a set of $1$k examples to their nearest neighbor within the set (other than itself).
A higher $|D|_{\text{self}}$ indicates higher diversity amongst samples.
Because measuring Euclidean distance in time-domain audio poorly represents human perception,
we evaluate distances in the same frequency-domain representation as our classifier from Section~\ref{sec:incept}.
Our second indicator, $|D|_{\text{train}}$, measures the average Euclidean distance of $1$k examples to their nearest neighbor in the real training data.
If the generative model simply produces examples from the training set, this measure will be $0$.
We report $|D|_{\text{train}}$ and $|D|_{\text{self}}$ relative to those of the test set.
\subsection{Qualitative human judgements}
While inception score is a useful metric for hyperparameter validation,
our ultimate goal is to produce examples that are intelligible to humans.
To this end,
we measure the ability of human annotators on \emph{Amazon Mechanical Turk} to label the generated audio.
Using our best WaveGAN and SpecGAN models as measured by inception score, we generate random examples until we have $300$ for each digit (as labeled by our classifier from Section~\ref{sec:incept})---$3000$ total.
In batches of ten random examples,
we ask annotators to label which digit they perceive in each example,
and compute their accuracy with respect to the classifier's labels (random accuracy would be $10\%$).
After each batch,
annotators assign subjective values of $1$--$5$ for criteria of
sound quality,
ease of intelligibility,
and speaker diversity.
We report accuracy ($n=3000$) and mean opinion scores ($n=300$) in Table~\ref{tab:qualitative}.
\section{Results and discussion}
\begin{table}[t!]
\centering
\caption{Quantitative and qualitative (human study) results for SC09 experiments comparing real and generated data. A higher inception score suggests that semantic modes of the real data distribution have been captured. $|D|_{\text{self}}$ indicates the intra-dataset diversity relative to that of the real test data. $|D|_{\text{train}}$ indicates the distance between the dataset and the training set relative to that of the test data; a low value indicates a generative model that is overfit to the training data. Acc.~is the overall accuracy of humans on the task of labeling class-balanced digits (random chance is $0.1$). Sound \emph{quality}, \emph{ease} of intelligibility and speaker \emph{diversity} are mean opinion scores ($1$-$5$); higher is better.}
\vspace{2mm}
\footnotesize
\begin{tabular}{l|ccc|cccc}
\multicolumn{1}{c}{} & \multicolumn{3}{c}{\emph{Quantitative}} & \multicolumn{4}{c}{\emph{Qualitative (human judges)}} \\
\toprule
Experiment & Inception score & $|D|_{\text{self}}$ & $|D|_{\text{train}}$ & Acc. & Quality & Ease & Diversity \\
\midrule
Real (train) & $9.18 \pm 0.04$ & $1.1$ & $0.0$ \\
Real (test) & $8.01 \pm 0.24$ & $1.0$ & $1.0$ & $0.95$ & $3.9 \pm 0.8$ & $3.9 \pm 1.1$ & $3.5 \pm 1.0$ \\
Parametric & $5.02 \pm 0.06$ & $0.7$ & $1.1$ \\
\midrule WaveGAN & $4.12 \pm 0.03$ & $1.4$ & $2.0$ \\
~~+ Phase shuffle $n=2$ & $4.67 \pm 0.01$ & $0.8$ & $2.3$ & $0.58$ & $2.3 \pm 0.9$ & $2.8 \pm 0.9$ & $3.2 \pm 0.9$ \\
~~+ Phase shuffle $n=4$ & $4.54 \pm 0.03$ & $1.0$ & $2.3$ \\
~~+ Nearest neighbor & $3.77 \pm 0.02$ & $1.8$ & $2.6$ \\
~~+ Post-processing & $3.92 \pm 0.03$ & $1.4$ & $2.9$ \\
~~+ Dropout & $3.93 \pm 0.03$ & $1.0$ & $2.6$ \\
SpecGAN & $6.03 \pm 0.04$ & $1.1$ & $1.4$ & $0.66$ & $1.9 \pm 0.8$ & $2.8 \pm 0.9$ & $2.6 \pm 1.0$ \\
~~+ Phase shuffle $n=1$ & $3.71 \pm 0.03$ & $0.8$ & $1.6$ \\
\bottomrule
\end{tabular}
\label{tab:quantitative}
\label{tab:qualitative}
\end{table}
Results for our evaluation appear in Table~\ref{tab:quantitative}.
We also evaluate our metrics on the real training data,
the real test data,
and a version of SC09 generated by a parametric speech synthesizer~\citep{buchner2017parametric}.
We also compare to SampleRNN~\citep{mehri2016samplernn} and two public implementations of WaveNet~\citep{oord2016wavenet},
but neither method produced competitive results
(details in Appendix~\ref{sec:wavenet}),
and we excluded them from further evaluation.
These autoregressive models have not previously been examined on small-vocabulary speech data,
and their success at generating full words has only been demonstrated when conditioning on rich linguistic features.
Sound examples for all experiments can be found at \httpslink{chrisdonahue.com/wavegan_examples}.
While the maximum inception score for SC09 is $10$,
any score higher than the test set score of $8$ should be seen as evidence that a generative model has overfit.
Our best WaveGAN model uses phase shuffle with $n=2$ and achieves an inception score of $4.7$.
To compare the effect of phase shuffle to other common regularizers,
we also tried using $50\%$ dropout in the discriminator's activations,
which resulted in a lower score.
Phase shuffle decreased the inception score of SpecGAN, possibly because the operation has an exaggerated effect when applied to the compact temporal axis of spectrograms.
Most experiments produced $|D|_{\text{self}}$ (diversity) values higher than that of the test data,
and all experiments produced $|D|_{\text{train}}$ (distance from training data) values higher than that of the test data.
While these measures indicate that our generative models produce examples with statistics that deviate from those of the real data,
neither metric indicates that the models achieve high inception scores by the trivial solutions outlined in Section~\ref{sec:nn}.
Compared to examples from WaveGAN, examples from SpecGAN achieve higher inception score~($6.0$ vs. $4.7$) and are labeled more accurately by humans ($66\%$ vs. $58\%$).
However,
on subjective criteria of sound quality and speaker diversity,
humans indicate a preference for examples from WaveGAN.
It appears that SpecGAN might better capture the variance in the underlying data compared to WaveGAN, but its success is compromised by sound quality issues when its spectrograms are inverted to audio.
It is possible that the poor qualitative ratings for examples from SpecGAN are primarily caused by the lossy Griffin-Lim inversion~\citep{griffin1984signal} and not the generative procedure itself.
We see promise in both waveform and spectrogram audio generation with GANs; our study does not suggest a decisive winner.
For a more thorough investigation of spectrogram generation methods, we point to follow-up work~\citep{engel2019gansynth}.
Finally,
we train WaveGAN and SpecGAN models
on the four other domains listed in Section~\ref{sec:exp}.
Somewhat surprisingly,
we find that the frequency-domain spectra produced by WaveGAN (a time-domain method) are visually more consistent with the training data (e.g.~in terms of sharpness) than those produced by SpecGAN (Figure~\ref{fig:data}).
For drum sound effects,
WaveGAN captures semantic modes such as kick and snare drums.
On bird vocalizations,
WaveGAN generates a variety of distinct bird sounds.
On piano,
WaveGAN produces musically-consonant motifs that,
as with the training data,
represent a variety of key signatures and rhythmic patterns.
For TIMIT, a large-vocabulary speech dataset with many speakers,
WaveGAN produces speech-like babbling similar to results from unconditional autoregressive models~\citep{oord2016wavenet}.
\section{Related work}
Much of the work within generative modeling of audio is within the context of text-to-speech.
Text-to-speech systems are primarily either \emph{concatenative} or \emph{parametric}.
In concatenative systems,
audio is generated by sequencing small, prerecorded portions of speech from a phonetically-indexed dictionary~\citep{moulines1990pitch,hunt1996unit}.
Parametric systems map text to salient parameters of speech,
which are then synthesized by a vocoder~\citep{dudley1939remaking};
see~\citep{zen2009statistical} for a comprehensive review.
Some of these systems use learning-based approaches such as a hidden Markov models~\citep{yoshimura2002simultaneous,tokuda2013speech},
and separately-trained neural networks pipelines~\citep{ling2015deep}
to estimate speech parameters.
Recently,
several researchers have investigated parametric speech synthesis with end-to-end
neural network approaches that learn to produce vocoder features directly from text or phonetic embeddings~\citep{arik2017deep2,ping2017deep3,sotelo2017char2wav,wang2017tacotron,shen2017natural}.
These vocoder features are synthesized to raw audio using off-the-shelf methods
such as WORLD~\citep{morise2016world} and Griffin-Lim~\citep{griffin1984signal},
or trained neural vocoders~\citep{sotelo2017char2wav,shen2017natural,ping2017deep3}.
All of these methods are supervised: they are trained to map linguistic features to audio outputs.
Several approaches have explored unsupervised generation of raw audio.
\citet{oord2016wavenet} propose WaveNet,
a convolutional model which learns to predict raw audio samples by autoregressive modeling.
WaveNets conditioned on rich linguistic features have widely been deployed in text-to-speech systems,
though they have not been demonstrated capable of generating cohesive words in the unconditional setting.
\citet{engel2017neural} pose WaveNet as an autoencoder to generate musical instrument sounds. \citet{chung2014empirical,mehri2016samplernn} both train
recurrent autoregressive models which learn to predict raw audio samples.
While autoregressive methods generally produce higher audio fidelity than WaveGAN,
synthesis with WaveGAN is orders of magnitude faster.
The application of GANs~\citep{goodfellow2014generative} to audio has so far been limited to supervised learning problems in combination with traditional loss functions.
\citet{pascual2017segan} apply GANs to raw audio speech enhancement.
Their encoder-decoder approach combines the GAN objective with an $L_2$ loss.
\citet{fan2017svsgan,michelsanti2017conditional,donahue2017exploring} all use GANs in combination with unstructured losses to map spectrograms in one domain to spectrograms in another.
\citet{chen2017deep} use GANs to map musical performance images into spectrograms.
\section{Conclusion}
We present WaveGAN,
the first application of GANs to unsupervised audio generation.
WaveGAN is fully parallelizable and can generate hours of audio in only a few seconds.
In its current form,
WaveGAN can be used for creative sound design in multimedia production.
In our future work we plan to extend WaveGAN to operate on variable-length audio and also explore a variety of label conditioning strategies.
By providing a template for modifying image generation models to operate on audio,
we hope that this work catalyzes future investigation of GANs for audio synthesis.
\subsubsection*{Acknowledgments}
The authors would like to thank Peter Boesman and Colin Raffel for providing training data for this work.
This work was supported by the Unity Global Graduate Fellowship program and the UC San Diego Department of Computer Science.
GPUs used for this work were provided by the HPC @ UC program and donations from NVIDIA.
\bibliography{iclr2019_conference}
\bibliographystyle{iclr2019_conference}
\clearpage
\appendix
\section{Understanding and mitigating artifacts in generated audio}
\label{sec:artifacts}
Generative models that upsample by transposed convolution are known to produce characteristic ``checkerboard'' artifacts in images~\citep{odena2016deconvolution},
artifacts with particular spatial periodicities.
The discriminator of image-generating GANs can learn to reject images with these artifacts because they are uncommon in real data (as discussed in Section~\ref{sec:a2i}).
However,
in the audio domain,
the discriminator might not have such luxury as these artifacts correspond to frequencies which might rightfully appear in the real data.
While checkerboard artifacts are an annoyance in image generation,
they can be devastating to audio generation results.
While our eye may perceive these types of periodic distortions as an intrusive texture,
our ear perceives them as an abrasive tone.
To characterize these artifacts in WaveGAN,
we measure its impulse response by randomly initializing it $1000$ times and passing unit impulses to its first convolutional layer.
In Figure~\ref{fig:impulse},
we plot the average of these responses in the frequency domain.
The response has sharp peaks at linear multiples of the sample rates of each convolutional layer
(\SI{250}{\hertz}, \SI{1}{\kilo\hertz}, \SI{4}{\kilo\hertz}, etc.).
This is in agreement with our informal observation of results from WaveGAN,
which often have a
pitched noise close to the musical note B ($247~\times~2^{n}$~\SI{}{\hertz}).
Below, we will discuss strategies we designed to mitigate these artifacts in WaveGAN.
\subsection{Learned post-processing filters}
\label{sec:ppfilt}
\begin{figure}[t]
\begin{center}
\includegraphics[width=0.7\linewidth]{figures/impulse_nox.pdf}
\includegraphics[width=0.7\linewidth]{figures/ppfilts_overlay.pdf}
\end{center}
\caption{(\textbf{Top}): Average impulse response for $1000$ random initializations of the WaveGAN generator.
(\textbf{Bottom}): Response of learned post-processing filters for speech and bird vocalizations.
Post-processing filters reject frequencies corresponding to noise byproducts created by the generative procedure (top).
The filter for speech boosts signal in prominent speech bands,
while the filter for bird vocalizations
(which are more uniformly-distributed in frequency) simply reduces noise presence.
}
\label{fig:ppfilt}
\label{fig:impulse}
\end{figure}
We experiment with adding a post-processing filter to the generator,
giving WaveGAN a simple mechanism to filter out undesirable frequencies created by the generative process.
This filter has a long window
($512$ samples)
allowing it to represent intricate transfer functions,
and the weights of the filter are learned as part of the generator's parameters.
In Figure~\ref{fig:ppfilt},
we compare the post-processing filters that WaveGAN learns for human speech and bird vocalizations.
The filters boost signal in regions of the frequency spectrum that are most prominent in the real data domain,
and introduce notches at bands that are artifacts of the generative procedure as discussed in the previous section.
\subsection{Upsampling procedure}
\begin{figure}[t]
\begin{center}
\includegraphics[width=0.8\linewidth]{figures/upsample.pdf}
\end{center}
\caption{Depiction of the upsampling strategy used by transposed convolution (zero insertion) and other strategies which mitigate aliasing: nearest neighbor, linear and cubic interpolation.}
\vspace{-3mm}
\label{fig:upsample}
\end{figure}
Transposed convolution
upsamples signals by inserting zeros in between samples and applying a learned filterbank.
This operation introduces aliased frequencies,
copies of pre-existing frequencies shifted by multiples of the new Nyquist rate,
into the upsampled signal.
While aliased frequencies are usually seen as undesirable artifacts of a bad upsampling procedure,
in the generative setting their existence may be crucial for producing fine-grained details in the output.
We experiment with three other upsampling strategies in WaveGAN:
nearest-neighbor, linear and cubic interpolation,
all of which attenuate aliased frequencies.
In Figure~\ref{fig:upsample},
we compare these strategies visually.
While nearest neighbor upsampling resulted in similar audio output to transposed convolution,
linear and cubic interpolation strategies resulted in qualitatively poor audio output (sound examples: \httpslink{chrisdonahue.com/wavegan_examples}).
We hypothesize that the aliased frequencies produced by upsampling convolutions may be more critical to audio generation than image generation.
\section{Experiments with autoregressive waveform models}
\label{sec:wavenet}
We developed our WaveGAN and SpecGAN models primarily to address the task of steerable sound effect generation.
This is an inherently different task than text to speech (TTS), however autoregressive waveform models (e.g. WaveNet~\citep{oord2016wavenet} and SampleRNN~\citep{mehri2016samplernn}) that were developed for TTS can also be used to model and generate waveforms unconditionally.
Hence, a comparison to these models for our task is reasonable.
One upside of autoregressive models for our task is that they have the potential to produce high-quality audio.
Potential downsides are 1) these models take several orders of magnitude longer to generate waveforms, and 2) they do not learn a compact latent space of waveforms, causing useful sound generation tasks like continuous exploration and interpolation to be impossible.
We attempt to train \textbf{two} public implementations of WaveNet (ImplA\footnote{WaveNet ImplA (unofficial): \httpslink{github.com/ibab/tensorflow-wavenet}} and ImplB\footnote{WaveNet ImplB (unofficial): \httpslink{github.com/r9y9/wavenet_vocoder}}) and SampleRNN\footnote{SampleRNN (official): \httpslink{github.com/soroushmehr/sampleRNN_ICLR2017}} on our SC09 digit generation task.
We use default parameters for these libraries; the only modifications we make are to reduce the training example size to one second.
To our ears, all three libraries failed to produce cohesive words (you can judge for yourself from our sound examples at the bottom \httpslink{chrisdonahue.com/wavegan_examples}).
This poor subjective performance is echoed by weak inception scores (weaker than any in Table~\ref{tab:quantitative}): $1.07 \pm 0.05$, $1.29 \pm 0.03$, $2.28 \pm 0.19$ for WaveNet ImplA, WaveNet ImplB, and SampleRNN respectively.
Note that these inception scores were calculated on far fewer examples ($<1k$) than all of the scores listed in Table~\ref{tab:quantitative} (which were computed on $50k$ examples).
This is because it took over $24$ hours to produce even a thousand one-second examples with these methods (whereas our methods produce $50k$ examples in a few seconds).
Autoregressive methods have not been demonstrated capable of learning to synthesize coherent words without conditioning on rich linguistic features.
We are not claiming that these methods \emph{cannot} learn to synthesize full words, merely that three open-source implementations were unable to do so with default parameters.
We want to be clear that our intent is not to disparage autoregressive waveform methods as these methods were developed for a different task, and hence we excluded these poor scores from our results table to avoid sending the wrong message.
Instead, we hope to highlight that these implementations produced results that were noncompetitive for our problem domain, and less useful (due to slowness and lack of a latent space) for creative generation of sound effects.
\section{Feline ``Turing test''}
\begin{figure}[h]
\begin{center}
\includegraphics[width=0.98\linewidth]{figures/catGAN_small.pdf}
\end{center}
\caption{Compared to resting state, this cat's level of alertness increased when presented bird vocalizations synthesized by WaveGAN and SpecGAN.}
\label{fig:cat}
\end{figure}
As our results improved throughout the course of this research,
our cats became quite intrigued by the synthetic bird vocalizations produced by WaveGAN (Figure~\ref{fig:cat}).
While this was of course not a formal experiment, we did find this to be encouraging evidence that our method might be capable of producing audio that could additionally convince non-human animals.
\clearpage
\section{Architecture description}
\label{sec:arch}
\begin{table}[t]
\caption{WaveGAN generator architecture}
\centering
\footnotesize
\begin{tabular}{ l | l | l }
Operation & Kernel Size & Output Shape \\
\hline
Input $\bm{z} \sim \text{Uniform}(-1, 1)$ & & ($n$, $100$)\\
Dense 1 & ($100$, $256d$) & ($n$, $256d$)\\
Reshape & & ($n$, $16$, $16d$)\\
ReLU & & ($n$, $16$, $16d$)\\
Trans Conv1D (Stride=$4$) & ($25$, $16d$, $8d$) & ($n$, $64$, $8d$)\\
ReLU & & ($n$, $64$, $8d$)\\
Trans Conv1D (Stride=$4$) & ($25$, $8d$, $4d$) & ($n$, $256$, $4d$)\\
ReLU & & ($n$, $256$, $4d$)\\
Trans Conv1D (Stride=$4$) & ($25$, $4d$, $2d$) & ($n$, $1024$, $2d$)\\
ReLU & & ($n$, $1024$, $2d$)\\
Trans Conv1D (Stride=$4$) & ($25$, $2d$, $d$) & ($n$, $4096$, $d$)\\
ReLU & & ($n$, $4096$, $d$)\\
Trans Conv1D (Stride=$4$) & ($25$, $d$, $c$) & ($n$, $16384$, $c$)\\
Tanh & & ($n$, $16384$, $c$)
\end{tabular}
\label{tab:garch}
\end{table}
\begin{table}[t]
\caption{WaveGAN discriminator architecture}
\centering
\footnotesize
\begin{tabular}{ l | l | l }
Operation & Kernel Size & Output Shape \\
\hline
Input $\bm{x}$ or $G(\bm{z})$ & & ($n$, $16384$, $c$)\\
Conv1D (Stride=$4$) & ($25$, $c$, $d$) & ($n$, $4096$, $d$) \\
LReLU ($\alpha = 0.2$) & & ($n$, $4096$, $d$) \\
Phase Shuffle ($n = 2$) & & ($n$, $4096$, $d$) \\
Conv1D (Stride=$4$) & ($25$, $d$, $2d$) & ($n$, $1024$, $2d$) \\
LReLU ($\alpha = 0.2$) & & ($n$, $1024$, $2d$) \\
Phase Shuffle ($n = 2$) & & ($n$, $1024$, $2d$) \\
Conv1D (Stride=$4$) & ($25$, $2d$, $4d$) & ($n$, $256$, $4d$) \\
LReLU ($\alpha = 0.2$) & & ($n$, $256$, $4d$) \\
Phase Shuffle ($n = 2$) & & ($n$, $256$, $4d$) \\
Conv1D (Stride=$4$) & ($25$, $4d$, $8d$) & ($n$, $64$, $8d$) \\
LReLU ($\alpha = 0.2$) & & ($n$, $64$, $8d$) \\
Phase Shuffle ($n = 2$) & & ($n$, $64$, $8d$) \\
Conv1D (Stride=$4$) & ($25$, $8d$, $16d$) & ($n$, $16$, $16d$) \\
LReLU ($\alpha = 0.2$) & & ($n$, $16$, $16d$) \\
Reshape & & ($n$, $256d$) \\
Dense & ($256d$, $1$) & ($n$, $1$) \\ \end{tabular}
\label{tab:darch}
\end{table}
\begin{table}[t]
\caption{SpecGAN generator architecture}
\centering
\footnotesize
\begin{tabular}{ l | l | l }
Operation & Kernel Size & Output Shape \\
\hline
Input $\bm{z} \sim \text{Uniform}(-1, 1)$ & & ($n$, $100$)\\
Dense 1 & ($100$, $256d$) & ($n$, $256d$)\\
Reshape & & ($n$, $4$, $4$, $16d$)\\
ReLU & & ($n$, $4$, $4$, $16d$)\\
Trans Conv2D (Stride=$2$) & ($5$, $5$, $16d$, $8d$) & ($n$, $8$, $8$, $8d$)\\
ReLU & & ($n$, $8$, $8$, $8d$)\\
Trans Conv2D (Stride=$2$) & ($5$, $5$, $8d$, $4d$) & ($n$, $16$, $16$, $4d$)\\
ReLU & & ($n$, $16$, $16$, $4d$)\\
Trans Conv2D (Stride=$2$) & ($5$, $5$, $4d$, $2d$) & ($n$, $32$, $32$, $2d$)\\
ReLU & & ($n$, $32$, $32$, $2d$)\\
Trans Conv2D (Stride=$2$) & ($5$, $5$, $2d$, $d$) & ($n$, $64$, $64$, $d$)\\
ReLU & & ($n$, $64$, $64$, $d$)\\
Trans Conv2D (Stride=$2$) & ($5$, $5$, $d$, $c$) & ($n$, $128$, $128$, $c$)\\
Tanh & & ($n$, $128$, $128$, $c$)
\end{tabular}
\label{tab:specgarch}
\end{table}
\begin{table}[t]
\caption{SpecGAN discriminator architecture}
\centering
\footnotesize
\begin{tabular}{ l | l | l }
Operation & Kernel Size & Output Shape \\
\hline
Input $\bm{x}$ or $G(\bm{z})$ & & ($n$, $128$, $128$, $c$)\\
Conv2D (Stride=$2$) & ($5$, $5$, $c$, $d$) & ($n$, $64$, $64$, $d$) \\
LReLU ($\alpha = 0.2$) & & ($n$, $64$, $64$, $d$) \\
Conv2D (Stride=$2$) & ($5$, $5$, $d$, $2d$) & ($n$, $32$, $32$, $2d$) \\
LReLU ($\alpha = 0.2$) & & ($n$, $32$, $32$, $2d$) \\
Conv2D (Stride=$2$) & ($5$, $5$, $2d$, $4d$) & ($n$, $16$, $16$, $4d$) \\
LReLU ($\alpha = 0.2$) & & ($n$, $16$, $16$, $4d$) \\
Conv2D (Stride=$2$) & ($5$, $5$, $4d$, $8d$) & ($n$, $8$, $8$, $8d$) \\
LReLU ($\alpha = 0.2$) & & ($n$, $8$, $8$, $8d$) \\
Conv2D (Stride=$2$) & ($5$, $5$, $8d$, $16d$) & ($n$, $4$, $4$, $16d$) \\
LReLU ($\alpha = 0.2$) & & ($n$, $4$, $4$, $16d$) \\
Reshape & & ($n$, $256d$) \\
Dense & ($256d$, $1$) & ($n$, $1$) \\ \end{tabular}
\label{tab:specdarch}
\end{table}
\begin{table}[t!]
\caption{WaveGAN hyperparameters}
\centering
\footnotesize
\begin{tabular}{ l | l }
Name & Value \\
\hline
Input data type & $16$-bit PCM (requantized to $32$-bit float) \\
Model data type & $32$-bit floating point \\
Num channels ($c$) & 1 \\
Batch size ($b$) & 64 \\
Model dimensionality ($d$) & 64 \\
Phase shuffle (WaveGAN) & 2 \\
Phase shuffle (SpecGAN) & 0 \\
Loss & WGAN-GP~\citep{gulrajani2017improved} \\
WGAN-GP $\lambda$ & 10 \\
$D$ updates per $G$ update & 5 \\
Optimizer & Adam ($\alpha=1\mathrm{e}{-4}$, $\beta_1=0.5$, $\beta_2=0.9$) \\
\end{tabular}
\label{tab:hyper}
\end{table}
In Tables \ref{tab:garch} and \ref{tab:darch},
we list the full architectures for our WaveGAN generator and discriminator respectively.
In Tables \ref{tab:specgarch} and \ref{tab:specdarch},
we list the same for SpecGAN.
In these tables, $n$ is the batch size, $d$ modifies model size, and $c$ is the number of channels in the examples.
In all of our experiments in this paper, $c=1$.
All dense and convolutional layers include biases.
No batch normalization is used in WaveGAN or SpecGAN.
\section{Training hyperparameters}
\label{sec:hyper}
In Table~\ref{tab:hyper},
we list the values of these and all other hyperparameters for our experiments,
which constitute our out-of-the-box recommendations for WaveGAN and SpecGAN.
\end{document}