how to remove silent regions from speech signal dynamically

3 次查看(过去 30 天)
%program to remove silences from a speech recording %step 1- break the signal into frames of 0.1seconds fs=11250; %fs=22050; frame_duration=0.1; frame_len=frame_duration*fs; N=length(ip); num_frames=floor(N/frame_len); new_sig=zeros(N,1); count=0; %frame1=ip(1:frame_len); %frame2=ip(frame_len+1 :frame_len*2) %frame3=ip(frame_len*2+1 :frame_len*3) for k=1:num_frames %extract a frame of speech frame=ip( (k-1) *frame_len +1 : frame_len*k); %step2 - identify silence by finding frames with max amplitude less than 0.03
max_val=max(frame);
if(max_val>0.03) %this frame is not silent count=count+1;
new_sig( (count-1)*frame_len +1 :frame_len*count)=frame;
end end
here 0.03 is set as threshold instead how can we do it dynamically.
Thank you

采纳的回答

Image Analyst
Image Analyst 2014-5-29
Would this "File Exchange Pick of the Week" be of any use to identify and discriminate between silence and valid sounds: http://blogs.mathworks.com/pick/2014/05/23/automatic-activity-detection-using-hilbert-transform/

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Signal Processing Toolbox 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by