file_modify.m

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

M
103
字号
%Callback function that chooses figures according to
%the voicetype of the segment involved
%Author : Karthik
%Used some functions written by Albert Hsiao
%Modified by D. G. Childers 2/25/98 to remove time varying features
%

snoframes=string('The number of frames is');
sfirstf=string('The first frame is');
sunvoiced=string('unvoiced');
svoiced=string('voiced');



PV = [195 300 244 150];
s2 = 'Excitation has been loaded';
message_fig = figure('Position',PV,...
   'Numbertitle','off',...
   'Color',[1 1 1],...
   'Name',s2);

uicontrol('Style','Frame',...
   'Units','Normalized',...
   'Position',[0.05 0.05 0.9 0.9],...
   'BackGroundColor',[1 1 1]);

if uvindicate(segment_no) == 1
   %Segment is voiced
       
uicontrol('Style','text',...
   'Units','Normalized',...
   'Position',[0.1 0.3 0.5 0.1],...
   'ForegroundColor',[0 0 1],...
   'BackGroundColor',[1 1 1],...
   'String',snoframes);

uicontrol('Style','text',...
   'Units','Normalized',...
   'Position',[0.5 0.3 0.4 0.1],...
   'ForegroundColor',[0 0 1],...
   'BackGroundColor',[1 1 1],...
   'String', Nframe);

uicontrol('Style','text',...
   'Units','Normalized',...
   'Position',[0.1 0.1 0.5 0.1],...
   'ForegroundColor',[0 0 1],...
   'BackGroundColor',[1 1 1],...
   'String',sfirstf);

uicontrol('Style','text',...
   'Units','Normalized',...
   'Position',[0.5 0.6 0.4 0.1],...
   'ForegroundColor',[0 0 1],...
   'BackGroundColor',[1 1 1],...
   'String', svoiced);

end
if uvindicate(segment_no) == 0 
   %indicates that the segment is unvoiced
   
uicontrol('Style','text',...
   'Units','Normalized',...
   'Position',[0.07 0.65 0.6 0.1],...
   'ForegroundColor',[0 0 1],...
   'BackGroundColor',[1 1 1],...
   'String',snoframes);

uicontrol('Style','text',...
   'Units','Normalized',...
   'Position',[0.65 0.65 0.25 0.1],...
   'ForegroundColor',[0 0 1],...
   'BackGroundColor',[1 1 1],...
   'String',Nframe);

uicontrol('Style','text',...
   'Units','Normalized',...
   'Position',[0.06 0.4 0.6 0.1],...
   'ForegroundColor',[0 0 1],...
   'BackGroundColor',[1 1 1],...
   'String',sfirstf);

uicontrol('Style','text',...
   'Units','Normalized',...
   'Position',[0.65 0.4 0.25 0.1],...
   'ForegroundColor',[0 0 1],...
   'BackGroundColor',[1 1 1],...
   'String',sunvoiced);

end
plot_excitation;
pause(11);

close(message_fig);
clear message_fig;
close(src_display_fig);
clear src_display_fig;



       
   
   

⌨️ 快捷键说明

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