Diffusion-Based Voice Conversion with Fast Maximum Likelihood Sampling Scheme

Voice conversion is a common speech synthesis task which can be solved in different ways depending on a particular real-world scenario. The most challenging one often referred to as one-shot many-to-many voice conversion consists in copying the target voice from only one reference utterance in the most general case when both source and target speakers do not belong to the training dataset. We present a scalable high-quality solution based on diffusion probabilistic modeling and demonstrate its superior quality compared to state-of-the-art one-shot voice conversion approaches. Moreover, focusing on real-time applications, we investigate general principles which can make diffusion models faster while keeping synthesis quality at a high level. As a result, we develop a novel Stochastic Differential Equations solver suitable for various diffusion model types and generative tasks as shown through empirical studies and justify it by theoretical analysis.


INTRODUCTION
Voice conversion (VC) is the task of copying the target speaker's voice while preserving the linguistic content of the utterance pronounced by the source speaker. Practical VC applications often require a model which is able to operate in one-shot mode (i.e. when only one reference utterance is provided to copy the target speaker's voice) for any source and target speakers. Such models are usually referred to as one-shot many-to-many models (or sometimes zero-shot many-to-many models, or just any-to-any VC models). It is challenging to build such a model since it should be able to adapt to a new unseen voice having only one spoken utterance pronounced with it, so it was not until recently that successful one-shot VC solutions started to appear.
Conventional one-shot VC models are designed as autoencoders whose latent space ideally contains only the linguistic content of the encoded utterance while target voice identity information (usually taking shape of speaker embedding) is fed to the decoder as conditioning. Whereas in the pioneering AutoVC model (Qian et al., 2019) only speaker embedding from the pre-trained speaker verification network was used as conditioning, several other models improved on AutoVC enriching conditioning with phonetic features such as pitch and loudness (Qian et al., 2020;Nercessian, 2020), or training voice conversion and speaker embedding networks jointly (Chou & Lee, 2019). Also, several papers (Lin et al., 2021;Ishihara & Saito, 2020;Liu et al., 2021b) made use of attention mechanism to better fuse specific features of the reference utterance into the source utterance thus improving the decoder performance. Apart from providing the decoder with sufficiently rich information, one of the main problems autoencoder VC models face is to disentangle source speaker identity from speech content in the encoder. Some models (Qian et al., 2019;Nercessian, 2020) solve this problem by introducing an information bottleneck. Among other popular solutions of the disentanglement problem one can mention applying vector quantization technique to the content information (Wu et al., 2020;Wang et al., 2021), utilizing features of Variational AutoEncoders (Luong & Tran, 2021; The model we propose in this paper solves the disentanglement problem by employing the encoder predicting "average voice": it is trained to transform mel features corresponding to each phoneme into mel features corresponding to this phoneme averaged across a large multi-speaker dataset. As for decoder, in our VC model, it is designed as a part of a Diffusion Probabilistic Model (DPM) since this class of generative models has shown very good results in speech-related tasks like raw waveform generation (Chen et al., 2021a;Kong et al., 2021) and mel feature generation (Popov et al., 2021;Jeong et al., 2021). However, this decoder choice poses a problem of slow inference because DPM forward pass scheme is iterative and to obtain high-quality results it is typically necessary to run it for hundreds of iterations (Ho et al., 2020;Nichol & Dhariwal, 2021). Addressing this issue, we develop a novel inference scheme that significantly reduces the number of iterations sufficient to produce samples of decent quality and does not require model re-training. Although several attempts have been recently made to reduce the number of DPM inference steps (Song et al., 2021a;San-Roman et al., 2021;Watson et al., 2021;Kong & Ping, 2021;Chen et al., 2021a), most of them apply to some particular types of DPMs. In contrast, our approach generalizes to all popular kinds of DPMs and has a strong connection with likelihood maximization. This paper has the following structure: in Section 2 we present a one-shot many-to-many VC model and describe DPM it relies on; Section 3 introduces a novel DPM sampling scheme and establishes its connection with likelihood maximization; the experiments regarding voice conversion task as well as those demonstrating the benefits of the proposed sampling scheme are described in Section 4; we conclude in Section 5.

VOICE CONVERSION DIFFUSION MODEL
As with many other VC models, the one we propose belongs to the family of autoencoders. In fact, any conditional DPM with data-dependent prior (i.e. terminal distribution of forward diffusion) can be seen as such: forward diffusion gradually adding Gaussian noise to data can be regarded as encoder while reverse diffusion trying to remove this noise acts as a decoder. DPMs are trained to minimize the distance (expressed in different terms for different model types) between the trajectories of forward and reverse diffusion processes thus, speaking from the perspective of autoencoders, minimizing reconstruction error. Data-dependent priors have been proposed by Popov et al. (2021) and Lee et al. (2021), and we follow the former paper due to the flexibility of the continuous DPM framework used there. Our approach is summarized in Figure 1.
Figure 1: VC model training and inference. Y stands for the training mel-spectrogram at training and the target mel-spectrogram at inference. Speaker conditioning in the decoder is enabled by the speaker conditioning network g t (Y ) where Y = {Y t } t∈[0,1] is the whole forward diffusion trajectory starting at Y 0 . Dotted arrows denote operations performed only at training.

ENCODER
We choose average phoneme-level mel features as speaker-independent speech representation. To train the encoder to convert input mel-spectrograms into those of "average voice", we take three steps: (i) first, we apply Montreal Forced Aligner (McAuliffe et al., 2017) to a large-scale multi-speaker LibriTTS dataset (Zen et al., 2019) to align speech frames with phonemes; (ii) next, we obtain average mel features for each particular phoneme by aggregating its mel features across the whole LibriTTS dataset; (iii) the encoder is then trained to minimize mean square error between output mel-spectrograms and ground truth "average voice" mel-spectrograms (i.e. input mel-spectrograms where each phoneme mel feature is replaced with the average one calculated on the previous step).
The encoder has exactly the same Transformer-based architecture used in Grad-TTS (Popov et al., 2021) except that its inputs are mel features rather than character or phoneme embeddings. Note that unlike Grad-TTS the encoder is trained separately from the decoder described in the next section.

DECODER
Whereas the encoder parameterizes the terminal distribution of the forward diffusion (i.e. the prior), the reverse diffusion is parameterized with the decoder. Following Song et al. (2021c) we use Itô calculus and define diffusions in terms of stochastic processes rather than discrete-time Markov chains.
The general DPM framework we utilize consists of forward and reverse diffusions given by the following Stochastic Differential Equations (SDEs): where t ∈ [0, 1], − → W and ← − W are two independent Wiener processes in R n , β t is non-negative function referred to as noise schedule, s θ is the score function with parameters θ andX is n-dimensional vector. It can be shown (Popov et al., 2021) that the forward SDE (1) allows for explicit solution: where I is n × n identity matrix. Thus, if noise follows linear schedule β t = β 0 + t(β 1 − β 0 ) for β 0 and β 1 such that e − 1 0 βsds is close to zero, then Law (X 1 ) is close to N (X, I) which is the prior in this DPM. The reverse diffusion (2) is trained by minimizing weighted L 2 loss: where p t|0 (X t |X 0 ) is the probability density function (pdf) of the conditional distribution (3) and At training, time variable t is sampled uniformly from [0, 1], noisy samples X t are generated according to the formula (3) and the formula (5) is used to calculate loss function L on these samples. Note that X t can be sampled without the necessity to calculate intermediate values {X s } 0<s<t which makes optimization task (4) time and memory efficient. A well-trained reverse diffusion (2) has trajectories that are close to those of the forward diffusion (1), so generating data with this DPM can be performed by samplingX 1 from the prior N (X, I) and solving SDE (2) backwards in time.
The described above DPM was introduced by Popov et al. (2021) for text-to-speech task and we adapt it for our purposes. We putX = ϕ(X 0 ) where ϕ is the encoder, i.e.X is the "average voice" mel-spectrogram which we want to transform into that of the target voice. We condition the decoder s θ = s θ (X t ,X, g t (Y ), t) on some trainable function g t (Y ) to provide it with information about the target speaker (Y stands for forward trajectories of the target mel-spectrogram at inference and the ones of the training mel-spectrogram at training). This function is a neural network trained jointly with the decoder. We experimented with three input types for this network: • d-only -the input is the speaker embedding extracted from the target mel-spectrogram Y 0 with the pre-trained speaker verification network employed in (Jia et al., 2018); • wodyn -in addition, the noisy target mel-spectrogram Y t is used as input; • whole -in addition, the whole dynamics of the target mel-spectrogram under forward diffusion {Y s |s = 0.5/15, 1.5/15, .., 14.5/15} is used as input.
The decoder architecture is based on U-Net (Ronneberger et al., 2015) and is the same as in Grad-TTS but with four times more channels to better capture the whole range of human voices. The speaker conditioning network g t (Y ) is composed of 2D convolutions and MLPs and described in detail in Appendix H. Its output is 128-dimensional vector which is broadcast-concatenated to the concatenation ofX t andX as additional 128 channels.

RELATED VC MODELS
To the best of our knowledge, there exist two diffusion-based voice conversion models: VoiceGrad (Kameoka et al., 2020) and DiffSVC (Liu et al., 2021a). The one we propose differs from them in several important aspects. First, neither of the mentioned papers considers a one-shot many-tomany voice conversion scenario. Next, these models take no less than 100 reverse diffusion steps at inference while we pay special attention to reducing the number of iterations (see Section 3) achieving good quality with as few as 6 iterations. Furthermore, VoiceGrad performs voice conversion by running Langevin dynamics starting from the source mel-spectrogram, thus implicitly assuming that forward diffusion trajectories starting from the mel-spectrogram we want to synthesize are likely to pass through the neighborhood of the source mel-spectrogram on their way to Gaussian noise. Such an assumption allowing to have only one network instead of encoder-decoder architecture is too strong and hardly holds for real voices. Finally, DiffSVC performs singing voice conversion and relies on PPGs as speaker-independent speech representation.

MAXIMUM LIKELIHOOD SDE SOLVER
In this section, we develop a fixed-step first-order reverse SDE solver that maximizes the loglikelihood of sample paths of the forward diffusion. This solver differs from general-purpose Euler-Maruyama SDE solver (Kloeden & Platen, 1992) by infinitesimally small values which can however become significant when we sample from diffusion model using a few iterations.
Consider the following forward and reverse SDEs defined in Euclidean space R n for t ∈ [0, 1]: Following Song et al. (2021c) we will call DPM (6) Variance Preserving (VP). For simplicity we will derive maximum likelihood solver for this particular type of diffusion models. The equation (1) underlying VC diffusion model described in Section 2 can be transformed into the equation (6-F) by a constant shift and we will call such diffusion models Mean Reverting Variance Preserving (MR-VP). VP model analysis carried out in this section can be easily extended (see Appendices D, E and F) to MR-VP model as well as to other common diffusion model types such as sub-VP and VE described by Song et al. (2021c).
The forward SDE (6-F) allows for explicit solution: for all 0 ≤ s < t ≤ 1. This formula is derived by means of Itô calculus in Appendix A. The reverse SDE (6-R) parameterized with a neural network s θ is trained to approximate gradient of the log-density of noisy data X t : where the expectation is taken with respect to noisy data distribution Law(X t ) with pdf p t (·) and λ t is some positive weighting function. Note that certain Lipschitz constraints should be satisfied by coefficients of SDEs (6) to guarantee existence of strong solutions (Liptser & Shiryaev, 1978), and throughout this section we assume these conditions are satisfied as well as those from (Anderson, 1982) which guarantee that pathsX generated by the reverse SDE (6-R) for the optimal θ * equal forward SDE (6-F) paths X in distribution.
The generative procedure of a VP DPM consists in solving the reverse SDE (6-R) backwards in time starting fromX 1 ∼ N (0, I). Common Euler-Maruyama solver introduces discretization error (Kloeden & Platen, 1992) which may harm sample quality when the number of iterations is small. At the same time, it is possible to design unbiased (Henry-Labordère et al., 2017) or even exact (Beskos & Roberts, 2005) numerical solvers for some particular SDE types. The Theorem 1 shows that in the case of diffusion models we can make use of the forward diffusion (6-F) and propose a reverse SDE solver which is better than the general-purpose Euler-Maruyama one in terms of likelihood.
The solver proposed in the Theorem 1 is expressed in terms of the values defined as follows: where n is data dimensionality, Var (X 0 |X t ) is the covariance matrix of the conditional data distribution Law(X 0 |X t ) (so, Tr(Var (X 0 |X t )) is the overall variance across all n dimensions) and the expectation E Xt [·] is taken with respect to the unconditional noisy data distribution Law(X t ).
Theorem 1. Consider a DPM characterized by SDEs (6) with reverse diffusion trained till optimality. Let N ∈ N be any natural number and h = 1/N . Consider the following class of fixed step size h reverse SDE solvers parameterized with triplets of real numbers where θ * is given by (8), t = 1, 1 − h, .., h and ξ t are i.i.d. samples from N (0, I). Then: (ii) Assume that the SDE solver (11) starts from random variableX 1 ∼ Law (X 1 ). If X 0 is a constant or a Gaussian random variable with diagonal isotropic covariance matrix (i.e. δ 2 I for δ > 0), then generative modelX is exact The Theorem 1 provides an improved DPM sampling scheme which comes at no additional computational cost compared to standard methods (except for data-dependent term in σ * as discussed in Section 4.3) and requires neither model re-training nor extensive search on noise schedule space. The proof of this theorem is given in Appendix C. Note that it establishes optimality of the reverse SDE solver (11) with the parameters (10) in terms of likelihood of discrete paths X = {X kh } N k=0 while the optimality of continuous model (6-R) on continuous paths {X t } t∈[0,1] is guaranteed for a model with parameters θ = θ * as shown in (Song et al., 2021c).
The class of reverse SDE solvers considered in the Theorem 1 is rather broad: it is the class of all fixed-step solvers whose increments at time t are linear combination ofX t , s θ (X t , t) and Gaussian noise with zero mean and diagonal isotropic covariance matrix. As a particular case it includes (1)) (the proof is given in Appendix B), so the optimal SDE solver significantly differs from general-purpose Euler-Maruyama solver only when N is rather small or t has the same order as h, i.e. on the final steps of DPM inference. Appendix G contains toy examples demonstrating the difference of the proposed optimal SDE solver and Euler-Maruyama one depending on step size.
The result (ii) from the Theorem 1 strengthens the result (i) for some particular data distributions, but it may seem useless since in practice data distribution is far from being constant or Gaussian. However, in case of generation with strong conditioning (e.g. mel-spectrogram inversion) the assumptions on the data distribution may become viable: in the limiting case when our model is conditioned on c = ψ(X 0 ) for an injective function ψ, random variable X 0 |c becomes a constant ψ −1 (c).

