Closed omaraltayyan closed 6 years ago
hi @bjbschmitt
i made a fix for the bug we discussed in #6 earlier, hope you find it good enough.
@bjbschmitt I've just tested the algorithm on my entire dataset, which is about 14000 files totaling 56 hours, and there weren't any errors thrown as before.
Hi @omaraltayyan I ran your script and I was finally able to reproduce the bug. It seems that the issue occurs when you create a SignalObj
instance using a PCM signal as input data (the output of the scipy.io.wav.read()
function is PCM).
Your solution works fine, but there is a problem: if you want now to create a SignalObj
instance using an input float signal (for example, an output coming from another process or source), the pcm2float function will raise an error. So, I added an extra "if" before pcm2float in order to check whether the signal is PCM or float. By doing this, the SignalObj
instances can be created with either PCM and float inputs.
Here is the script that you sent me with a small modification (line 19) empty_slice.py.zip . If you run it using your solution, it raises the error and you won't be able to use input float signals.
I'll commit then your code, make some modifications and update the package soon. Thanks again for your help!
@bjbschmitt i checked your modifications and i understand the problem
Thanks again.
Ok cool, I guess that the old commentaries in the code were not very good anyway, so I'm modifying them to make things more clearer.
Ok great Thanks again and good luck with your work.
the bug is discussed in #6 (comments 9 through 12) and this code seems to fix it, i ran the tests after the modifications and everything seems to work well.