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 ...
随机推荐
- java 如何遍历Map对象
内容介绍 在java中遍历Map对象的方法. Map对象 Map<String,Object> map = new HashMap<>(); map.put("xia ...
- 【CSP-S 2019】【洛谷P5664】Emiya 家今天的饭【dp】
题目 题目链接:https://www.luogu.org/problem/P5664 Emiya 是个擅长做菜的高中生,他共掌握 \(n\) 种烹饪方法,且会使用 \(m\) 种主要食材做菜.为了方 ...
- 使用Optional优雅处理null
先假设一个场景.如下所示 public class Person { private String name; public Person() { } public Person(String nam ...
- Emmet的HTML语法(敲代码的快捷方式)
Emmet的HTML语法(敲代码的快捷方式) 版权声明:本文为网上转载. 所有操作按下“tab”键即可瞬间完成 元素 1.在编辑器中输入元素名称,即可自动补全生成 HTML 标签,即使不是标准 ...
- 用LinkedList和ArrayList实现自定义栈的异同
//ArrayList已连续的空间进行存储数据 //LinkedList已链表的结构存储数据 //栈 MyStark ms=new MyStark();//new 一个实现栈的类 //压栈 ...
- CF Gym 102028G Shortest Paths on Random Forests
CF Gym 102028G Shortest Paths on Random Forests 抄题解×1 蒯板子真jir舒服. 构造生成函数,\(F(n)\)表示\(n\)个点的森林数量(本题都用E ...
- AtCoder Grand Contest 003题解
传送门 \(A\) 咕咕 const int N=1005; char s[N];int val[N],n; int main(){ scanf("%s",s+1),n=strle ...
- 安装wazuh-agent
安装wazuh-agent 1. windows 下载地址:https://packages.wazuh.com/3.x/windows/wazuh-agent-3.9.5-1.msi 安装运行 设置 ...
- Pytest权威教程07-Monkeypatching,对模块和环境进行Mock
目录 Monkeypatching,对模块和环境进行Mock 简单示例如: 猴子补丁方法 Monkeypatching 返回对象: 构建mock类 全局补丁示例如:阻止"requests&q ...
- Prometheus告警规则增删改自动化
Prometheus告警规则增删改自动化 前言: 随着容器技术的发展,zabbix监控方式与k8s的结合不完善,导致不得不放弃zabbix,而新的监控工具prometheus的使用就越来越多了.但是经 ...