EXPERIMENTS
We trained two groups of models: Diff-VCTK models on VCTK (Yamagishi et al., 2019) dataset containing 109 speakers (9 speakers were held out for testing purposes) and Diff-LibriTTS models on LibriTTS (Zen et al., 2019) containing approximately 1100 speakers (10 speakers were held out). For every model both encoder and decoder were trained on the same dataset. Training hyperparameters, implementation and data processing details can be found in Appendix I. For mel-spectrogram inversion, we used the pre-trained universal HiFi-GAN vocoder (Kong et al., 2020) operating at 22.05kHz. All subjective human evaluation was carried out on Amazon Mechanical Turk (AMT) with Master assessors to ensure the reliability of the obtained Mean Opinion Scores (MOS). In all AMT tests we considered unseen-to-unseen conversion with 25 unseen (for both Diff-VCTK and Diff-LibriTTS) speakers: 9 VCTK speakers, 10 LibriTTS speakers and 6 internal speakers. For VCTK source speakers we also ensured that source phrases were unseen during training. We place other details of listening AMT tests in Appendix J. A small subset of speech samples used in them is available at our demo page https://diffvc-fast-ml-solver.github.io which we encourage to visit.
As for sampling, we considered the following class of reverse SDE solvers: where t = 1, 1 − h, .., h and ξ t are i.i.d. samples from N (0, I).
h and σ * t,h are given by (10)) it becomes maximum likelihood reverse SDE solver for MR-VP DPM (1-2) as shown in Appendix D. In practice it is not trivial to estimate variance of the conditional distribution Law (X 0 |X t ), so we skipped this term in σ * t,h assuming this variance to be rather small because of strong conditioning on g t (Y ) and just used We also experimented with Euler-Maruyama solver EM-N (i.e.κ t,h = 0,ω t,h = 0,σ t,h = √ β t h) and "probability flow sampling" from (Song et al., 2021c)

SPEAKER CONDITIONING ANALYSIS
For each dataset we trained three models -one for each input type for the speaker conditioning network g t (Y ) (see Section 2.2). Although these input types had much influence neither on speaker similarity nor on speech naturalness, we did two experiments to choose the best models (one for each training dataset) in terms of speaker similarity for further comparison with baseline systems. We compared voice conversion results (produced by ML-30 sampling scheme) on 92 source-target pairs. AMT workers were asked which of three models (if any) sounded most similar to the target speaker and which of them (if any) sounded least similar. For Diff-VCTK and Diff-LibriTTS models each conversion pair was evaluated 4 and 5 times respectively. Table 1 demonstrates that for both Diff-VCTK and Diff-LibriTTS the best option is wodyn, i.e. to condition the decoder at time t on the speaker embedding together with the noisy target mel-spectrogram Y t . Conditioning on Y t allows making use of diffusion-specific information of how the noisy target sounds whereas embedding from the pre-trained speaker verification network contains information only about the clean target. Taking these results into consideration, we used Diff-VCTK-wodyn and Diff-LibriTTS-wodyn in the remaining experiments.

ANY-TO-ANY VOICE CONVERSION
We chose four recently proposed VC models capable of one-shot many-to-many synthesis as the baselines: • AGAIN-VC (Chen et al., 2021b), an improved version of a conventional autoencoder AdaIN-VC solving the disentanglement problem by means of instance normalization; • FragmentVC (Lin et al., 2021), an attention-based model relying on wav2vec 2.0 (Baevski et al., 2020) to obtain speech content from the source utterance; • VQMIVC (Wang et al., 2021), state-of-the-art approach among those employing vector quantization techniques; As shown in , PPG-based VC models provide high voice conversion quality competitive even with that of the state-of-the-art VC models taking text transcription corresponding to the source utterance as input. Therefore, we can consider BNE-PPG-VC a state-of-the-art model in our setting.
Baseline voice conversion results were produced by the pre-trained VC models provided in official GitHub repositories. Since only BNE-PPG-VC has the model pre-trained on a large-scale dataset (namely, LibriTTS + VCTK), we did two subjective human evaluation tests: the first one comparing Diff-VCTK with AGAIN-VC, FragmentVC and VQMIVC trained on VCTK and the second one comparing Diff-LibriTTS with BNE-PPG-VC. The results of these tests are given in Tables 2 and  3 respectively. Speech naturalness and speaker similarity were assessed separately. AMT workers evaluated voice conversion quality on 350 source-target pairs on 5-point scale. In the first test, each pair was assessed 6 times on average both in speech naturalness and speaker similarity evaluation; as for the second one, each pair was assessed 8 and 9 times on average in speech naturalness and speaker similarity evaluation correspondingly. No less than 41 unique assessors took part in each test. Table 2 demonstrates that our model performs significantly better than the baselines both in terms of naturalness and speaker similarity even when 6 reverse diffusion iterations are used. Despite working almost equally well on VCTK speakers, the best baseline VQMIVC shows poor performance on other speakers perhaps because of not being able to generalize to different domains with lower recording quality. Although Diff-VCTK performance also degrades on non-VCTK speakers, it achieves good speaker similarity of MOS 3.6 on VCTK ones when ML-30 sampling scheme is used and only slightly worse MOS 3.5 when 5x less iterations are used at inference.  , BNE-PPG-VC has fewer mispronunciation issues than our model but synthesized speech suffers from more sonic artifacts. This observation makes us believe that incorporating PPG features in the proposed diffusion VC framework is a promising direction for future research. Table 3 also demonstrates the benefits of the proposed maximum likelihood sampling scheme over other sampling methods for a small number of inference steps: only ML-N scheme allows us to use as few as N = 6 iterations with acceptable quality degradation of MOS 0.2 and 0.1 in terms of naturalness and speaker similarity respectively while two other competing methods lead to much more significant quality degradation. Figure 2: CIFAR-10 images randomly sampled from VP DPM by running 10 reverse diffusion steps with the following schemes (from left to right): "euler-maruyama", "probability flow", "maximum likelihood (τ = 0.5)", "maximum likelihood (τ = 1.0)".

