Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

SNR for an audio .wav files and objective measures for evaluating filtering technique

Status
Not open for further replies.

AcousticEng

Newbie level 1
Joined
Jan 1, 2017
Messages
1
Helped
0
Reputation
0
Reaction score
0
Trophy points
1
Activity points
16
I am doing experiments on a filtering technique for noise reduction. My samples in the data set are audio files (.wav), I therefore have: original recording audio files and I mix them with noise, so I get mixed (noisy signals), I pass these noisy signals through the filtering algorithm, the outputs are filtered or noise reduced audio signals. So in total I have the following:

Original audio files (without noise)
Noise (that need to be added of the original signals)
Mixed (Noisy files)
Filtered (noise reduced)
I need to get how much dB the filter can reduce, I think of SNR as a measure that could give such indication about the performance of the filtering algorithm and a comparison before filtering and after filtering.

So does anybody know if SNR is a good objective measure to evaluate the performance of the algorithm and measure the enhancement?
Are there any other suitable objective measures that can be used in this case?
What will be the situation if field recording already contain noise and I don't need to add noise? (the noise in my case is wind).
Here is a simple MATLAB code I wrote to compute SNR.
Code:
[signal]=audioread('Original.wav');

[noise]=audioread('Noise.wav');

[noise_reduced_signal]=audioread('Filtered.wav');

[noisysignal]=audioread('Noisy.wav');

snr_before = mean( signal.^ 2 ) / mean( noise .^ 2 );

snr_before_db = 10 * log10( snr_before ) % in dB
%==========================================================%
% After noise reduction, the residual noise can be calculated as the difference 
% of the wanted signal and the actual signal. Calculation of SNR is then straightforward:
%==========================================================%
snr_after = mean( signal .^ 2 ) / mean( noise_reduced_signal .^ 2 ); 

snr_after_db = 10 * log10( snr_after ) % in dB

Diff = snr_after_db - snr_before_db;

disp(['Diff  = ' num2str(Diff) ' dB'])
 
Last edited by a moderator:

Hi,

SNR is the ratio of noise to wanted_signal.
It is a value to define the quality of a signal, somehow. So you mayu se it.

I see a problem how you want to filter away noise. This is not an easy approach, because "noise" is something random.
It follows no rules, therefore usually there is a problem generating an algorithm.

A noise signal that follows any rules is no "true noise".

Klaus
 

Status
Not open for further replies.

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top