eliminate peaks from audio signal

44 views (last 30 days)
cob
cob on 8 Jun 2015
Edited: cob on 15 Jul 2015
Hi , i'm recorded sound using microphone. The signal isn't noisy , but it has few peaks that sounds like glitches , i need help eliminate this peaks from my signal. I've recorded few time , i'm showing 2 of them
  2 Comments
Joseph Cheng
Joseph Cheng on 8 Jun 2015
What are the characteristics of these peaks? are all high peaks "glitches" or are the ones that do not go rail to rail okay.
cob
cob on 8 Jun 2015
i'm sorry but i'm not sure if i understood your meaning , they are all saturated peaks , there is no info in , almost all of them is +1 or -1 values.

Sign in to comment.

Accepted Answer

Star Strider
Star Strider on 8 Jun 2015
Edited: Star Strider on 8 Jun 2015
I don’t have your data, but one approach would be to take the mean, then simply threshold your signal using a specific probability.
For instance, to include 99.9% of your data:
CV = @(alpha) -sqrt(2) * erfcinv(2*alpha); % Equivalent to ‘norminv’
alpha = 0.9995;
tail2p = 1-(1-alpha)*2;
zs = CV([(1-alpha)/2 1-(1-alpha)/2])
so your clipping limits would be:
clip = mean(signal) + zs*std(signal);
You would keep everything less than ‘clip(2)’ and greater than ‘clip(1)’.
If that retains too many ‘glitches’, then decrease ‘alpha’ until you get an acceptable result. (The ‘tail2p’ assignment just tells you the percent of your signal you are keeping. It is otherwise not necessary for the code.)
  6 Comments
cob
cob on 10 Jun 2015
Hi, the first step is to record , the next step is to recognize wheezes and crackles on the recorded signal. the project is only one semester , and the assignment date is september. so i have to find or develop techniques during then next few weeks . any knowledge and help will be appreciated.
Star Strider
Star Strider on 10 Jun 2015
I always suggest starting with a PubMed search. When I did this one just now, one article ‘Computerized lung sound analysis as diagnostic aid for the detection of abnormal lung sounds: a systematic review and meta-analysis’ (it’s free) seems particularly relevant, and two others (none of which I’ve read) seem promising: ‘Validation of computerized wheeze detection in young infants during the first months of life’ (it’s free) and ‘Robust features for detection of crackles: An exploratory study’ (it isn’t). You should be able to get most if not all of the others from your university library.
Click on the ‘Similar articles’ link below a citation to bring up a list of related citations. (I always right-click and choose ‘Open link in new tab’ so I can just close the tab when I’m finished with it, and don’t have to go back through several pages, waiting for each to load.) There are display options just under the gray bar at the top that make it easier to work with. Under ‘Resources’ and ‘How To’ at the very top of the page you can select ‘Training and Tutorials’ for documentation on how to most effectively use PubMed. I’ve been using it for about 20 years, but it changes occasionally so looking through the tutorials every few months to see what has changed is worthwhile.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!