addseg.m

来自「这是一个用于语音信号处理的工具箱」· M 代码 · 共 28 行

M
28
字号
% Function : add a segment to the segment display using the mouse.
%    Addseg will add one seg in the neighborhood of the mouse position.
%
%    Addgci.m is a call_function executed by "add_pb" for figure(m_gci_f).

% 1. secify the neighborhood for the mouse
button=0;
seg1=(seg0)*(basic(5)-basic(6));
while button~=1
   [xseg y button]=ginput(1);
   indseg=find(seg1<xseg);
   play(speech2(seg1(length(indseg)):ceil(xseg)));
end

xseg=ceil(xseg);

% 2. insert this gci into original seg sequence
seg0(length(seg0)+1)=fix(xseg/(basic(5)-basic(6)))+1;
segmentation(seg0(length(seg0))*(basic(5)-basic(6)))=10000;
seg0=sort(seg0);

% 3. plot the signal with the segments
figure(Segchek_f);
plot((left:right),signal(left:right),'k',(left:right),segmentation(left:right),'b');

set(app_pb,'Visible','on');
clear xseg y;

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?