Package: mcd
This package computes mel cepstral distortions in python.
Mel cepstral distortions are used in assessing the quality of synthesized
speech.OverviewMel cepstral distortion (MCD) is a measure of how different two sequences of
mel cepstra are.
It is used in assessing the quality of parametric speech synthesis systems,
including statistical parametric speech synthesis systems, the idea being that
the smaller the MCD between synthesized and natural mel cepstral sequences, the
closer the synthetic speech is to reproducing natural speech.
It is by no means a perfect metric for assessing the quality of synthetic
speech, but is often a useful indicator in conjunction with other metrics.The mcd package provides scripts to compute a variety of forms of MCD score:plain MCD, for which it is assumed that the two sequences to be compared are
already “aligned” in terms of their timing.plain MCD excluding certain segments, for example silence segments.MCD DTW, which uses dynamic time warping (DTW) to compute the minimum MCD
obtainable by “aligning” the two sequences.
This metric does not penalize differences in the timing between natural and
synthetic speech, which is often desirable.It also contains general purpose dynamic time warping code.LicensePlease see the fileLicensefor details of the license and warranty for
mcd.InstallationFor most purposes the simplest way to install mcd is to use pip.
For example in Debian and Ubuntu:sudo apt-get install python-numpy
sudo pip install mcdThe first command installs numpy from the system repository, since installing
numpy using pip is generally not recommended.
The second command installs the latest released version ofmcd on PyPI, together with any currently
uninstalled python packages required by mcd.mcd can also be installed in a virtualenv:sudo apt-get install python-numpy
virtualenv --system-site-packages env
env/bin/pip install mcdThe latest development version of mcd is available from a github repository
(see below).To check that mcd is installed correctly you can run the test suite:python -m unittest discover mcdExamplesExamples of example usage (in unix) are given inexample_usage.DevelopmentThe source code is hosted in themcd github repository.
To obtain the latest source code using git:git clone git://github.com/MattShannon/mcd.gitDevelopment is in fact done usingdarcs, with the darcs
repository converted to a git repository usingdarcs-to-git.To install any currently uninstalled python packages required by mcd:sudo apt-get install cython python-numpy
sudo pip install -r requirements.txtTo compile the cython part of mcd in the current directory:python setup.py build_ext --inplaceThis command must be run after every modification to the source.pyxfiles.To run the full test suite, including tests of command-line tools, on the
working copy:python -m unittest discover mcd
PYTHONPATH=. python bin/test_cli.pyA note onsetup.pyThe includedsetup.pyfile operates in one of two modes depending on
whether or not the filedevis present in the project root directory.
In development mode (devpresent, as for the github repository), thebuild_extcommand uses cython to compile cython modules from their.pyxsource, and thesdistcommand is modified to first use cython to compile
cython modules from their.pyxsource to.cfiles.
In distribution mode (devabsent, as for source distributions such as the
code on PyPI), thebuild_extcommand uses a C compiler to directly compile
cython modules from the corresponding.cfiles.
This approach ensures that source distributions can be installed on systems
without cython or with an incompatible version of cython, while ensuring that
distributed.cfiles are always up-to-date and that the source.pyxfiles are used instead of.cfiles during development.The author would welcome any suggestions for more elegant ways to achieve a
similar effect to the approach described above!BugsPlease use theissue trackerto submit bug
reports.ContactThe author of mcd isMatt Shannon.