转载自:http://ganeshtiwaridotcomdotnp.blogspot.com/2011/08/silence-removal-and-end-point-detection.html

Visithttp://ganeshtiwaridotcomdotnp.blogspot.com/2011/06/final-report-text-prompted-remote.html for more detail about our project.
For the purpose of silence removal of captured sound, we used the algorithm specified in
"A New Silence Removal and Endpoint Detection Algorithm for Speech and Speaker Recognition Applications"
Our actual system was in JAVAbut we verified the performance of this algorithm in MATLAB.

Inputs and Output

Here is the Matlab code : 
It first records sound for 5 seconds and removes the silence and then plays back.

//silence removal and end point detection
THRESHOLD=0.3; // adjust value yourself
TIME=;
%capture;
Fs = ;
y = wavrecord(TIME*Fs,Fs);
%plot(y)
%wavplay(y,Fs);
samplePerFrame=floor(Fs/);
bgSampleCount=floor(Fs/); %according to formula, sample needed for khz %----------
%calculation of mean and std
bgSample=[];
for i=::bgSampleCount
bgSample=[bgSample y(i)];
end
meanVal=mean(bgSample);
sDev=std(bgSample);
%----------
%identify voiced or not for each value
for i=::length(y)
if(abs(y(i)-meanVal)/sDev > THRESHOLD)
voiced(i)=;
else
voiced(i)=;
end
end % identify voiced or not for each frame
%discard insufficient samples of last frame usefulSamples=length(y)-mod(length(y),samplePerFrame);
frameCount=usefulSamples/samplePerFrame;
voicedFrameCount=;
for i=::frameCount
cVoiced=;
cUnVoiced=;
for j=i*samplePerFrame-samplePerFrame+::(i*samplePerFrame)
if(voiced(j)==)
cVoiced=(cVoiced+);
else
cUnVoiced=cUnVoiced+;
end
end
%mark frame for voiced/unvoiced
if(cVoiced>cUnVoiced)
voicedFrameCount=voicedFrameCount+;
voicedUnvoiced(i)=;
else
voicedUnvoiced(i)=;
end
end silenceRemovedSignal=[]; %-----
for i=::frameCount
if(voicedUnvoiced(i)==)
for j=i*samplePerFrame-samplePerFrame+::(i*samplePerFrame)
silenceRemovedSignal= [silenceRemovedSignal y(j)];
end
end
end %---display plot and play both sounds
figure; plot(y);
figure; plot(silenceRemovedSignal);
%%%play
wavplay(y,Fs);
wavplay(silenceRemovedSignal,Fs);

NOTE: Don't forget to adjust the microphone level and sound boost feature to achieve good results.

问:Wow.. Excellent.. Can u help me compare the efficiency of this algorithm with the STE and ZCR methods?? Thank you

答:As shown in research paper, the comparision of efficiency is as follows :
Phrases______STE______ZCR-STE__Proposed_Method
Combination
lock number__77.9531% 70.3720% 83.5565%
Running Text_50.8391% 50.1231% 59.7181%

Silence Removal and End Point Detection MATLAB Code的更多相关文章

  1. Silence Removal and End Point Detection JAVA Code(音频删除静音与结束判断)

    转载自:http://ganeshtiwaridotcomdotnp.blogspot.com/2011/08/silence-removal-and-end-point-detection_29.h ...

  2. Frequency-tuned Salient Region Detection MATLAB代码出错修改方法

    论文:Frequency-tuned Salient Region Detection.CVPR.2009 MATLAB代码运行出错如下: Error using makecform>parse ...

  3. plot a critical difference diagram , MATLAB code

    plot a critical difference diagram , MATLAB code 建立criticaldifference函数 function cd = criticaldiffer ...

  4. Compute Mean Value of Train and Test Dataset of Caltech-256 dataset in matlab code

    Compute Mean Value of Train and Test Dataset of Caltech-256 dataset in matlab code clc;imPath = '/ho ...

  5. Matlab Code for Visualize the Tracking Results of OTB100 dataset

    Matlab Code for Visualize the Tracking Results of OTB100 dataset 2018-11-12 17:06:21 %把所有tracker的结果画 ...

  6. 支持向量机的smo算法(MATLAB code)

    建立smo.m % function [alpha,bias] = smo(X, y, C, tol) function model = smo(X, y, C, tol) % SMO: SMO al ...

  7. MFCC matlab code

    %function ccc=mfcc(x) %归一化mel滤波器组系数 filename=input('input filename:','s'); [x,fs,bits]=wavread(filen ...

  8. 求平均排序MATLAB code

    A0=R(:,1:2:end); for i=1:17 A1=A0(i,:); p=sort(unique(A1)); for j=1:length(p) Rank0(A1==p(j))=j; end ...

  9. word linkage 选择合适的聚类个数matlab code

    clear load fisheriris X = meas; m = size(X,2); % load machine % load census % % X = meas; % X=X(1:20 ...

随机推荐

  1. Flask - flask-script | 多app应用 | wtforms

    flask-script 用于实现类似于django中 python3 manage.py runserver ...类似的命令 安装 >: pip3 install flask-script ...

  2. python内建函数和工厂函数的整理

    内建函数参阅: https://www.cnblogs.com/pyyu/p/6702896.html 工厂函数: 本篇博文比较粗糙,后续会深入整理

  3. django项目部署服务器后无法发送邮箱 错误信息:Connection unexpectedly closed

    使用配置: python 3.7 + django 2.2.1    发送邮件模块 :  from django.core.mail import send_mail 服务器:Centos7 阿里云轻 ...

  4. [TypeScript ] Using the Null Coalescing operator with TypeScript 3.7

    The postshows you how to use the null coalescing operator (??) instead of logical or (||) to set def ...

  5. Hive 调优

    今天总结本人在使用Hive过程中的一些优化技巧,希望给大家带来帮助.Hive优化最体现程序员的技术能力,面试官在面试时最喜欢问的就是Hive的优化技巧. 技巧1.控制reducer数量 下面的内容是我 ...

  6. TPC-H 下载参考

    CSDN免费下载地址 tpc-h-v2.17.3.zip tools https://download.csdn.net/download/zes2014/10558251

  7. Springboot如何优雅的解决ajax+自定义headers的跨域请求[转]

    1.什么是跨域 由于浏览器同源策略(同源策略,它是由Netscape提出的一个著名的安全策略.现在所有支持JavaScript 的浏览器都会使用这个策略.所谓同源是指,域名,协议,端口相同.),凡是发 ...

  8. BZOJ3551 Peaks加强版 [Kruskal重构树,主席树]

    BZOJ 思路 我觉得这题可持久化线段树合并也可以做 我觉得这题建出最小生成树之后动态点分治+线段树也可以做 还是学习一下Kruskal重构树吧-- Kruskal重构树,就是在做最小生成树的时候,如 ...

  9. Python3文件

    open()方法 Python open()方法永于打开一个文件,并返回文件对象,并对文件进行处理过程中都需要用到这个方法,如果该文件无法被打开,则抛出OSError 注意:使用open()方法一定要 ...

  10. ORA-01578: ORACLE 数据块损坏 (文件号 13, 块号 2415081) ORA-01110: 数据文件XXXXXX

    1.使用DBV检查数据文件,在cmd执行:dbv file='E:\APP\ADMINISTRATOR\ORADATA\ORCL\USERS01.DBF' blocksize=8192:然后等待检测结 ...