端点检测
function Detectpointbutton_Callback(hObject, eventdata, handles) TL=handles.TL;%?ó??êy?Y TH=handles.TH; ZT=handles.ZT; Z=handles.Z; E=handles.E; startflag=1; startframe=11;
mins=min(handles.wavsignal); maxs=max(handles.wavsignal); axes(handles.wavaxes); plot(handles.wavsignal); accustartflag=1;
accustartframe=startframe-15; i=accustartframe; k=0; i=11;
while(startflag)%ó??ìê±?üá?3?2??????eê?μ? if((E(i)>TL)&(E(i+1)>TH)) startframe=i;
startflag=0;%±ê??????á?í?3??-?·
while(accustartflag)%ó??ìê±1yá??ê??ò?2??????eê?μ? if(Z(i)>ZT); k=k+1;
if(k==3)
accustartflag=0; accustartframe=i-3
startframe=accustartframe; end else k=0; end i=i+1; end else i=i+1; end end
endflag=1;
endframe=length(E); i=endframe; accuendflag=1;
accuendframe=endframe+15; i=accuendframe; k=0; j=size(E);
for i=11:j-1;%óé?ìê±?üá?′??D???1μ? if(i==1) break; end
if((E(i)>TL)&(E(i-1)>TH)) endframe=i;
while(accuendflag)%óé?ìê±1yá??ê??ò?2????????1μ? if(i>length(Z)) break; end
if(Z(i)>ZT) k=k+1; if(k==3)
accuendflag=0; accuendframe=i; endframe=accuendframe; endflag=0; end else
k=0; end i=i+1; end else i=i-1; end end hold on
line([startframe*256 startframe*256],[-0.5 0.5],'Color','b');%?-3??eê?μ? hold on
line([endframe*256 endframe*256],[-0.5 0.5],'Color','r');%?-3????1μ?
五、实验结论分析:
(1) 从图中明显可以看出,浊音信号的具有明显的周期性,其自相关函数和平
均幅度差函数也表现出周期性。清音信号稍微差一点,但不是很明显,主
要是由于清音信号的位置找的不是很好。
(2) 浊音:短时能量大、短时平均幅度大、短时过零率低;清音:短时能量小、
短时平均幅度小、短时过零率高。
(3) 门限值的选取对语音检测结果有很大影响。
(4) 仅仅根据能量判断是比较粗糙的,还需根据过零率进行判断。因为清音和
噪声的短时平均过零率比背景噪声的平均过零率要高出好几倍。
六,实验心得
这次的实验,,给我最大的收获就是培养了独立思考和动手的能力,还有就
是实验的灵活性,总得来说就是在独立与创新这二个环节,我更加掌握MATLAB的程序设计方法,进一步的了解了掌握基于MATLAB编程实现带噪语音信号端点检测的原理,这充分锻炼了我们独立的动手能力和独立的解决所遇到的问题,让我对这门课程又有了新的理解。
七.参考资料
1.王永琦 《MATLAB与音视频技术》 北京 清华大学出版社 2013年11月第一版 :91-103.
2..韩纪庆 张磊 郑铁然 《语音信号处理》 北京 清华大学出版社 2004年9月第一版
附源代码:
function varargout = duandianjiance(varargin)
% DUANDIANJIANCE MATLAB code for duandianjiance.fig
% DUANDIANJIANCE, by itself, creates a new DUANDIANJIANCE or raises the existing
% singleton*. %
% H = DUANDIANJIANCE returns the handle to a new DUANDIANJIANCE or the handle to
% the existing singleton*. %
% DUANDIANJIANCE('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in DUANDIANJIANCE.M with the given input arguments.
%
% DUANDIANJIANCE('Property','Value',...) creates a new DUANDIANJIANCE or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before duandianjiance_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to duandianjiance_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose \only one
% instance to run (singleton)\%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help duandianjiance
% Last Modified by GUIDE v2.5 29-Dec-2014 14:40:22
% Begin initialization code - DO NOT EDIT gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @duandianjiance_OpeningFcn, ... 'gui_OutputFcn', @duandianjiance_OutputFcn, ... 'gui_LayoutFcn', [] , ... 'gui_Callback', []); if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1}); end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:}); else
gui_mainfcn(gui_State, varargin{:}); end
% End initialization code - DO NOT EDIT
% --- Executes just before duandianjiance is made visible.
function duandianjiance_OpeningFcn(hObject, eventdata, handles, varargin) % This function has no output args, see OutputFcn. % hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to duandianjiance (see VARARGIN)