Package: mel-cepstral-distance
Mel-Cepstral DistanceCLI 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.Installationpipinstallmel-cepstral-distance--userUsage as CLImcd-cliExample# Download two example audio fileswgethttps://github.com/jasminsternkopf/mel_cepstral_distance/raw/main/examples/similar_audios/original.wav
wgethttps://github.com/jasminsternkopf/mel_cepstral_distance/raw/main/examples/similar_audios/inferred.wav# Calculate metricsmcd-clifrom-wavoriginal.wavinferred.wavOutput:Mel-Cepstral Distance: 19.013673608495836
Penalty: 0.11946050096339111
# Frames: 519This 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 libraryfrommel_cepstral_distanceimportget_metrics_wavs,get_metrics_mels,get_metrics_mels_pairwiseMain methodsget_metrics_wavsget_metrics_melsBoth 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.Development setup# updatesudoaptupdate# install Python 3.8-3.11 for ensuring that tests can be runsudoaptinstallpython3-pip\python3.8python3.8-devpython3.8-distutilspython3.8-venv\python3.9python3.9-devpython3.9-distutilspython3.9-venv\python3.10python3.10-devpython3.10-distutilspython3.10-venv\python3.11python3.11-devpython3.11-distutilspython3.11-venv# install pipenv for creation of virtual environmentspython3.8-mpipinstallpipenv--user# check out repogitclonehttps://github.com/jasminsternkopf/mel_cepstral_distance.gitcdmel_cepstral_distance# create virtual environmentpython3.8-mpipenvinstall--devRunning the tests# first, install the tool (see "Development setup")# then, navigate into the directory of the repocdmel_cepstral_distance# activate environmentpython3.8-mpipenvshell# run teststoxLicenseMIT LicenseReferencesKubichek, R. “Mel-Cepstral Distance Measure for Objective Speech Quality Assessment.” In Proceedings of IEEE Pacific Rim Conference on Communications Computers and Signal Processing, 1:125–28. Victoria, BC, Canada: IEEE, 1993.https://doi.org/10.1109/PACRIM.1993.407206.Muda, Lindasalwa, Mumtaj Begam, and I. Elamvazuthi. “Voice Recognition Algorithms Using Mel Frequency Cepstral Coefficient (MFCC) and Dynamic Time Warping (DTW) Techniques.” Journal of Computing vol. 2, no. 3 (March 2010): 6.AcknowledgmentsFunded by the Deutsche Forschungsgemeinschaft (DFG, German Research Foundation) – Project-ID 416228727 – CRC 1410CitationIf you want to cite this repo, you can use the BibTeX-entry generated by GitHub (seeAbout => Cite this repository).Sternkopf, J., & Taubert, S. (2024). mel-cepstral-distance (Version 0.0.3) [Computer software]. https://doi.org/10.5281/zenodo.10567255FAQHow were the default parameters set?We based some of the parameters on the two mentioned references and set the other ones by ourselves depending on the parameter description of the underlying libraries:hop-length-> 256: Kubichek & Muda et al.window-> hamming: Muda et al.n-mels-> 20: KubichekBattenberg et al. (2019)computed the first 13 MFCCsn-mfcc-> 16: by usn-fft-> 1024: by uscenter-> False: by ushtk-> False: by usnorm-> None: by usdtw-> True: by uscalculate the MCD-DTW, which is used as metric in works like:Shah et al., 2014VoiceLoop (Taigman et al., 2018)Capacitron (Battenberg et al., 2019)Attentron (Choi et al., 2020)Why is Python 3.12 not supported?The dependencynumbais currently not available for Python 3.12.