Open kubs0ne opened 3 years ago
Hi Kuba, It's been a while since I worked on this project. I did try to perform detections from live audio using this script. However, I remember not being able to make it work flawlessly. Could you run this script and see if it solves your issue?
For detection from live audio, you have to make predictions over small chunks and that will introduce some delay (probably in the order of milliseconds). My code does this naively by maintaining a running average of the predictions over the small chunks. But, a more diligent way to do this would be to probably use an LSTM.
Thanks, Sheel
Thank you for your response. Actually I can't run this script because of errors that are caused by incompatibilities between several python packages. I also couldn't run it on python 3.
That's unfortunate and understandable since the code has been written in Python 2. You could try creating a virtual environment and install the dependencies (cf. requirements.txt) and see if that solves the problem.
Hello, I have a question, have you tried to run this detector using live audio recording? I've tried to implement this functionality to your program. Right now i have something like this:
Generally, the program works, but it's very slow and has delay. I think the biggest problem here is the
def predict_probability(y, scaler)
function which i left unchanged from the em_detection.py program. Did you try any solutions to perform detections from live audio? Also I have a question how could I change thedef predict_probability(y, scaler)
function to work better with live audio? I tried to extract single mfcc from each chunk of live audio and then perform predictions, but it didn't work. Kind regards Kuba