Giter Site home page Giter Site logo

jasminsternkopf / mel_cepstral_distance Goto Github PK

View Code? Open in Web Editor NEW
41.0 1.0 10.0 1.97 MB

Computes 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.

License: MIT License

Python 100.00%
mel-cepstral-distance mel speech-quality

mel_cepstral_distance's People

Contributors

jasminsternkopf avatar stefantaubert avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

mel_cepstral_distance's Issues

Error in wav file path

Thank you for providing this library,

I am having issue loading the path and it throws attribute error

Exception has occurred: AttributeError
'str' object has no attribute 'shape'
File "C:\laryngectomy\scripts\evaluation_2_metric.py", line 13, in
mcd = get_metrics_mels(wave1, wave2, n_mfcc=40)
AttributeError: 'str' object has no attribute 'shape'

Default Arguments

Thanks for the MCD implementation!

I tried to run the get_mcd_between_wav_files function with the three sets of example provided and got MCD around 8-14.
Could you please tell how the default arguments are set (e.g. based on some documents, etc.)?
since if I change the arguments, the result MCD change quite a lot,
e.g. if I change the argument n_mels to, like 40, the MCD would be around double.

Also I get the following message with I fill the path to .wav files in wav_file_1 and wav_file_2 arguments.
C:\...\mcd\mcd_computation.py:318: FutureWarning: Pass y=[...] as keyword args. From version 0.10 passing these as positional arguments will result in an error
Could this warning be avoid?

Failing tests on MacOS

Hello!
Thanks for the implementation :) I followed the steps provided in the README, but the tests fail. I tested it on MacOS Monterey using Python=3.8 in a conda environment. It seems to me, that the problem concerns floating point precision. I tested it additionally using Ubuntu 18.04 and the issue does not happen there.

Here's the stack trace of the failed tests:

========================================== FAILURES ===========================================
_______________________ test_mcd_pen_frames_of_similar_audios_with_dtw ________________________

    def test_mcd_pen_frames_of_similar_audios_with_dtw():
      mcd, pen, frames = get_metrics_wavs(SIM_ORIG, SIM_INF, use_dtw=True)
    
>     assert mcd == 8.613918026817169
E     assert 8.613918026207012 == 8.613918026817169

src/mel_cepstral_distance_tests/test_examples.py:26: AssertionError
___________________ test_mcd_pen_frames_of_somewhat_similar_audios_with_dtw ___________________

    def test_mcd_pen_frames_of_somewhat_similar_audios_with_dtw():
      mcd, pen, frames = get_metrics_wavs(SOSIM_ORIG, SOSIM_INF, use_dtw=True)
    
>     assert mcd == 9.62103176737408
E     assert 9.621031769396891 == 9.62103176737408

src/mel_cepstral_distance_tests/test_examples.py:34: AssertionError
______________________ test_mcd_pen_frames_of_dissimilar_audios_with_dtw ______________________

    def test_mcd_pen_frames_of_dissimilar_audios_with_dtw():
      mcd, pen, frames = get_metrics_wavs(DISSIM_ORIG, DISSIM_INF, use_dtw=True)
    
>     assert mcd == 13.983229820898327
E     assert 13.983229825697364 == 13.983229820898327

src/mel_cepstral_distance_tests/test_examples.py:42: AssertionError
______________________ test_mcd_pen_frames_of_similar_audios_without_dtw ______________________

    def test_mcd_pen_frames_of_similar_audios_without_dtw():
      mcd, pen, frames = get_metrics_wavs(SIM_ORIG, SIM_INF, use_dtw=False)
    
>     assert mcd == 19.526543043605322
E     assert 19.526543040998817 == 19.526543043605322

src/mel_cepstral_distance_tests/test_examples.py:58: AssertionError
_________________ test_mcd_pen_frames_of_somewhat_similar_audios_without_dtw __________________

    def test_mcd_pen_frames_of_somewhat_similar_audios_without_dtw():
      mcd, pen, frames = get_metrics_wavs(SOSIM_ORIG, SOSIM_INF, use_dtw=False)
    
>     assert mcd == 21.97334780846056
E     assert 21.973347810693944 == 21.97334780846056

src/mel_cepstral_distance_tests/test_examples.py:66: AssertionError
____________________ test_mcd_pen_frames_of_dissimilar_audios_without_dtw _____________________

    def test_mcd_pen_frames_of_dissimilar_audios_without_dtw():
      mcd, pen, frames = get_metrics_wavs(DISSIM_ORIG, DISSIM_INF, use_dtw=False)
    
>     assert mcd == 19.473360173721225
E     assert 19.47336017064123 == 19.473360173721225

src/mel_cepstral_distance_tests/test_examples.py:74: AssertionError

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.