python-MCD icon indicating copy to clipboard operation
python-MCD copied to clipboard

RuntimeError: failed to compute mgcep; error occured in theq

Open SangsakaWira opened this issue 5 years ago • 6 comments

Hello ttslr, thanks for your repo and give me some insight on how to calculate the MCD. However, there is an error I could not figure it out how to handle, saying:

Processing -----------30.wav theq() : determinant of the normal matrix is too small! mgcep : Error in theq() at 0th iteration! theq() : determinant of the normal matrix is too small! mgcep : Error in theq() at 1th iteration! Traceback (most recent call last): File "MCD-DTW.py", line 49, in mgc1 = readmgc(filename1) File "MCD-DTW.py", line 28, in readmgc mgc = pysptk.mgcep(frames, order, alpha, gamma) File "", line 2, in mgcep File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pysptk/util.py", line 75, in apply_along_last_axis ret = np.apply_along_axis(func, -1, *args, **kwargs) File "<array_function internals>", line 5, in apply_along_axis File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/numpy/lib/shape_base.py", line 379, in apply_along_axis res = asanyarray(func1d(inarr_view[ind0], *args, **kwargs)) File "", line 2, in mgcep File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pysptk/util.py", line 94, in automatic_type_conversion return func(*args, **kwargs).astype(dtypein) File "/Library/Frameworks/Python.framework/Versions/3.8/lib/python3.8/site-packages/pysptk/sptk.py", line 728, in mgcep return _sptk.mgcep(windowed, order, alpha, gamma, num_recursions, miniter, File "pysptk/_sptk.pyx", line 219, in pysptk._sptk.mgcep RuntimeError: failed to compute mgcep; error occured in theq

Do you have any idea how to solve this problem? Thanks..

SangsakaWira avatar Sep 23 '20 23:09 SangsakaWira

Thanks for your attention! I remembered this problem could be solved if you update your 'pysptk'.

Hope these links can help you:

https://teratail.com/questions/145348 https://github.com/r9y9/pysptk/blob/master/pysptk/_sptk.pyx#211

Thank you very much! Feel free to contact me :)

ttslr avatar Sep 25 '20 01:09 ttslr

Thank you very much for the references

SangsakaWira avatar Sep 25 '20 11:09 SangsakaWira

I have the same question and I update the pysptk 0.1.18 but still have the same question. The audio is single channel.

IrisLhy avatar Feb 22 '22 02:02 IrisLhy

I also encountered the same problem, is you solved?

wfengyu avatar Apr 07 '22 12:04 wfengyu

I also encountered the same problem, is you solved?

lindadll avatar Apr 12 '22 07:04 lindadll

I tried something else. You can try it ,https://github.com/jasminsternkopf/mel_cepstral_distance.

wfengyu avatar Apr 12 '22 07:04 wfengyu