vchek.m

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

M
90
字号
% Function : Create a graphical user interface (GUI) to 
%        (1) display the automatically determined voicetypes
%        (2) check the voicetypes and manual correct them by mouse if necessary.
%
% Vchek.m is a call_function executed by "c_pb_vtp" on figure(c_win_f).
%

%--------------------------------------------------%
% plot the voicetype along with the speech signal  %
%--------------------------------------------------%

Vchek_f=figure('Unit','Normalized',...
   'Numbertitle','off',...
   'Color',[.5 .5 .5],...
   'Position',[.35 .5 .65 .4], ...
   'Name','Voicetype Display and Manual Correction');

axes('Position',[.06 .13 .88 .7],'Box','on','Visible','off');
whitebg(Vchek_f,'w');

% provide the shifting functions

shitf_text=uicontrol('Style','text',...
   'Units','normalized','Position',[0.01 .875 .11 .08],'String','Shift frames',...
   'BackGroundColor',[0.68 0.68 0.68]);

shift_left=uicontrol('Style','Pushbutton',...
   'Unit','Normalized','Position',[.13 .875 .05 .08],'String','<',...
   'Callback','sf_flag=1;vtplt;');
%callback function [vtplt.m]

shift_pts=uicontrol('Style','text', ...
   'Unit','Normalized','Position',[.20 .875 .06 .08],'String','5');

shift_right=uicontrol('Style','Pushbutton',...
   'Unit','Normalized','Position',[.28 .875 .05 .08],...
   'String','>','Callback','sf_flag=-1;vtplt');
%callback function [vtplt.m]

chg_vtp=uicontrol('Style','Pushbutton', ...
   'String','Change voicetype' ,...
   'Units','normalized','Position',[.36 .875 .17 .08],...
   'Callback','vtpchg;');
%callback function [vtpchg.m]

return_pb=uicontrol('Style','Pushbutton',...
   'Units','normalized','Position',[.86 .875 .1 .08],...
   'Callback','close(Vcontour_f);close(Vchek_f);clear right left right_r    left_r signal lens vctyp0;',...
   'String','Return');

undo_pb=uicontrol('Style','Pushbutton', ...
   'String','Undo' ,...
   'Units','normalized','Position',[.55 .875 .14 .08],'Callback','vctyp0=vctyp;clear sf_flag;vtplt');
%callback function [vtplt.m]

app_pb=uicontrol('Style','Pushbutton', ...
   'String','Apply' ,...
   'Units','normalized','Position',[.7 .875 .14 .08],'Callback','vctyp=vctyp0;');

%------------------------------------%
% creat another window for reference %
%------------------------------------%

Vcontour_f=figure('Unit','Normalized',...
   'Numbertitle','off',...
   'Color',[0.5 0.5 0.5],...
   'Position',[.35 .15 .65 .3], ...
   'Name','Voicetype Display (reference)');

axes('Position',[.06 .1 .9 .78],'Box','on','Visible','off');
whitebg(Vcontour_f,'w');

%--------------------%
% plot the voicetype %
%--------------------%

% get the display signal

clear signal vctyp0 sf_flag;

signal=speech;
vctyp0=vctyp;
lens=length(signal); % the length of signal

% initial setting
left=1;
right=min(10*m_len,lens);

vtplt;

⌨️ 快捷键说明

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