How to track the sound zone in a wav file?

How to track sections without sounds in a wav file? The little software I want to develop is to deploy a wav file, and it does not consider the scope of the volume as a point. how can a program know that the volume of a wav file is low? I will use Java or MFC.

+1
source share
3 answers

I had success with detecting silence by calculating the RMS signal. This is done as follows (provided that you have an array of audio tapes):

long sumOfSquares = 0; for (int i = startindex; i <= endindex; i++) { sumOfSquares = sumOfSquares + samples[i] * samples[i]; } int numberOfSamples = endindex - startindex + 1; long rms = Math.sqrt(sumOfSquares / (numberOfSamples)); 

if rms is below a certain threshold, you can consider it quiet.

+7
source

Well, a wave file is basically a list of values ​​representing a sound wave imperceptibly dividing at some speed (usually 44100 Hz). Silence is mainly when the values ​​are close to zero. Just set some treshold value and find continuous (let it be said, 100 ms) areas where the value is below this level.

+2
source

Simple silence detection is performed by comparing sound fragments with a certain value (which is selected depending on the quality of the recording).

Sort of:

 abs(track[position]) < 0.1 

or

 (track[position]) < 0.1) && (track[position]) > -0.1) 

assuming the piece is [-1, 1] float.

This will work better if the sound normalizes.

0
source

Source: https://habr.com/ru/post/1411251/


All Articles