All projects Generative Models

Flow-Matching Voice Conversion

One small generator, five generative objectives, compared fairly on changing who speaks.

Speech Technologies course (Prof. A. Brutti) 2026 Flow MatchingSchrödinger bridgeSpeech
Flow-Matching Voice Conversion diagram

Motivation

Voice conversion re-speaks a sentence in another person's voice: what is said must survive, who says it must change. I used the task as a controlled testbed for modern generative objectives. A single 7.8M-parameter DiT generator is trained from scratch on one T4 GPU, and every objective — flow matching, OT-CFM, MeanFlow, diffusion and bridge matching — uses exactly this network, so each comparison is architecture-matched by construction.

Method

The generator produces an 80-band mel spectrogram conditioned on frozen WavLM content features (layer 6) and a frozen ECAPA speaker embedding; a frozen HiFi-GAN turns the mel back into audio. Training is non-parallel: each clip reconstructs itself, and the voice swap only happens at inference. To stop the generator from reading identity out of the content features, the content branch sees an information-perturbed copy of the audio (formant, pitch and EQ shifts), while the target and speaker branch stay clean. Classifier-free guidance then gives a strength knob toward the target voice.

\[ \tilde v = v_\theta(x,t\mid c,\varnothing) + w\,\big(v_\theta(x,t\mid c,s) - v_\theta(x,t\mid c,\varnothing)\big) \]

Mathematical core

For the straight noise-to-data path, the score is available in closed form from the learned velocity, so the same model can be sampled by an ODE or by a family of SDEs without retraining — and at zero noise the SDE sampler reproduces the ODE exactly, which the notebook checks numerically. MeanFlow learns the average velocity over an interval for one-step sampling; I re-derived its consistency identity for my time convention, and bridge matching places the noise inside the path as a Brownian bridge, the first step of the Schrödinger-bridge iteration.

\[ s_\theta(x,t) = \frac{t\,v_\theta(x,t) - x}{1-t} \]

Results

Flow matching was already near its best at two to eight function evaluations; OT pairing gave no measurable gain, and one-step MeanFlow stayed below multi-step flow matching — consistent with strong per-frame conditioning already straightening the paths. Bridge matching matched or slightly exceeded flow matching on speaker similarity at higher step counts, while diffusion trailed at these budgets. Against the training-free kNN-VC baseline, kNN-VC wins on raw speaker similarity, but my generator keeps the words: 5.6% WER vs. 19.8%, stays stable with a single short reference clip, and can morph smoothly between speakers or produce new voices for anonymisation.