What Is Mel-Cepstral Distortion (MCD) in TTS?

Mel-Cepstral Distortion (MCD) is an objective metric used to evaluate the acoustic quality and spectral accuracy of synthesized speech compared to a ground-truth human recording. By measuring the distance between two sets of Mel-Cepstral Coefficients (MCEPs), MCD provides an automated way to assess how faithfully a Text-to-Speech (TTS) model reproduces the spectral envelope and timbre of a target voice. This guide explains the purpose of MCD, details the step-by-step mathematical calculation used to compute it, and highlights how to interpret the resulting values in speech synthesis workflows.

Understanding Mel-Cepstral Coefficients (MCEPs)

To understand MCD, one must first understand Mel-Cepstral Coefficients (MCEPs). In human speech production, sound is modeled as an excitation source (vocal folds) passing through a linear filter (the vocal tract). The vocal tract forms the spectral envelope, defining phonetic content and individual vocal timbre.

Cepstral analysis isolates this spectral envelope from the pitch harmonics. By applying the mel scale—a perceptual scale of pitches judged by listeners to be equal in distance—the frequency bins are warped to match human auditory sensitivity. MCEPs represent this warped spectral envelope compactly, typically retaining the lowest 13 to 25 coefficients (excluding the 0th coefficient, which primarily captures power/energy).

Why Use MCD to Measure TTS Accuracy?

Subjective listening tests, such as the Mean Opinion Score (MOS), are the gold standard for speech naturalness, but they are expensive, time-consuming, and prone to human bias. MCD acts as an objective, algorithmic counterpart that:

Step-by-Step Calculation of MCD

Calculating MCD involves three primary steps: feature extraction, temporal alignment, and distance computation.

1. Feature Extraction

Both the synthesized audio and the ground-truth reference audio are transformed into sequences of mel-cepstral vectors:

2. Time Alignment via Dynamic Time Warping (DTW)

A synthesized utterance rarely matches the natural reference audio frame-for-frame due to variations in speaking rate and pause lengths.

To compare corresponding phonetic segments accurately:

3. Euclidean Distance and Decibel Conversion

Once aligned, the Euclidean distance between the MCEP vectors of each aligned frame pair is computed and scaled to decibels (dB).

The frame-level MCD at frame \(t\) is calculated as:

\[\text{MCD}_t = \frac{10\sqrt{2}}{\ln 10} \sqrt{\sum_{d=1}^{D} \left(c_{t,d} - \hat{c}_{t,d}\right)^2}\]

Where:

The overall MCD for the entire utterance is the average of all aligned frame-level distances:

\[\text{MCD} = \frac{1}{T} \sum_{t=1}^{T} \text{MCD}_t\]

Where \(T\) is the total number of aligned frames.

Interpreting MCD Scores

MCD yields a non-negative value measured in decibels (dB):

Practical Limitations

While MCD is a vital diagnostic tool for spectral envelope matching, it does not provide a complete measure of voice naturalness:

Consequently, MCD is most effective when paired with complementary metrics, such as \(F_0\) Root Mean Square Error (RMSE) for pitch, duration error metrics, and perceptual listening tests.