how to remove silent regions from speech signal dynamically
1 次查看(过去 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
0 个评论
采纳的回答
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 个评论
更多回答(0 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simulation, Tuning, and Visualization 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!