Silence Removal and End Point Detection MATLAB Code
转载自: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的更多相关文章
- Silence Removal and End Point Detection JAVA Code(音频删除静音与结束判断)
转载自:http://ganeshtiwaridotcomdotnp.blogspot.com/2011/08/silence-removal-and-end-point-detection_29.h ...
- Frequency-tuned Salient Region Detection MATLAB代码出错修改方法
论文:Frequency-tuned Salient Region Detection.CVPR.2009 MATLAB代码运行出错如下: Error using makecform>parse ...
- plot a critical difference diagram , MATLAB code
plot a critical difference diagram , MATLAB code 建立criticaldifference函数 function cd = criticaldiffer ...
- 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 ...
- 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的结果画 ...
- 支持向量机的smo算法(MATLAB code)
建立smo.m % function [alpha,bias] = smo(X, y, C, tol) function model = smo(X, y, C, tol) % SMO: SMO al ...
- MFCC matlab code
%function ccc=mfcc(x) %归一化mel滤波器组系数 filename=input('input filename:','s'); [x,fs,bits]=wavread(filen ...
- 求平均排序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 ...
- word linkage 选择合适的聚类个数matlab code
clear load fisheriris X = meas; m = size(X,2); % load machine % load census % % X = meas; % X=X(1:20 ...
随机推荐
- 接口-DBLINK初尝试
需求: 将寿险核心库中的黑名单数据提取到团险核心中,供团险核心使用,并且在核心前端页面需配置对应的菜单,提供相应的按钮,该接口采用dblink的方式进行提取. 通过本地数据库配置dblink访问远程数 ...
- IDEA 中tomcat图片储存和访问虚拟路径(图片和程序分家)
本文链接:https://blog.csdn.net/qq_36481052/article/details/78813213 **前段时间,遇到了图片已经储存了文件中也显示有图片,但就是死活访问不到 ...
- PHP-FPM参数详情
pid = run/php-fpm.pid #pid设置,默认在安装目录中的var/run/php-fpm.pid,建议开启 error_log = log/php-fpm.log #错误日志,默认在 ...
- 洛谷P1019 单词接龙题解(超详细注释)
https://www.luogu.org/problem/P1019 #include<cstdio> #include<cstring> #include<iostr ...
- combox使用自定义的model列表中无元素显示
自定义的model(stationModel)中有 name 和point两种属性名. 初始化stationModel Combobox{ textRole: 'name' model:station ...
- php 运算符的优先级
由上到下,依次递减,同行优先级相同. 结合方向 运算符 附加信息 无 clone new clone 和 new 左 [ array() 右 ** 算术运算符 右 ++ -- ~ (int) (flo ...
- phpstorm 2019.1 修改选中内容背景色,以及匹配的内容背景色
#与选中内容匹配的内容背景色Editor -> Color Scheme -> General -> Code -> Identifier under caret #选中内容前 ...
- docker本地仓库&镜像
镜像的命名规则: 1.[冷数据]/[base镜像]例如:ansible,centos 2. lastest{最新的意思} 不是真的(随便命名) 3. [image name]=[repository ...
- Python安装第三方库常用方法
在学习Python过程中,经常要用到很多第三方库,面对各种不同情况,Python为我们提供了多种安装方法: 一.pip安装: pip安装相信大家都不陌生了,在安装第三方库中,pip是最常使用的一种方法 ...
- Java TreeSet,Collections使用
一.创建TreeSet实例 public static void main(String[] args) { TreeSet set = new TreeSet(); set.add("C& ...