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.

spectral subtraction code explain

Status
Not open for further replies.

akshatanayak

Newbie level 6
Joined
Jan 26, 2012
Messages
14
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,400
Could someone please explain me this line in the code. This is used to calculate the number of silence segments in the degraded speech signal. The code is a part of boll spectral subtraction method. I have attached the whole code below.

NIS=fix((IS*fs-W)/(SP*W) +1); %number of initial silence segments

Why do we need to find the number of silence segments if we can work on the number of samples?
 

Attachments

  • Untitled.doc
    23.5 KB · Views: 67

I guess there is because of function 'segment'.
Look at the help:
segment builds models .... assuming that the model parameters are piecewise constant over time. It results in a model that has split the data record into segments over which the model remains constant.
Maybe there is no fundamental difference, but for estimating noise using a function 'mean' over several initial windows W just takes less computations than working on samples.
 

fix= means close to zero for example 1.9 becomes 1.0 .

NIS means the number of segments of initial noise you will assume that there are in the beginning of the signal usually 250ms are store and if u are recording in a 10khz and shiftrate of the overlapping segements of sound is 0.4= meanning 40% overlap between each segment of 256 samples you will get 23 segments of initial noise.
later on spectral subtraction will use this to do the average noise :D
 

fix= means close to zero for example 1.9 becomes 1.0 .

NIS means the number of segments of initial noise you will assume that there are in the beginning of the signal usually 250ms are store and if u are recording in a 10khz and shiftrate of the overlapping segements of sound is 0.4= meanning 40% overlap between each segment of 256 samples you will get 23 segments of initial noise.
later on spectral subtraction will use this to do the average noise :D

Even I understand the meaning of individual terms but can you explain how the whole equation helps in finding the number of segments?
 

ok so you have defined IS as 0.25 meaning 250 ms of recording without doing anything ( no subtraction just noise)
you need to find out how many samples are there is 0.25 of the second so you multiply it in the fs= 10khz ( meanning 10000 samples of noise in a second)
from that, take the number and divide it into the number of windows u are creating (sp*W) which means = how much overlapping samples are between each window.
let's say the first window is 200 samples. so u will have samples 0 to 200 , the second window will have 80 =sp*200 so it will start from 80 to 280.
in this way u can calculate how many overlapping windows you will have in the 250 ms of noise.

when u know this number NIS = 23

u will use it in line 44 in SSBoll79.m
N=mean(Y:),1:NIS)')'; %initial Noise Power Spectrum mean
which basically says : do an average Magnitude for all the overlapping segments of the initial 250 ms of noise.
 
Last edited:

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top