MAXIMUM LIKELIHOOD SAMPLING
To show that the maximum likelihood sampling scheme proposed in Section 3 generalizes to different tasks and DPM types, we took the models trained by Song et al. (2021c) on CIFAR-10 image generation task and compared our method with other sampling schemes described in that paper in terms of Fréchet Inception Distance (FID).
The main difficulty in applying maximum likelihood SDE solver is estimating data-dependent term E[Tr (Var (X 0 |X t ))] in σ * t,h . Although in the current experiments we just set this term to zero, we can think of two possible ways to estimate it: (i) approximate Var (X 0 |X t ) with Var (X 0 |X t = X t ): sample noisy data X t , solve reverse SDE with sufficiently small step size starting from terminal conditionX t = X t several times, and calculate sample variance of the resulting solutions at initial pointsX 0 ; (ii) use the formula (58) from Appendix C to calculate Var (X 0 |X t ) assuming that X 0 is distributed normally with mean and variance equal to sample mean and sample variance computed on the training dataset. Experimenting with these techniques and exploring new ones seems to be an interesting future research direction.
Another important practical consideration is that the proposed scheme is proven to be optimal only for score matching networks trained till optimality. Therefore, in the experiments whose results are reported in Table 4 we apply maximum likelihood sampling scheme only when t ≤ τ while using standard Euler-Maruyama solver for t > τ for some hyperparameter τ ∈ [0, 1]. Such a modification relies on the assumption that score matching network is closer to being optimal for smaller noise. Table 4 shows that despite likelihood and FID are two metrics that do not perfectly correlate (Song et al., 2021b), in most cases our maximum likelihood SDE solver performs best in terms of FID. Also, it is worth mentioning that although τ = 1 is always rather a good choice, tuning this hyperparameter can lead to even better performance. One can find randomly chosen generated images for various sampling methods in Figure 2.

