Skip to main content

Project description

This package (pymcd) computes Mel Cepstral Distortion (MCD) in python, which is used to assess the quality of the generated speech by comparing the discrepancy between generated and ground-truth speeches.

Overview

Mel Cepstral Distortion (MCD) is a measure of how different two sequences of mel cepstra are, which is widely used to evaluate the performance of speech synthesis models. The MCD metric compares k-th (default k=13) Mel Frequency Cepstral Coefficient (MFCC) vectors derived from the generated speech and ground truth, respectively.

The pymcd package provides scripts to compute a variety of forms of MCD score:

  • MCD (plain): the conventional MCD metric, which requires the lengths of two input speeches to be the same. Otherwise, it would simply extend the shorted speech to the length of longer one by padding zero for the time-domain waveform.
  • MCD-DTW: an improved MCD metric that adopts the Dynamic Time Warping (DTW) algorithm to find the minimum MCD between two speeches.
  • MCD-DTW-SL: MCD-DTW weighted by Speech Length (SL) evaluates both the length and the quality of alignment between two speeches. Based on the MCD-DTW metric, the MCD-DTW-SL incorporates an additional coefficient w.r.t. the difference between the lengths of two speeches.

More details of the above three types of MCD can be found in V2C: Visual Voice Cloning.

License

Please see the file License for details of the license and warranty for mcd.

Installation

Require Python 3, the package can be installed and updated using pip, i.e.,

pip install -U pymcd

Example

from pymcd.mcd import Calculate_MCD

# instance of MCD class
# three different modes "plain", "dtw" and "dtw_sl" for the above three MCD metrics
mcd_toolbox = Calculate_MCD(MCD_mode="plain")

# two inputs w.r.t. reference (ground-truth) and synthesized speeches, respectively
mcd_value = mcd_toolbox.calculate_mcd("001.wav", "002.wav")

Metadata

Release files for pymcd 0.2.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pymcd 0.2.1
File Size Uploaded
pymcd-0.2.1.tar.gz 3.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pymcd 0.2.1
File Interpreter ABI Platform
pymcd-0.2.1-py3-none-any.whl Python 3 none any Details

Total release size: 7.8 kB

Release files / pymcd-0.2.1.tar.gz

Download URL pymcd-0.2.1.tar.gz
Size 3.8 kB
Tags Source
SHA-256 checksum
How to use checksums
fe54081ef6c4e3ef4a3ebd6e5a93bd405d34d50865691a2843bcc9678071700e
BLAKE2b-256 checksum
How to use checksums
b071459a4afcb2d748ca8f8d13bc08f3beeef68d8cc42eb7da7d2e487c571036
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.2 tqdm/4.56.0 importlib-metadata/4.0.1 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.12

Release files / pymcd-0.2.1-py3-none-any.whl

Download URL pymcd-0.2.1-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
baf88a334acaf605d9dde43a56ba41f8760fc91a855448c76d51d2a4f14af6fa
BLAKE2b-256 checksum
How to use checksums
d04c81ae0227604d475a8bd92400150370e9eff0e1eadc730e4105d3f7955301
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.3 readme-renderer/34.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.2 tqdm/4.56.0 importlib-metadata/4.0.1 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.12

Release history Release notifications | RSS feed

This release

0.2.1 This release

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page