Vesper -Confidential
9
Here, one audio vector (AudioRecording) includes both
Silence Recording
&
Speech Recording.
Start/stop time of each recording marked with: silenceStart, silenceEnd, speechStart, speechEnd
Code start:
audio_filtered = bandpass(AudioRecording, [120 2000], Fs, 'ImpulseResponse','iir','Steepness',[0.8 0.8]);
RMSnoise = rms(audio_filtered(silenceStart*Fs:silenceEnd*Fs));
RMStotal = rms(audio_filtered(speechStart*Fs:speechEnd*Fs));
RMSvoice = sqrt(RMStotal^2 -RMSnoise^2);
SNRva1200 = 20*log10(RMSvoice/RMSnoise);
Signal Quality Check:
Part 2/3 –Example MATLAB code
Compute RMS of
Silence Recording
Noise,
RMSnoise
Calculate Voice RMS from previous two results
RMSvoice
= sqrt(
RMStotal2
–
RMSnoise2
)
Calculate SNR in dB
SNRdB
= 20·log10(
RMSvoice
/
RMSnoise
)
Compute RMS of
Speech Recording
Total Noise + Speech,
RMStotal
Bandpass both recordings with a bandpass filter
(120Hz -2kHz, 30dB/octave)