jameslyons / python_speech_features

This library provides common speech features for ASR including MFCCs and filterbank energies.
MIT License
2.38k stars 617 forks source link

Functions hanging on OS X #57

Open 96imranahmed opened 6 years ago

96imranahmed commented 6 years ago

Hey all,

Thanks for the awesome python module 👍 I was just wondering, have any of you run into an issue where the mfcc function hangs (and presumably other functions such as fbank) hang on OSX? I was running some multi-processed code and these functions confusingly never completed on my Mac. However, when I ran the equivalent function in Ubuntu 16.04 on the same data, the functions returned as expected.

Have any of you run into this before? I'm not sure what would could cause this - especially seeing that the source code seems to primarily call numpy operations. I'll investigate this further and hopefully post more details here. Unfortunately the code I was running was heavily multi-processed, so it might take a bit of refactoring to allow me to properly debug things. I just wanted to post on here and see if anybody else had run into a similar issue? 😃

jameslyons commented 6 years ago

I've never heard of this happening, it is fairly simple numpy code after all. If i had to guess, i suspect it might be the rolling_window function in sigproc.py, the docs say as_strided is a bit risky. Try setting the flag in framesig to false so that strided is not used (youll have to edit the code) and see if it still happens

96imranahmed commented 6 years ago

Interesting - exactly, that is what I thought! Right, thank you for pointing that out me - that'll help with my debugging efforts! I haven't looked back it as yet (it keeps hanging so I switched to ubuntu) but when I do, I'll let you know!

kiwiloveskiwis commented 6 years ago

Same issue here. the mfcc never returns... Any update?

morenoh149 commented 6 years ago

this test passes for me on osx https://github.com/morenoh149/python_speech_features/blob/hm-add-mfcc-test/test/test_sigproc.py#L35 does it fail for you @kiwiloveskiwis @96imranahmed ?

96imranahmed commented 6 years ago

Sorry for the delay in getting back to you - I just ran the test and oddly enough it works fine for me (all tests returned with no errors). Is the function hanging due to an edge-case then?

morenoh149 commented 6 years ago

If you can think of a more comprehensive test lets get it into the tests