CONCLUSION
In this paper, the novel one-shot many-to-many voice conversion model has been presented. Its encoder design and powerful diffusion-based decoder made it possible to achieve good results both in terms of speaker similarity and speech naturalness even on out-of-domain unseen speakers. Subjective human evaluation verified that the proposed model delivers scalable VC solution with competitive performance. Furthermore, aiming at fast synthesis, we have developed and theoretically justified the novel sampling scheme. The main idea behind it is to modify the general-purpose Euler-Maruyama SDE solver so as to maximize the likelihood of discrete sample paths of the forward diffusion. Due to the proposed sampling scheme, our VC model is capable of high-quality voice conversion with as few as 6 reverse diffusion steps. Moreover, experiments on the image generation task show that all known diffusion model types can benefit from the proposed SDE solver.

A FORWARD VP SDE SOLUTION
Since function γ −1 0,t X t is linear in X t , taking its differential does not require second order derivative term in Itô's formula: Integrating this expression from s to t results in an Itô's integral: or The integrand on the right-hand side is deterministic and belongs to L 2 [0, 1] (for practical noise schedule choices), so its Itô's integral is a normal random variable, a martingale (meaning it has zero mean) and satisfies Itô's isometry which allows to calculate its variance: Thus
( 27) C PROOF OF THE THEOREM 1 The key fact necessary to prove the Theorem 1 is established in the following Lemma 1. Let p 0|t (·|x) be pdf of conditional distribution Law (X 0 |X t = x). Then for any t ∈ [0, 1] Proof of the Lemma 1. As mentioned in (Song et al., 2021c), an expression alternative to (8) can be derived for θ * under mild assumptions on the data density (Hyvärinen, 2005;Vincent, 2011): where Law (X 0 ) is data distribution with pdf p 0 (·) and Law (X t |X 0 = x 0 ) has pdf p t|0 (·|x 0 ). By Bayes formula we can rewrite this in terms of pdfs p t (·) and p 0|t (·|x t ) of distributions Law (X t ) and Law (X 0 |X t = x t ) correspondingly: For any n-dimensional random variable ξ with finite second moment and deterministic vector a we have In our case ξ = ∇log p t|0 (X t |X 0 ) and a = s θ (X t , t), so E ξ − Eξ 2 2 is independent of θ. Thus Therefore, the optimal score estimation network s θ * can be expressed as for all t ∈ [0, 1] and x ∈ supp {p t } = R n .
As proven in Appendix A, Law (X t |X 0 ) is Gaussian with mean vector γ 0,t X 0 and covariance matrix (1 − γ 2 0,t ) I, so finally we obtain Now let us prove the Theorem 1.
Proof of the Theorem 1. The sampling scheme (11) consists in adding Gaussian noise to a linear combination ofX t and s θ * (X t , t). Combining (11) and the Lemma 1 we get where ξ t are i.i.d. random variables from standard normal distribution N (0, I) for t = 1, 1 − h, .., h. Thus, the distributionX t−h |X t is also Gaussian: which leads to the following formula for the transition densities of the reverse diffusion: Moreover, comparingμ t,h andν t,h with µ t−h,t and ν t−h,t defined in (9) we deduce that If we also wantμ t,h = µ t−h,t to be satisfied, then we should have i.e.ν t,h = ν t−h,t andμ t,h = µ t−h,t iffκ t,h = κ * t,h andω t,h = ω * t,h for the parameters κ * t,h and ω * t,h defined in (10).
As for the corresponding densities of the forward process X, they are Gaussian when conditioned on the initial data point X 0 : where coefficients µ t−h,t , ν t−h,t and σ t−h,t are defined in (9). This formula for Law (X t−h |X t , X 0 ) follows from the general fact about Gaussian distributions appearing in many recent works on diffusion probabilistic modeling (Kingma et al., 2021): if Z t |Z s ∼ N (α t|s Z s , σ 2 t|s I) and Z t |Z 0 ∼ N (α t|0 Z 0 , σ 2 t|0 I) for 0 < s < t, then This fact is a result of applying Bayes formula to normal distributions. In our case α t|s = γ s,t and σ 2 t|s = 1 − γ 2 s,t .
To get an expression for the densities p t−h|t (x t−h |x t ) similar to (39), we need to integrate out the dependency on data X 0 from Gaussian distribution Law (X t−h |X t , X 0 ): which implies the following formula: Note that in contrast with the transition densities (39) of the reverse processX, the corresponding densities (45) of the forward process X are not normal in general.
Our goal is to find parametersκ,ω andσ that maximize log-likelihood of sample paths X under probability measure with transition densitiesp. Put t k = kh for k = 0, 1, .., N and write down this log-likelihood: The last term does not depend onκ,ω andσ, so we can ignore it. Let R k be the k-th term in the sum above. Since we are free to have different coefficientsκ t,h ,ω t,h andσ t,h for different steps, we can maximize each R k separately. Terms R k can be expressed as From now on we will skip subscripts of µ, ν, σ,μ,ν,σ,κ,ω, κ * and ω * for brevity. Denote Using the formula (44) for the densities of X together with the explicit expression for the Gaussian density p t k |t k+1 ,0 (x t k |X t k+1 , X 0 ) and applying Fubini's theorem to change the order of integration, we rewrite R k as The formula (48) implies that the integral of Q(x t k , X t k+1 , X 0 ) with respect to x t k can be seen as expectation of logp t k |t k+1 (ξ|X t k+1 ) with respect to normal random variable ξ with mean µX t k+1 + νX 0 and covariance matrix σ 2 I. Plugging in the expression (39) into (48), we can calculate this integral: Thus, terms R k we want to maximize equal Maximizing R k with respect to (κ,ω,σ) is equivalent to minimizing E Xt k+1 S k where S k is given by where the expectation with respect to ξ ∼ N (µX t k+1 + νX 0 , σ 2 I) can be calculated using the fact that for every vectorâ we can express E ξ ξ −â 2 2 as So, the outer expectation with respect to Law(X 0 |X t k+1 ) in (52) can be simplified: where all the expectations in the formula above are taken with respect to the conditional data distribution Law(X 0 |X t k+1 ). So, the resulting expression for the terms S k whose expectation with respect to Law (X t k+1 ) we want to minimize is Now it is clear that For this choice of parameters we have Note that E X 0 2 which is indeed satisfied by the parameters σ * t,h defined in (10). Thus, the statement (i) is proven.
When it comes to proving thatX is exact, we have to show that Law (X t k ) = Law (X t k ) for every k = 0, 1, .., N . By the assumption that Law (X 1 ) = Law (X 1 ) it is sufficient to prove thatp t k |t k+1 (x t k |x t k+1 ) ≡ p t k |t k+1 (x t k |x t k+1 ) since the exactness will follow from this fact by mathematical induction. If X 0 is a constant random variable, Law(X 0 |X t ) = Law (X 0 ) also corresponds to the same constant, so Var (X 0 |X t ) = 0 meaning that σ * t,h = σ t−h,t , and the formulae (39) and (45) imply the desired result.
Let us now consider the second case when X 0 ∼ N (μ, δ 2 I). It is a matter of simple but lengthy computations to prove another property of Gaussian distributions similar to (43): if and Z t ∼ N (μa t , (b 2 t + δ 2 a 2 t ) I). In our case a t = γ 0,t and b 2 t = 1 − γ 2 0,t , therefore So, Var (X 0 |X t ) does not depend on X t and Since Law (X t |X t−h ), Law (X t−h ) and Law (X t ) are Gaussian, Bayes formula implies that Law (X t−h |X t ) is Gaussian as well with the following mean and covariance matrix: The distribution Law (X t−h |X t ) is also Gaussian by the formula (39), so to conclude the proof we just need to show that for every x ∈ R n for the optimal parameters (10). Recall that for κ * t,h and ω * t,h Utilizing the formulae (9), (39), (58) and the fact that γ 0,t−h · γ t−h,t = γ 0,t (following from the definition of γ in (7)) we conclude that D REVERSE MR-VP SDE SOLVER MR-VP DPM is characterized by the following forward and reverse diffusions: Using the same method as in Appendix A, we can show that for s < t With the following notation: we can write down the parameters of Gaussian distribution X s |X t , X 0 : The Lemma 1 for MR-VP DPMs takes the following shape: The class of reverse SDE solvers we consider iŝ where t = 1, 1 − h, .., h and ξ t are i.i.d. samples from N (0, I). Repeating the argument of the Theorem 1 leads to the following optimal (in terms of likelihood of the forward diffusion sample paths) parameters: which are actually the same as the optimal parameters (10) for VP DPM. It is of no surprise since MR-VP DPM and VP-DPM differ only by a constant shift.

