Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

how does this silence detection method work (is there a documented example)? #4

Open
pepperpepperpepper opened this issue Jun 21, 2018 · 0 comments

Comments

@pepperpepperpepper
Copy link

pepperpepperpepper commented Jun 21, 2018

I like this project a lot.
I've heard of silence detection using RMS
what is this method?

Activity Detection:

               #what's energy100? sum of the squares * 100 divided by the sample rate? 
               energy100 = (100*numpy.sum(midTermBuffer * midTermBuffer) 
                    / (midTermBuffer.shape[0] * 32000 * 32000))     
                if count < 10:           #sample the first few seconds of silence
                    energy100_buffer_zero.append(energy100)                    
                    mean_energy100_zero = numpy.mean(numpy.array(energy100_buffer_zero))
                else:
                    mean_energy100_zero = numpy.mean(numpy.array(energy100_buffer_zero))
                    if (energy100 < 1.2 * mean_energy100_zero): #new silence

My main question: why this

(100*numpy.sum(midTermBuffer * midTermBuffer) / (midTermBuffer.shape[0] * 32000 * 32000))

and not RMS?

Any help with this would be much appreciated!! (is it in your book??)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant