{'fraction_non_alphanumeric': 0.03330501644557712, 'fraction_numerical': 0.01008516848548215, 'mean_word_length': 4.771213073538655, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 6, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Hierarchical Generative Modeling for Controllable Speech Synthesis

This paper proposes a neural end-to-end text-to-speech (TTS) model which can control latent attributes in the generated speech that are rarely annotated in the training data, such as speaking style, accent, background noise, and recording conditions. The model is formulated as a conditional generative model with two levels of hierarchical latent variables. The first level is a categorical variable, which represents attribute groups (e.g. clean/noisy) and provides interpretability. The second level, conditioned on the first, is a multivariate Gaussian variable, which characterizes specific attribute configurations (e.g. noise level, speaking rate) and enables disentangled fine-grained control over these attributes. This amounts to using a Gaussian mixture model (GMM) for the latent distribution. Extensive evaluation demonstrates its ability to control the aforementioned attributes. In particular, it is capable of consistently synthesizing high-quality clean speech regardless of the quality of the training data for the target speaker.


INTRODUCTION
Recent development of neural end-to-end TTS models has shown promising results in generating high fidelity speech without the need of handcrafted linguistic features (Sotelo et al., 2017;Wang et al., 2017;Arık et al., 2017;. These models rely heavily on the encoder-decoder neural network structure (Sutskever et al., 2014) that maps a text sequence to a sequence of speech frames. Extensions to these models have shown that attributes such as speaker identity can be controlled by conditioning the decoder on additional attribute labels (Arik et al., 2017;.
There are many speech attributes aside from speaker identity that are difficult to annotate, such as speaking style, prosody, recording channel, and noise levels. ;  model such latent attributes through conditional auto-encoding: in addition to text and a speaker label, a vector inferred from the target speech is passed to the decoder as input, which aims to capture the residual attributes that are not specified by other input streams. Such models have shown convincing results in synthesizing speech that resembles the prosody or the noise conditions of the reference speech, which may not have the same text or speaker identity as the target speech.
Nevertheless, the presence of multiple latent attributes is common in crowdsourced data (Panayotov et al., 2015), in which prosody, speaker, and noise conditions can vary simultaneously. In such scenarios, simply copying the latent attributes from a reference is insufficient if one desires to synthesizing speech that mimics the prosody of one reference, but is in the same noise condition as another. Learning a disentangled latent representation would enable control of independent generating factors. It is also desirable to construct a systematic method for synthesizing speech with random latent attributes, which can facilitate data augmentation (Tjandra et al., 2017;Hsu et al., 2017b;Hayashi et al., 2018) by providing more diverse examples. Neither of these properties were explicitly addressed in the previous studies, which model variation of a single latent attribute.
The objectives of this work are as follows: (1) constructing a continuous latent space of disentangled attribute representations, where each dimension controls a different generating factor; (2) discovering a set of interpretable clusters, each of which is a representative mode (e.g., one cluster for clean speech and another for noisy speech); (3) providing a systematic sampling mechanism for attribute representations. All three are achieved by introducing a Gaussian Mixture Variational Auto-Encoder (GMVAE) to Tacotron 2 . The proposed model is extensively evaluated on four datasets with subjective and objective quantitative metrics, as well as comprehensive qualitative studies. Experiments confirm that GMVAE-Tacotron is capable of controlling speaker, noise, and style independently, even when variation of all attributes is present but unannotated in the train set.

MODEL
Tacotron-like TTS systems take a text sequence y t and optional observed conditioning information y o as input (e.g. speaker identity), and predict a sequence of acoustic feature frames X. Training such a system can be regarded as fitting a probabilistic model p(X | y t , y o ) that maximizes the likelihood of generating the training data. If there are other unlabeled attributes such as prosody, such a model is effectively integrating out those latent attributes and producing a conditional distribution with higher variance. As a result, the model would opaquely produce speech with unpredictable latent attributes.
To enable control of those attributes, we adopt a graphical model with hierarchical latent variables, which captures such attributes. Below we explain how the formulation can achieve interpretability, disentanglement, and sampling capability, and propose efficient inference and training methods.

CONDITIONAL GENERATIVE MODEL WITH HIERARCHICAL LATENT VARIABLES
Two latent variables y l and z l are introduced in addition to the observed variables, X, y t , and y o , as shown in the graphical model in the left of Figure 1. y l is a K-way categorical discrete variable, named latent attribute class, and z l is a D-dimensional continuous variable, named latent attribute representation. To generate speech X conditioned on the text y t and observed attribute y o , y l is first sampled from its prior, p(y l ), then a latent attribute representation z l is sampled from the conditional distribution p(z l | y l ). Finally, a sequence of speech frames is drawn from p(X | y t , y o , z l ), parameterized by the decoder neural network. The joint probability can be written as: Specifically, it is assumed that p(y l ) = K −1 to be a non-informative prior to encourage every component to be used, and p(z l | y l ) = N (µ y l , diag(σ y l )) to be diagonal-covariance Gaussian with learnable means and variances. As a result, the marginal prior of z l becomes a GMM with diagonal covariances and equal mixture weights. We hope this GMM latent model can better capture the complexity of unseen attributes. Furthermore, in the presence of natural clusters of unseen attributes, the proposed model can achieve interpretability by learning to assign instances from different clusters to different mixture components. The covariance matrix of each mixture component is constrained to be diagonal to encourage each dimension to capture a statistically uncorrelated factor.

VARIATIONAL INFERENCE AND TRAINING
The observation model, p(X | y t , y o , z l ), is parameterized with a neural network. Following the framework of VAE (Kingma & Welling, 2014), a variational distribution q(y l | X)q(z l | X) is used to approximate the posterior p(y l , z l | X, y t , y o ), which assumes that the posterior of unseen attributes is independent of the text and observed attributes. The approximated posterior for z l , q(z l | X), is modeled as a Gaussian distribution with diagonal covariance matrix, whose mean and variance are parameterized by a neural network. For q(y l | X), instead of introducing another neural network, we configure it to be an approximation of p(y l | X) that reuses q(z l | X) as follows: which enjoys the closed-form solution of Gaussian mixture posteriors, p(y l | z l ). Similar to VAE, the model is trained by maximizing its evidence lower bound (ELBO), as follows: where q(z l | X) is estimated via Monte Carlo sampling, and all components are differentiable thanks to reparameterization. Details can be found in Appendix A.

A CONTINUOUS ATTRIBUTE SPACE FOR CATEGORICAL OBSERVED LABELS
Categorical observed labels, such as speaker identity, can often be seen as a categorization from a continuous attribute space, which for example could model a speaker's characteristic F 0 range and vocal tract shape. Given an observed label, there may still be some variation of these attributes. We are interested in learning this continuous attribute space for modeling within-class variation and inferring a representation from an instance of an unseen class for one-shot learning.
To achieve this, a continuous latent variable, z o , named the observed attribute representation, is introduced between the observed label y o and speech X, as shown on the right of Figure 1. Each observed class forms a mixture component in this continuous space, whose conditional distribution is a diagonal-covariance Gaussian p(z o | y o ) = N (µ yo , diag(σ yo )). With this formulation, speech from an observed class y o is now generated by conditioning on y t , z l , and a sample z o drawn from p(z o | y o ). As before, a variational distribution q(z o | X), parameterized by a neural network, is used to approximate the true posterior, where the ELBO becomes: To encourage z o to disentangle observed attributes from latent attributes, the variances of p(z o | y o ) are initialized to be smaller than those of p(z l | y l ). The intuition is that this space should capture variation of attributes that are highly correlated with the observed labels, so the conditional distribution of all dimensions should have relatively small variance for each mixture component. Experimental results verify the effectiveness, and similar design is used in Hsu et al. (2017a). In the extreme case where the variance is fixed and approaches zero, this formulation converges to using an lookup table.

NEURAL NETWORK ARCHITECTURE
The observation model, p(X | y t , y o , z l ) or p(X | y t , z o , z l ), is adopted from a sequence-to-sequence Tacotron 2 architecture , with extra input z l and y o (or z o ) concatenated and passed to the decoder at each step. Text y t and speech X are represented as a sequence of phonemes and a sequence of mel-scale filterbank coefficients, respectively. For fast inference, we use a WaveRNNbased neural vocoder (Kalchbrenner et al., 2018) instead of WaveNet (van den Oord et al., 2016).
The two posteriors, q(z l | X) and q(z o | X), are both parameterized by a recurrent encoder that maps a variable-length mel-spectrogram to two fixed-dimensional vectors, corresponding to the posterior mean and log variance, respectively. Full architecture details can be found in Appendix B.

RELATED WORK
The proposed GMVAE-Tacotron is most related to , , Henter et al. (2018), and Akuzawa et al. (2018), which introduce a reference embedding to model prosody or noise. The first uses an autoencoder to extract a prosody embedding from a reference speech spectrogram. The second Global Style Token (GST) model constrains a reference embedding to be a weighted combination of a fixed set of learned vectors, while the third further restrict the weights to be one-hot, and is built on a conventional parametric speech synthesizer (Zen et al., 2009). The main focus of these approaches was style transfer from a reference audio. They provide neither a systematic sampling mechanism nor disentangled representations as we show in Section 4.3.1.
The last model on the other hand adopts a Gaussian prior, which enables sampling, but does not provide interpretability, nor does it evaluate disentangled control. In contrast, the proposed model can achieve interpretability by modeling different mixture components, and promotes disentanglement by encouraging statistical independence between each dimension.
The proposed formulation for learning an observed attribute embedding z o for speaker modeling is also related to Arik et al. (2018), which controls the speaker identity with speaker embeddings, and trains a separate regression model to predict them from the audio. This can be regarded as a special case of the proposed model where the variance of z o is set to be almost zero, such that a speaker always generates a fixed representation; meanwhile, the posterior model q(z o | X) corresponds to their embedding predictor, because it now aims to predict a fixed embedding for each speaker.
Using a mixture distribution for latent variables in a VAE was explored in Dilokthanakul et al. (2016); Nalisnick et al. (2016), and Jiang et al. (2017) for unconditional image generation and text topic modeling. These models correspond to the sub-graph y l → z l → X in Figure 1. The proposed model provides extra flexibility to model both latent and observed attributes in a conditional generation scenario. Hsu et al. (2017a) similarly learned disentangled representations at the variable level (i.e. disentangling z l and z o ) by defining different priors for different latent variables. Higgins et al. (2017) also used a prior with diagonal covariance matrix to disentangle different embedding dimensions.
Our model provides additional flexibility by learning a different variance in each mixture component.

EXPERIMENTS
The proposed GMVAE-Tacotron was evaluated on four datasets, spanning a wide degree of variations in speaker, recording channel conditions, background noise, prosody, and speaking styles. For all experiments, y l was configured to be a 10-way categorical variable (K = 10), and z l and z o (if used) were configured to be 16-dimensional variables (D = 16). Tacotron 2  with a speaker embedding table was used as the baseline for all experiments. For all other variants (e.g., GST), the reference encoder follows . Each model was trained for at least 200k steps to maximize the ELBO in equation 3 or equation 4 using the Adam optimizer. A list of detailed hyperparameter settings can be found in Appendix C. Quantitative subjective evaluations relied on crowd-sourced mean opinion scores (MOS) rating the naturalness of the synthesized speech by native speakers using headphones, with scores ranging from 1 to 5 in increments of 0.5. For single speaker datasets each sample was rated by 6 raters, while for other datasets each sample was rated by a single rater. We strongly encourage readers to listen to the samples on the demo page. 1

MULTI-SPEAKER ENGLISH CORPUS
To evaluate the ability of GMVAE-Tacotron to model speaker variation and discover meaningful speaker clusters, we used a proprietary dataset of 385 hours of high-quality English speech from 84 professional voice talents with accents from the United States (US), Great Britain (GB), Australia (AU), and Singapore (SG). Speaker labels were not seen during training (y o and z o were unused), and were only used for evaluation. To probe the interpretability of the model, we computed the distribution of mixture components y l for utterances of a particular accent or gender. Specifically, we collected at most 100 utterances from each of the 44 speakers with at least 20 test utterances (2,332 in total), and assigned each utterance to the component with the highest posterior probability: arg max y l q(y l |X). Figure 2 plots the assignment distributions for each gender and accent in this set. Most components were only used to model speakers from one gender. Each component which modeled both genders (0, 2, and 9) only represented a subset of accents (US, US, and AU/GB, respectively). We also found that the several components which modeled US female speakers (3, 5, and 6) actually modeled groups of speakers with distinct characteristics, e.g. different F 0 ranges. To quantify the association between speaker and mixture components, we computed the assignment consistency w.r.t. speaker: 1 Ni j=1 1 yij =ŷi where M is the number of utterances, y ij is the component assignment of utterance j from speaker i, andŷ i is the mode of {y ij } Ni j=1 . The resulting consistency was 92.9%, suggesting that the mixture components learned to group utterances by speaker and group speakers by gender or accent attributes.
We also explored what each dimension of z l controlled by decoding with different values of the target dimension, keeping all other factors fixed. We discovered that there were individual dimensions which controlled F 0 , speaking rate, accent, length of starting silence, etc., demonstrating the disentangled nature of the learned latent attribute representation. Appendix D contains visualization of attribute control and additional quantitative evaluation of using z l for gender/accent/speaker classification.

NOISY MULTI-SPEAKER ENGLISH CORPUS
High quality data can be both expensive and time consuming to record. Vast amounts of rich real-life expressive speech are often noisy and difficult to label. In this section we demonstrate that our model can synthesize clean speech directly from noisy data by disentangling the background noise level from other attributes, allowing it to be controlled independently. As a first experiment, we artificially generated training sets using a room simulator (Kim et al., 2017) to add background noise and reverberation to clean speech from the multi-speaker English corpus used in the previous section. We used music and ambient noise sampled from YouTube and recordings of "daily life" environments as noise signals, mixed at signal-to-noise ratios (SNRs) ranging from 5-25dB. The reverberation time varied between 100 and 900ms. Noise was added to a random selection of 50% of utterances by each speaker, holding out two speakers (one male and one female) for whom noise was added to all of their utterances. This construction was used to evaluate the ability of the model to synthesize clean speech for speakers whose training utterances were all corrupted by noise. In this experiment, we provided speaker labels y o as input to the decoder, and only expect the latent attribute representations z l to capture the acoustic condition of each utterance.

IDENTIFYING MIXTURE COMPONENTS THAT GENERATE CLEAN/NOISY SPEECH
Unlike clustering speakers, we expected that latent attributes would naturally divide into two categories: clean and noisy. To verify this hypothesis, we plotted the Euclidean distance between means of each pair of components on the left of Figure 3, which clearly form two distinct clusters. The right two plots in Figure 3 show the mel-spectrograms of two synthesized utterances of the same text and speaker, conditioned on the means of two different components, one from each group. It clearly presents the samples (in fact, all the samples) drawn from components in group one were noisy, while the samples drawn from the other components were clean. See Appendix E for more examples.

CONTROL OF THE BACKGROUND NOISE LEVEL
We next explored if the level of noise was dominated by a single latent dimension, and whether we could determine such a dimension automatically. For this purpose, we adopted a per-dimension LDA, which computed a between and within-mixture scattering ratio: where µ y l ,d and σ y l ,d are the d-th dimension mean and variance of mixture component y l , andμ d is the d-th dimension marginal mean. This is a scale-invariant metric of the degree of separation between components in each latent dimension.
We discovered that the most discriminative dimension had a scattering ratio r 13 = 21.54, far larger than the second largest, which had r 11 = 0.64. Drawing samples and traversing different values along    Figure 4 shows that the noise-level was clearly controlled by manipulating this dimension while the underlying speech content was unchanged. To quantify the noise control results, we used waveform amplitude distribution analysis (WADA) (Kim & Stern, 2008) to estimate an SNR without a reference clean signal. Figure 5 plots the average estimated SNR over 200 utterances from two speakers as the noise level dimension value was varied, which matched the qualitative observations.

SYNTHESIZING CLEAN SPEECH FOR NOISY SPEAKERS
In this section, we evaluated synthesis quality for the two held out noisy speakers. Evaluation metrics included subjective naturalness MOS ratings and an objective SNR metric. Table 1 compares the proposed model with a baseline, a 16-token GST, and a VAE variant which replaces the GMM prior with an isotropic Gaussian. To encourage synthesis of clean audio under each model we manually selected the cleanest token (weight=0.15) for GST, used the Gaussian prior mean (i.e. a zero vector) for VAE, and the mean of a clean component for GMVAE. For the VAE model, the mean captured the average condition, which still exhibited a moderate level of noise, resulting in a lower SNR and MOS. The generated speech from the GST was cleaner, however raters sometimes found its prosody to be unnatural. Note that it is possible that another token would obtain a different trade-off between prosody and SNR, and using multiple tokens could improve both. Finally, the proposed model synthesized both natural and high-quality speech, with the highest MOS and SNR.

SINGLE-SPEAKER AUDIOBOOK CORPUS
Prosody and speaking style is another important factor for human speech other than speaker and noise. Control of these aspects of the synthesize speech is essential to building an expressive TTS system. In this section, we evaluated the ability of the proposed model to sample and control speaking styles. A single speaker US English audiobook dataset of 147 hours, recorded by professional speaker, Catherine Byers, from the 2013 Blizzard Challenge (King & Karaiskos, 2013) is used for training. The data incorporated a wide range of prosody variation. We used an evaluation set of 150 audiobook sentences, including many long phrases. Table 2 shows the naturalness MOS between baseline and proposed model conditioning on the same z l , set to the mean of a selected y l , for all utterances. The results show that the prior already captured a common prosody, which could be used to synthesize more naturally sounding speech with a lower variance compared to the baseline.

STYLE SAMPLING AND DISENTANGLED CONTROL
Compared to GST, one primary advantage of the proposed model is that it supports random sampling of natural speech from the prior. Figure 6 illustrates such samples, where the same text is synthesized with wide variation in speaking rate, rhythm, and F 0 . In contrast, the GST model does not define a prior for normalized token weights, requiring weights to be chosen heuristically or by fitting a distribution after training. Empirically we found that the GST weight simplex was not fully exploited during training and that careful tuning was required to find a stable sampling region.
An additional advantage of GMVAE-Tacotron is that it learns a representation which disentangles these attributes, enabling them to be controlled independently. Specifically, latent dimensions in the proposed model are conditionally independent, while token weights of GST are in fact correlated. Figure 7(b) contains an example of the proposed model traversing the "speed" dimension with three  values: µ − 2σ, µ, µ + 2σ, plotted accordingly from left to right. Their F 0 tracks, obtained using the YIN (De Cheveigné & Kawahara, 2002) F 0 tracker, are shown on the left. From these we can observe that the shape of the F 0 contours did not change. They were simply stretched horizontally, indicating that only the speed was manipulated. In contrast, the style control of GST is more entangled, as shown in Figure 3(a) of , where the F 0 also changed while controlling speed.
Additional evaluation of style transfer can be found in Appendix F, demonstrating the ability of the proposed the model to synthesize speech that resembles the prosody of a given reference utterance.

CROWD-SOURCED AUDIOBOOK CORPUS
We used an audiobook dataset 2 derived from the same subset of LibriVox audiobooks used for the LibriSpeech corpus (Panayotov et al., 2015), but sampled at 24kHz and segmented differently, making it appropriate for TTS instead of speech recognition. The corpus contains recordings from thousands of speakers, with wide variation in recording conditions and speaking style. Speaker identity is often highly correlated with the recording channel and background noise level, since many speakers tended to use the same microphone in a consistent recording environment. The ability to disentangle and control these attributes independently is essential to synthesizing high-quality speech for all speakers.
We augmented the model with the z o layer described in Section 2.3 to learn a continuous speaker representation and an inference model for it. The train-clean-{100,360} partitions were used for training, which spans 1,172 unique speakers and, despite the name, includes many noisy recordings. As in previous experiments, by traversing each dimension of z l we found that different latent dimensions independently control different attributes of the generated speech. Moreover, this representation was disentangled from speaker identity, i.e. modifying z l did not affect the generated speaker identity if z o was fixed. In addition, we discovered that the mean of one mixture component corresponded to a narrative speaking style in a clean recording condition. Speaker similarity tests and demonstrations of latent attribute control are shown in Appendix G and the demo page.
We demonstrate the ability of GMVAE-Tacotron to consistently generate high-quality speech by conditioning on a value of z l associated with clean output. We considered two approaches: (1) using the mean of the identified clean component, which can be seen as a preset configuration with a fixed channel and style; (2) inferring a latent attribute representation z l from reference speech and denoising it by modifying dimensions 3 associated with the noise level to predetermined values.   We evaluated a set of eight "seen clean" (SC) speakers and a set of nine "seen noisy" (SN) speakers from the training set, a set of ten "unseen noisy" (UN) speakers from a held-out set with no overlapping speakers, and the set of ten unseen speakers used in , denoted as "unseen clean" (UC). For consistency, we always used an inferred z o from an utterance from the target speaker, regardless of whether that speaker was seen or unseen. As a baseline we used a Tacotron model conditioned on a 128-dimensional speaker embedding learned for each speaker seen during training. Table 3 shows the SNR of the original audio, audio synthesized by the baseline, and by the GMVAE-Tacotron using the two proposed approaches, denoted as mean and latent-dn, respectively, on all speaker sets whenever possible. In addition, to see the effectiveness of the denoising operation, the table also includes the results of using inferred z l directly, denoted as latent. The results show that the inferred z l followed the same SNR trend as the original audio, indicating that z l captured the variation in acoustic condition. The high SNR values of mean and latent-dn verifies the effectiveness of using a preset and denoising arbitrary inferred latent features, both of which outperformed the baseline by a large margin, and produced better quality than the original noisy audio. Table 4 compares the proposed model using denoised z l to the baseline in a subjective side-byside preference test. Table 5 further compares subjective naturalness MOS of the proposed model using the mean of the clean component to the baseline on the two seen speaker sets, and to the d-vector model  on the two unseen speaker sets. Specifically, we consider another stronger baseline model to compare on the SN set, which is trained on denoised data using spectral subtraction (Boll, 1979), denoted as "+ denoise." Both results indicate that raters preferred the proposed model to the baselines. Moreover, the MOS evaluation shows that the proposed model delivered similar level of naturalness under all conditions, seen or unseen, clean or noisy.

CONCLUSION
We describe GMVAE-Tacotron, a TTS model which learns an interpretable and disentangled latent representation to enable fine-grained control of latent attributes and provides a systematic sampling scheme for them. If speaker labels are available, we demonstrate an extension of the model that learns a continuous space that captures speaker attributes, along with an inference model which enables one-shot learning of speaker attributes from unseen reference utterances.
The proposed model was extensively evaluated on tasks spanning a wide range of signal variation. We demonstrated that it can independently control many latent attributes, and is able to cluster them without supervision. In particular, we verified using both subjective and objective tests that the model could synthesize high-quality clean speech for a target speaker even if the quality of data for that speaker does not meet high standard. These experimental results demonstrated the effectiveness of the model for training high-quality controllable TTS systems on large scale training data with rich styles by learning to factorize and independently control latent attributes underlying the speech signal.

A DERIVATION OF REPARAMETERIZED TRAINING OBJECTIVES
This section gives detailed derivation of the evidence lower bound (ELBO) estimation used for training. We first present a differentiable Monte Carlo estimation of the posterior q(y l | X), and then derive an ELBO for each of the graphical models in Figure 1, which differ in whether an additional observed attribute representation z o is used.

A.1 MONTE CARLO ESTIMATION OF THE REPARAMETERZIED CATEGORICAL POSTERIOR
As shown in equation 2, we approximate the posterior over latent attribute class y l with where q(z l | X) is a diagonal-covariance Gaussian, and p(y l | z l ) is the probability of z l being drawn from the y l -th Gaussian mixture component. We first denote the mean vector and the diagonal elements of the covariance matrix of the y l -th component as µ l,y l and σ 2 l,y l , and write the posterior over mixture components given a latent attribute representation, p(y l | z l ): with f (z l ; µ l,y l , σ 2 l,y l ) = exp − 1 2 (z l − µ l,y l ) diag(σ 2 l,y l ) −1 (z l − µ l,y l ) where D is the dimensionality of z l , and K is the number of classes for y l .
Finally, we denote the posterior mean and variance of q(z l | X) byμ l andσ 2 l , and compute a Monte Carlo estimate of the expectation in equation 5 after reparameterization: :=q(y l | X), wherez (n) l =μ l +σ l (n) is a random sample, drawn from a standard Gaussian distribution using (n) ∼ N (0, I), and N is the number of samples used for the Monte Carlo estimation, which is set to 1. The resulting estimateq(y l | X) is differentiable w.r.t. the parameters of p(z l | y l ) and q(z l | X).

A.2 DIFFERENTIABLE TRAINING OBJECTIVE
We next derive the ELBO L(p, q; X, y t , y o ) and rewrite it as a Monte Carlo estimate used for training: :=L(p, q; X, y t , y o ), wherez (n ) l =μ l +σ l (n ) , (n ) ∼ N (0, I), andL(p, q; X, y t , y o ) is the estimator used for training. Similarly, N is the number of samples used for the Monte Carlo estimate, which is set to 1.

A.3 DIFFERENTIABLE TRAINING OBJECTIVE WITH OBSERVED ATTRIBUTE REPRESENTATION
In this section, we derive the ELBO L o (p, q; X, y t , y o ) when using an additional observed attribute representation, z o , as described in Section 2.3, and rewrite it with a Monte Carlo estimation used for training. As before, we denote the posterior mean and variance of q( :=L o (p, q; X, y y , y o ), where the continuous latent variables are reparameterized asz

B NEURAL NETWORK ARCHITECTURE DETAILS
We parameterize three distributions: p(X|y t , z o , z l ), q(z o |X), and q(z l |X) with neural networks, referred to in Figure 8 as the synthesizer, observed encoder, and latent encoder, respectively. The model is comprised of three modules: a synthesizer, a latent encoder, and an observed encoder.

B.1 SYNTHESIZER
The synthesizer is an attention-based sequence-to-sequence network which generates a mel spectrogram as a function of an input text sequence and conditioning signal generated by the auxiliary encoder networks. It closely follows the network architecture of Tacotron 2 . The input text sequence is encoded by three convolutional layers, which contains 512 filters with shape 5 × 1, followed by a bidirectional long short-term memory (LSTM) of 256 units for each direction.
The resulting text encodings are accessed by the decoder through a location sensitive attention mechanism (Chorowski et al., 2015), which takes attention history into account when computing a normalized weight vector for aggregation.
The base Tacotron 2 autoregressive decoder network takes as input the aggregated text encoding, and the bottlenecked previous frame (processed by a pre-net comprised of two fully-connected layers of 256 units). To condition the output on additional attribute representations, the decoder is extended to consume z l and z o (or y o ) after passing them through a stack of two uni-directional LSTM layers with 1024 units. The output from the stacked LSTM is concatenated with the decoder input, and linearly projected to predict the mel spectrum of the current frame, as well as an end-of-sentence token. Finally, the predicted spectrogram frames are passed to a post-net, which predicts a residual that is added to the initial decoded sequence of spectrogram frames, to better model detail in the spectrogram and reduce the overall mean squared error.
Similar to Tacotron 2, we separately train a neural vocoder to invert a mel spectrograms to a timedomain waveform. In contrast to that work, we replace the WaveNet (van den Oord et al., 2016) vocoder with one based on the recently proposed WaveRNN (Kalchbrenner et al., 2018) architecture, which is more efficient during inference.

B.2 LATENT ENCODER AND OBSERVED ENCODER
Both the latent encoder and the observed encoder map a mel spectrogram from a reference speech utterance to two vectors of the same dimension, representing the posterior mean and log variance of the corresponding latent variable. We design both encoders to have exactly the same architecture, whose outputs are conditioned by the decoder in a symmetric way. Disentangling of latent attributes and observed attributes is therefore achieved by optimizing different KL-divergence objectives.
For each encoder, a mel spectrogram is first passed through two convolutional layers, which contains 512 filters with shape 3 × 1. The output of these convolutional layers is then fed to a stack of two bidirectional LSTM layers with 256 cells at each direction. A mean pooling layer is used to summarize the LSTM outputs across time, followed by a linear projection layer to predict the posterior mean and log variance.

C DETAILED EXPERIMENTAL SETUP
The network is trained using the Adam optimizer (Kingma & Ba, 2015), configured with an initial learning rate 10 −3 , and an exponential decay that halved the learning rate every 12.5k steps, beginning after 50k steps. Table 6 details the list of prior hyperparameters used for each of the four datasets described in Section 4: multi-speaker English data (multi-spk), noisified multi-speaker English data (noisy-multispk), single-speaker story-telling data (audiobooks), and crowd-sourced audiobook data (crowdsourced). To ensure numerical stability we set a minimum value allowed for the variance. We initially set the lower bound to e −0.5 ; however, with the exception of the multi-speaker English data, the trained variance reached the lower bound for all mixture components for all dimensions. We therefore lowered the minimum variance to e −2 , and found that it left sufficient range to capture the amount of variation.   Figure 9: Mel-spectrograms and F 0 tracks of three random samples drawn from each of six selected mixture components. Each component represents certain gender and accent group. The input text is "The fake lawyer from New Orleans is caught again." which emphasizes the difference between British and US accents. As mentioned in the paper, although samples from component 3 and 5 both capture US female voices, each component captures specific speakers with different F 0 ranges. The former ranges from 100 to 250 Hz, and the latter ranges from 200 to 350 Hz. Audio samples can be found at https://google.github.io/tacotron/publications/ gmvae_controllable_tts/#multispk_en.sample . All examples use the same input text: "The fake lawyer from New Orleans is caught again." The plots for dimension 0 (top row) and dimension 2 (second row) mainly show variation along the time axis. The underlying F 0 contour values do not change, however dimension 0 controls the duration of the initial pause before the speech begins, and dimension 2 controls the overall speaking rate, with the F 0 track stretching in time (i.e. slowing down) when moving from the left column to the right. Dimension nine (bottom row) mainly controls the degree of F 0 variation while maintaining the speed and starting offset. Finally, we note that differences in accent controlled by dimension 3 (third row) are easier to recognize by listening to audio samples, which can be found at https://google.github.io/tacotron/publications/ gmvae_controllable_tts/#multispk_en.control. To quantify how well the learned representation captures useful speaker information, we experimented with training classifiers for speaker attributes on the latent features. The test utterances were partitioned in a 9:1 ratio for training and evaluation, which contain 2,098 and 234 utterances, respectively. Three linear discriminant analysis (LDA) classifiers were trained on the latent attribute representations z l to predict speaker identity, gender and accent.  We evaluated the ability of the proposed model to synthesize speech that resembled the prosody or style of a given reference utterance, by conditioning on a latent attribute representation inferred from the reference. We adopted two metrics from Skerry-Ryan et al. (2018) to quantify style transfer performance: the mel-cepstral distortion(MCD 13 ), measuring the phonetic and timbral distortion, and F 0 frame error (FFE), which combines voicing decision error and F 0 error metrics to capture how well F 0 information, which encompasses much of the prosodic content, is retained. Both metrics assume that the generated speech and the reference speech are frame aligned. We therefore synthesized the same text content as the reference for this evaluation.  (32) 14.42 42.5% Table 8 compares the proposed model against the baseline and a 16-token GST model. The proposed model with a 16-dimensional z l (D = 16) was better than the baseline but inferior to the GST model. Because the GST model uses a four-head attention (Vaswani et al., 2017), it effectively has 60 degrees of freedom, which might explain why it performs better in replicating the reference style. By increasing the dimension of z l to 32 (D = 32), the gap to the GST model is greatly reduced. Note that the total number of parameters is still smaller than in the GST model.

F.2 NON-PARALLEL STYLE TRANSFER
"By water in the midst of water!" "And she began fancying the sort of thing that would happen: Miss Alice!" "She tasted a bite, and she read a word or two, and she sipped the amber wine and wiggled her toes in the silk stockings." Reference style 1 Reference style 2 Reference style 3 Figure 14: Mel-spectrograms of reference and synthesized style transfer utterances. The four reference utterances are shown on the top, and the four synthesized style transfer samples are shown below, where each row uses the same input text (shown above the spectrograms), and each column is conditioned on the z l inferred from the reference in the top row. From left to right, the voices of the three reference utterances can be described as (1) tremulous and high-pitched, (2) rough, low-pitched, and terrifying, and (3) deep and masculine. In all cases, the synthesized samples resemble the prosody and the speaking style of the reference. For example, samples in the first column have the highest F 0 (positively correlated to the spacing between horizontal stripes) and more tremulous (vertical fluctuations), and spectrograms in the middle column are more blurred, related to roughness of a voice. Audio samples can be found at https://google.github.io/tacotron/ publications/gmvae_controllable_tts/#singlespk_audiobook.transfer Figure 14 demonstrates that the GMVAE-Tacotron can also be applied in a non-parallel style transfer scenario to generate speech whose text content differs significantly from the reference.

F.3 RANDOM STYLE SAMPLES
Text 1 Text 2 Text 3 Sample 1 Sample 2 Sample 3 Sample 4 Sample 5 Figure 15: Mel-spectrograms and F 0 tracks of different input text with five random samples of z l drawn from the prior. The three input text sequences from left to right are: (1) "We must burn the house down! said the Rabbit's voice.", (2) "And she began fancying the sort of thing that would happen: Miss Alice!", and (3) "She tasted a bite, and she read a word or two, and she sipped the amber wine and wiggled her toes in the silk stockings." The five samples of z l encode different styles: the first sample has the fastest speaking rate, the third sample has the slowest speaking rate, and the fourth sample has the highest F 0 . Audio samples can be found at https://google.github.io/tacotron/ publications/gmvae_controllable_tts/#singlespk_audiobook.sample

F.4 CONTROL OF STYLE ATTRIBUTES
Dimension 8: pitch Dimension 10: pause length Dimension 14: roughness Figure 16: Synthesized mel-spectrograms demonstrating independent control of speaking style and prosody. The same input text is used for all samples: "He waited a little, in the vain hope that she would relent: she turned away from him." In the top row, F 0 is controlled by setting different values for dimension eight. F 0 tracks show that the F 0 range increases from left to right, while other attributes such as speed and rhythm do not change. In the second row, the duration of pause before the phrase "she turned away from him." (red boxes) is varied. The three spectrograms are very similar, except for the width of the red boxes, indicating that only the pause duration changed. In the bottom row, the "roughness" of the voice is varied. The same region of spectrograms is zoomed-in for clarity, where the spectrograms became less blurry and the harmonics becomes better defined from left to right. Audio samples can be found at https://google.github.io/tacotron/ publications/gmvae_controllable_tts/#singlespk_audiobook.control. : Synthesized mel-spectrograms and F 0 tracks demonstrating independent control of attributes related to style, recording channel, and noise-condition. The same text input was used for all the samples: '"Are you Italian?" asked Uncle John, regarding the young man critically.' In each row we varied the value for a single dimension while holding other dimensions fixed. In the top row, we controlled the F 0 by traversing dimension zero. Note that the speaker identity did not change while traversing this dimension. In the second row, the F 0 contours did change while traversing this dimension; however, it can be seen from the spectrograms that the leftmost one attenuated the energy in low-frequency bands, and the rightmost one attenuated energy in high-frequency bands. This dimension appears to control the shape of a linear filter applied to the signal, perhaps corresponding to variation in microphone frequency response in the training data. In the third row, the F 0 contours did not change, either. However, the background noise level does vary while traversing this dimension, which can be heard on the demo page. In the bottom row, variation in the speaking rate can be seen while other attributes remain constant. Audio samples can be found at https://google.github.io/tacotron/publications/gmvae_ controllable_tts/#crowdsourced_audiobook.control.

G.2 SPEAKER SIMILARITY TEST
In this section we test whether the synthesized speech resembles the identity of the speaker of the reference utterance. For evaluation, we paired each synthesized utterance with the reference utterance for subjective MOS on speaker similarity. 3.03 ± 0.09 Proposed 2.79 ± 0.08 Table 9 compares the proposed model using denoised latent attribute representations to baseline systems on the two seen speaker sets, and to d-vector systems on the unseen clean speaker set. The d-vector systems used a separately trained speaker encoder model to extract speaker representations for TTS conditioning. Here we considered two speaker encoder models, one trained on the same train-clean partition as the proposed model, and another trained on a larger scale dataset containing 18K speakers. We denote these two systems as d-vector and d-vector (large), respectively.
On the seen clean speaker set, the proposed model achieved similar speaker similarity scores to the baseline. However, on the seen noisy speaker set, both the proposed model and the baseline model trained on denoised data were significantly worse than the baseline. We hypothesize that similarity of the acoustic conditions between the paired utterances biased the speaker similarity ratings. To confirm this hypothesis, we evaluated the speaker similarity of the ground truth utterances from a speaker whose recordings contained significant variation in acoustic conditions. As shown in Table 9, these ground truth utterances are also rated with a significantly lower MOS than the baseline, but were close to the proposed model and the denoised baseline. This result implies that this subjective speaker similarity test may not be reliable in the presence of noise and channel variation, requiring additional work to design a speaker similarity test that is unbiased to nuisance factors.
Finally, on the unseen clean speaker set, the proposed model achieved better speaker similarity scores than the d-vector-based system whose speaker representation extractor was trained on the same set as the TTS system, but worse than the d-vector-based system with the extractor trained on the larger dataset.