CLI and library to compute the Mel-Cepstral Distance of two WAV files based on the paper 'Mel-Cepstral Distance Measure for Objective Speech Quality Assessment' by Robert F. Kubichek.
Project description
Mel-Cepstral Distance
CLI and library to compute the mel-cepstral distance of two WAV files based on the paper "Mel-Cepstral Distance Measure for Objective Speech Quality Assessment" by Robert F. Kubichek.
Installation
pip install mel-cepstral-distance --user
Usage as CLI
mcd-cli
Example
# Download two example audio files
wget https://github.com/jasminsternkopf/mel_cepstral_distance/raw/main/examples/similar_audios/original.wav
wget https://github.com/jasminsternkopf/mel_cepstral_distance/raw/main/examples/similar_audios/inferred.wav
# Calculate metrics
mcd-cli original.wav inferred.wav
Output:
Mel-Cepstral Distance: 19.013673608495836
Penalty: 0.11946050096339111
# Frames: 519
This will print a message informing you about the mel-cepstral distance and penalty between the audios whose paths were given as arguments and the number of frames that were used in the computation.
Usage as a library
from mel_cepstral_distance import get_metrics_wavs, get_metrics_mels
Methods
get_metrics_wavs
get_metrics_mels
Both methods return the mel-cepstral distance, the penalty and the final frame number. Examples and information on the parameters can be found in the corresponding documentations.
Dependencies
- librosa >= 0.9.1
- numpy >= 1.22.3
- scipy >= 1.8.0
- fastdtw >= 0.3.4
Contributing
If you notice an error, please don't hesitate to open an issue.
Citation
If you want to cite this repo, you can use this BibTeX-entry:
@misc{stmcd22,
author = {Sternkopf, Jasmin and Taubert, Stefan},
title = {mel-cepstral-distance},
year = {2022},
publisher = {GitHub},
journal = {GitHub repository},
howpublished = {\url{https://github.com/jasminsternkopf/mel_cepstral_distance}}
}
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for mel-cepstral-distance-0.0.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0663942c7f5e363d4f31daae4285c4254c8937d2a02a881feadfe14d83e48cad |
|
MD5 | 1e699ea51304f290c6c0b3a6d8903ff9 |
|
BLAKE2b-256 | d0f81ad8899f43e3846c30097e867eb8912fea50770880ed8beaf1c5b59b2dad |
Hashes for mel_cepstral_distance-0.0.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c7731fb58e66e39fe9c37ee087affec3dc04b4b6968a23e5d933eb7c55cc213 |
|
MD5 | 49202fcafe65dc32b83dd7a008846402 |
|
BLAKE2b-256 | ae4f3fbec63f7b8a12c58eb8de7ee522794e9367af36dbc2576dda82020be05c |