E REVERSE SUB-VP SDE SOLVER
Sub-VP DPM is characterized by the following forward and reverse diffusions: Using the same method as in Appendix A, we can show that for s < t Law (X t |X s ) = N (γ s,t X s , 1 + γ 4 0,t − γ 2 s,t (1 + γ 4 0,s ) I), γ s,t = e − 1 2 t s βudu .
Note that for s = 0 this expression simplifies to With the following notation: we can write down the parameters of Gaussian distribution X s |X t , X 0 : The Lemma 1 for sub-VP DPMs takes the following shape: The class of reverse SDE solvers we consider iŝ where t = 1, 1 − h, .., h and ξ t are i.i.d. samples from N (0, I). Repeating the argument of the Theorem 1 leads to the following optimal (in terms of likelihood of the forward diffusion sample paths) parameters: F REVERSE VE SDE SOLVER VE DPM is characterized by the following forward and reverse diffusions: conv / div 0.017 / div 0.085 / div conv / div 0.017 / div 0.085 / div N = 10 conv / 0.57 0.001/0.59 0.005/0.67 conv / 0.57 0.001/0.59 0.006/0.67 N = 100 conv / 0.01 conv / 0.01 conv / 0.01 conv / 0.01 conv / 0.01 conv / 0.01 N = 1000 conv / conv conv / conv conv / conv conv / conv conv / conv conv / conv • in accordance with the statement (ii) of the Theorem 1, the optimal Maximum Likelihood solver leads to exact data reconstruction in the case when data distribution is constant and score matching network is trained till optimality (i.e. ε = 0.0) irrespective of the number of steps N .
Also, in the second example where X 0 ∈ {i, −2i} the Maximum Likelihood SDE solver reconstructs the probabilities of these two points better than Euler-Maruyama which tends to output "i-samples" (which are closer to the origin) more frequently than "−2i-samples". E.g. for ε = 0.0 and N = 10 the frequency of "i-samples" generated by Euler-Maruyama scheme is 54% while this frequency for Maximum Likelihood scheme is 50% (500k independent runs were used to calculate these frequencies).

