Sunday 15 September 2013

android - How to implement time-weighting in SPL Meter? -



android - How to implement time-weighting in SPL Meter? -

i develop android app meassure sound pressure level level not sure how implement time weighting. moment algorithm works follows:

record 20ms of sound (160 samples @ 8000hz) compute rms calculate spl update displayed value , start again

here can see main part of algorithm:

// google asr input requirements state sound input sensitivity // should set such 90 db spl @ 1000 hz yields rms of 2500 // 16-bit samples, i.e. 20 * log_10(2500 / mgain) = 90. double gain = 2500.0 / math.pow(10.0, 90.0 / 20.0); // method called every 20ms: @override public void processaudioframe(short[] audioframe) { // compute rms value. double rms = 0; (int = 0; < audioframe.length; i++) { rms += audioframe[i]*audioframe[i]; } rms = math.sqrt(rms/audioframe.length); final double rmsdb = 20.0 * math.log10(rms / gain) + refspl; // refspl obtained calibration professional spl meter }

i know grade of sound level meter can fast, slow, or impulse time weighted. not sure how , implement time weighting in algorithm.

q: time weighting means after time update meassured db value?

q: should alter update interval 125ms fast weighted result or completly wrong?

thanks support

android decibel weighting

No comments:

Post a Comment