how to remove silence from an audio file

i have gunshots and i want to remove all silence parts from that gunshots file because while processing and feature extractions that silent part of audio becomes part of feature so when we start testing that irrelevant feature create problem so i want to ignore that silent parts of audio during feature extraction please help me thanks in advance

 Accepted Answer

How about
indexOfLoud = signal > someThreshold;
onlyLoudParts = signal(indexOfLoud);
If not, then attach your audio file and tell me what's wrong with this solution.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!