# Mel Cepstral Distortion

I am working on a speech synthesis model and I am looking to evaluate my synthesized speech. I found that most people use the Mel Cepstral Distortion (MCD) which can be calculated by the formula:

$$\frac{10}{ln10}\frac{1}{T}\sum_t\sum^{25}_i \sqrt{2||mc(t,i)-mc_{synth}(t,i)||^2}$$

I have ground truth speech and the synthesised version so I calculate the MFCCs for both (taking 25 coefficients) and then apply the formula. The result I get is around 300, which seems orders of magnitude larger than what I should get. I tried doing cepstral mean normalization which brings the number down to around 30 but I notice that most of the time this number is <10. The speech I synthesize is not so bad so I must be doing something wrong. Does anyone have any ideas?

P.S. The way I produce the speech ensures that it be aligned with the original(more or less). I wonder if a slight misalignment could cause this issue and if so should I use DTW to align the audios?

Edit Also If anyone knows of a library that calculated MCD when given an audio file then I could use that to compare my results.

• Is the segmentation the same across audio streams? If you can generate the timestamps of the frames the coefficients are calculated on then you might be able to compare the corresponding frames more accurately. – A_A Apr 2 '19 at 6:52
• I think the two signals are aligned. Do you think that misalignment is the problem I'm experiencing? Also I'm using frame length 20ms and stride 10ms for the mfccs. Could this be the problem – MrHat Apr 2 '19 at 7:22
• OK, another way to cross check the error quantity is to subtract one waveform from another. Is the error as small as you would expect in that case? – A_A Apr 2 '19 at 7:24
• when subtracting one from another I get an average difference of 35. My signals are 16-bit integers so they have values range [-32767, 32767]. To me this seems reasonable but I have no idea what others get when they synthesize. Another problem is I can't seem to find two reference signals for which the MCD is known so that I can try to reproduce that. – MrHat Apr 2 '19 at 7:32
• I am having similar issues in computing MCD. I need to compare results with a paper - which seems to have mcds of order 1-10, but in my computations we get a number that is 10 times larger. I am aligning my sequences (this is for speech waveforms) using the dtwalign tool, and then compute the MCD using the same formula above, with librosa to create mels and mfccs. There seems to be two ways of getting the mfccs, either through the raw waveform or through the mel spectrogram with librosa's api. Could you describe how you managed to reduce the disparity, if possible? – kakrafoon Jun 18 '19 at 21:49