H SPEAKER CONDITIONING NETWORK
The function x · tanh(sof tplus(x)) is used as a non-linearity in the speaker conditioning network g t (Y ). First, time embedding t e is obtained by the following procedure: time t ∈ [0, 1] is encoded with positional encoding (Song et al., 2021c), then resulting 256-dimensional vector t is passed through the first linear module with 1024 units, then a non-linearity is applied to it and then it is passed through the second linear module with 256 units. Next, noisy mel-spectrogram Y t for wodyn input type or Y t concatenated with {Y s |s = 0.5/15, 1.5/15, .., 14.5/15} for whole is passed through 6 blocks consisting of 2D convolutional layers each followed by instance normalization and Gated Linear Unit. The number of input and output channels of these convolutions is (1, 64), (32, 64), (32, 128), (64, 128), (64, 256), (128, 256) for wodyn input type and the same but with 16 input channels in the first convolution for whole input type. After the 2nd and 4th blocks M LP 1 (t e ) and M LP 2 (t e ) are broadcast-added where M LP 1 (M LP 2 ) are composed of a nonlinearity followed by a linear module with 32 (64) units. After the last 6th block the result is passed through the final convolution with 128 output channels and average pooling along both time and frequency axes is applied resulting in 128-dimensional vector. All convolutions except for the final one have (kernel, stride, zero padding) = (3, 1, 1) while for the final one the corresponding parameters are (1, 0, 0). Denote the result of such processing of Y by c for wodyn and whole input types.
Clean target mel-spectrogram Y 0 is used to obtain 256-dimensional speaker embedding d with the pre-trained speaker verification network (Jia et al., 2018) which is not trained. Vectors d, c and t are concatenated (except for d-only input type where we concatenate only d and t ), passed through a linear module with 512 units followed by a non-linearity and a linear module with 128 units. The resulting 128-dimensional vector is the output of the speaker conditioning network g t (Y ).

