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 ...
随机推荐
- YAML_06 playbook从上往下顺序执行,若报错,不提示,继续往下执行
ansible]# vim user4.yml --- - hosts: cache remote_user: root vars: user: bb tasks: - sh ...
- CSS字体图标
一.什么是字体图标: 1. 字体图标可以和图片一样改变透明度,旋转度,等等 2.本质是文字,可以改变大小颜色等等比较适用于移动端 总结;图标字体具有矢量效果,放大缩小不失真,而且可以使用CSS任意更改 ...
- Django系列目录
一:搭建自己的博客系列 搭建自己的博客(一):前期准备 搭建自己的博客(二):创建表,创建超级用户 搭建自己的博客(三):简单搭建首页和详情页 搭建自己的博客(四):优化首页和详情页 搭建自己的 ...
- (32)Vue模板语法
模板语法 文本: <span>Message: {{ msg }}</span> v-once 一次性地插值,当数据改变时,插值处的内容不会更新 <span v-once ...
- linux 常用性能优化
linux 常用性能优化 1. 优化内核相关参数 配置文件/etc/sysctl.conf 配置方法直接将参数添加进文件每条一行. sysctl -a可以查看默认配置 sysctl -p 执行并检测是 ...
- PHP ltrim() 函数
例子 <?php $str = "Hello World!"; echo $str . "<br>"; echo ltrim($str,&qu ...
- java如何实现多线程?线程的状态有哪些?
java实现多线程有两种方法 1.继承Thread类 2.实现Runnable接口 这两种方法的共同点: 不论用哪种方法,都必须用Thread(如果是Thead子类就用它本身) ...
- PHP连接MySQL创建表
源代码: <?php header("Content-Type:text/html;charset=utf8");//声明编码格式 $conn=mysqli_connect( ...
- Java 线程之间的通讯,等待唤醒机制
public class ThreadNotifySample { public static void main(String[] args) { // Res res = new Res(); / ...
- SpringMVC+Spring+Mybatis简单总结
SpringMVC+Spring+Mybatis总结 第一部分:分析 web.xml中的配置 SSM框架的整合其实是Spring和SpringMVC的整合以及Spring和Mybatis进行整合. 当 ...