exe2.m

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

M
63
字号
% Script:  exe2.m is used to calculate the GCIS by c_pb_close in c_win_f.
%
%     ==> find the formants, encode the source characteristics using exe3.m
%
%   for details, see exe0.m exe1.m
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

   clear c_win_f c_pb_gci c_pb_close;
   set(ana_work_f,'Visible','on');
   set(work_text1,'String','It is working.  Please wait.');
   set(work_text3,'String','');
   pause(1);

   if vt==1

       [gm,gpcf,nidx,ngm]=lpana3(speech,basic,gci,vctyp,rsd,cofa);

        time=toc;
        set(work_text3,'String','You may save the result.');
        set(work_text2,'String',['elapsed_time= ' num2str(time)]);
        set(work_text1,'String','Analysis is done.'); drawnow;
        set(a_pb_sv,'Visible','on');
        disp('Analysis is done');
        disp('You may save the result.');
 
   elseif vt==2

      %--------------------------------------------------------%
      %     third stage LP based analysis                      %
      %                             >>> allocate formants      %
      %--------------------------------------------------------%

      [FF,FB,Froot]=fbana3(speech,basic,cofa,vctyp,nframe);

      time=toc;
      set(ana_work_f,'Visible','on');
      set(work_text3,'String','You may inspect the result.');
      set(work_text2,'String',['elapsed_time= ' num2str(time)]);
      set(work_text1,'String','Formants are allocated.'); drawnow;

      % create GUI for manual correction

      c_win_f=figure('Unit','normalized',...
           'Position',[0.215 0.50 0.15 0.2],...
           'Resize','off',...
           'Color','white',...
           'Numbertitle','off',...
           'Name','Manual Correction');
   
      c_pb_ft=uicontrol('Style','Pushbutton',...
            'Units','normalized',...
            'Position',[0.05 0.6 0.9 0.3],...
            'String','Formant Tract Inspc.',...
            'CallBack','Fchek;showoff(ana_work_f);');   
      % callback function [Fchek.m]

      c_pb_close=uicontrol('Style','Pushbutton',...
            'Units','normalized',...
            'Position',[0.05 0.1 0.9 0.3],...
            'String','Continue',...
            'Callback','close(c_win_f);set(ana_work_f,''Visible'',''off'');exe3;');
    end

⌨️ 快捷键说明

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