I TRAINING HYPERPARAMETERS AND OTHER DETAILS
Encoders and decoders were trained with batch sizes 128 and 32 and Adam optimizer with initial learning rates 0.0005 and 0.0001 correspondingly. Encoders and decoders in VCTK models were trained for 500 and 200 epochs respectively; as for LibriTTS models, they were trained for 300 and 110 epochs. The datasets were downsampled to 22.05kHz which was the operating rate of our VC models. VCTK recordings were preprocessed by removing silence in the beginning and in the end of utterances. To fit GPU memory, decoders were trained on random speech segments of approximately 1.5 seconds rather than on the whole utterances. Training segments for reconstruction and the ones used as input to the speaker conditioning network g t (Y ) were different random segments extracted from the same training utterances. Noise schedule parameters β 0 and β 1 were set to 0.05 and 20.0.
Our VC models operated on mel-spectrograms with 80 mel features and sampling rate 22.05kHz. Short-Time Fourier Transform was used to calculate spectra with 1024 frequency bins. Hann window of length 1024 was applied with hop size 256.
For Diff-LibriTTS models we used simple spectral subtraction algorithm in mel domain with spectral floor parameter β = 0.02 as post-processing to reduce background noise sometimes produced by these models. Noise spectrum was estimated on speech fragments automatically detected as the ones corresponding to silence in source mel-spectrogram.

J DETAILS OF AMT TESTS
For fair comparison with the baselines all the recordings were downsampled to 16kHz; we also normalized their loudness. In speech naturalness tests workers chosen by geographic criterion were asked to assess the overall quality of the synthesized speech, i.e to estimate how clean and natural (human-sounding) it was. Five-point Likert scale was used: 1 -"Bad", 2 -"Poor", 3 -"Fair", 4 -"Good", 5 -"Excellent". Assessors were asked to wear headphones and work in a quiet environment. As for speaker similarity tests, workers were asked to assess how similar synthesized samples sounded to target speech samples in terms of speaker similarity. Assessors were asked not to pay attention to the overall quality of the synthesized speech (e.g. background noise or incorrect pronunciation). Five-point scale was used: 1 -"Different: absolutely sure", 2 -"Different: moderately sure", 3 -"Cannot decide more same or more different", 4 -"Same: moderately sure", 5 -"Same: absolutely sure".