Over this summer, I wanted to make Listener Python only (there was a ton of needless applescript) and since my work @ VACCINE [VACCINE homepage] (more on this in a new post) didn't leave much time for tinkering with things, I had to push this back as much as I could. I also added another voice activity detection algorithm which I believe works a lot better than what I had previously. And I also moved my project over to GITHUB.
The additions to Listener:
- A new Voice Activity Detection algorithm [ link to pdf by Moattar and Homayounpour].
- Skype4Py is still buggy on OS X with Python2.5 and it takes a nice solid dump (segfault) with Python2.6 so I am sure if the Skype part of the code works.
- Python only. I removed the applescript portion from my code.
I have moved the entire code over to github: http://github.com/shriphani/Listener/ . The VAD algorithms can be seen in the file VAD.py.
This VAD also works by starting off with a base threshold for energy, power and an attribute called Spectral Flatness Measure. Luckily the paper had pseudocode so my DSP n00bishness wouldn't get in the way of progress.
Anyway, to get this version of Listener running, download Listener.tar , untar it and run:
python2.5 audio_analysis.py
And you should be all set.
Github? You're a Python fan, use Mercurial
hi shrip
in the 4th line of your function geometric_mean, there is a line:
prod * value
shouldn't it be prod *= value ?
thanks
Ouch you're right. Mind creating an issue on git ? I haven't looked at this in a while but a refactor is probably due.
sorry, i am not familiar with git.
and
yet another question. you seem use the time signal to compute the sfm, but it should use the frequency signal, (it is to say, use the data after FFT rather than before).
you can check
http://en.wikipedia.org/wiki/Spectral_flatness
right?
thanks.
You are correct (wow this is pretty buggy). I will read up on that paper again over the weekend and patch this. Thanks for taking the time to point this out.
It's OK.
I am developing an app which need a VAD in c#, and your code really helps me a lot. After fixing the bug, it works fine
Thank you very much for looking at this. This was very helpful to me. Good luck with your app.