Voice_Activity_Detector icon indicating copy to clipboard operation
Voice_Activity_Detector copied to clipboard

Could not detect voice activation whenever the signal start at the beginning

Open g1y5x3 opened this issue 7 years ago • 1 comments

Hi,

First, thank you for implementing this package. I was using it to per-process my voice signal but I encounter a problem with the signal particularly starts at the beginning. For example, this is the plot of the signal, image

And after I ran through VAD, the vectors it returns was like the following [0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.]

However, if I manually insert some noise at the beginning of the signal, such like image The VAD works as normal and returns the correct detection:

Just wondering if there could be fix inside the algorithm inside the function itself! Would love to help if the problem is not clear or you can let me know how to fix it!

g1y5x3 avatar Dec 01 '18 18:12 g1y5x3

I think it is probably because of estimating noise power spectrum. Try to convert 'p' on the line 18 of 'estnoise_ms.py' to small value instead of #p=pSpectrum[0,:]

eesungkim avatar Mar 29 '19 13:03 eesungkim