function varargout = voice_gui(varargin)
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @voice_gui_OpeningFcn, ...
'gui_OutputFcn', @voice_gui_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin & isstr(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 voice_gui is made visible.
function voice_gui_OpeningFcn(hObject, eventdata, handles, varargin)
handles.output = hObject;
guidata(hObject, handles);
if strcmp(get(hObject,'Visible'),'off')
y=wavread('v017');Fs=8192;
[Y,w,t]=voice_spectrum(y,Fs);
axes(handles.axes1);
plot(t,y);grid;title('语音信号y');
axes(handles.axes2);
plot(w,Y);grid;axis([0 2000 0 500]);title('语音信号y频谱图');
end
% --- Outputs from this function are returned to the command line.
function varargout = voice_gui_OutputFcn(hObject, eventdata, handles)
varargout{1} = handles.output;
% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
popup_sel_index = get(handles.popupmenu1, 'Value');
switch popup_sel_index
case 1
y=wavread('v017');
case 2
y=wavread('v016');
case 3
y=wavread('one_two_three');
end
Fs=8192;
[Y,w,t]=voice_spectrum(y,Fs);
axes(handles.axes1);
cla;
plot(t,y);grid;title('语音信号y');
axes(handles.axes2);
cla;
plot(w,Y);grid;axis([0 2000 0 500]);title('语音信号y频谱图');
% --------------------------------------------------------------------
function FileMenu_Callback(hObject, eventdata, handles)
% hObject handle to FileMenu (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
function OpenMenuItem_Callback(hObject, eventdata, handles)
% hObject handle to OpenMenuItem (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
file = uigetfile('*.fig');
if ~isequal(file, 0)
open(file);
end
% --------------------------------------------------------------------
function PrintMenuItem_Callback(hObject, eventdata, handles)
% hObject handle to PrintMenuItem (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
printdlg(handles.figure1)
% --------------------------------------------------------------------
function CloseMenuItem_Callback(hObject, eventdata, handles)
% hObject handle to CloseMenuItem (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
selection = questdlg(['Close ' get(handles.figure1,'Name') '?'],...
['Close ' get(handles.figure1,'Name') '...'],...
'Yes','No','Yes');
if strcmp(selection,'No')
return;
end
delete(handles.figure1)
% --- Executes during object creation, after setting all properties.
function popupmenu1_CreateFcn(hObject, eventdata, handles)
% hObject handle to popupmenu3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: popupmenu controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc
set(hObject,'BackgroundColor','white');
else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end
set(hObject, 'String', {'v017', 'v016', 'one two three'});
% --- Executes on selection change in popupmenu3.
function popupmenu1_Callback(hObject, eventdata, handles)
% hObject handle to popupmenu3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = get(hObject,'String') returns popupmenu3 contents as cell array
% contents{get(hObject,'Value')} returns selected item from popupmenu3
% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
popup_sel_index = get(handles.popupmenu1, 'Value');
switch popup_sel_index
case 1
y=wavread('v017');%load v017_echo_spectrum1;
case 2
y=wavread('v016');%load v016_echo_spectrum1;
case 3
y=wavread('one_two_three');
end
Fs=8192;
[yecho,t]=voiceecho(y);
[Yecho,w,t]=voice_spectrum(yecho,Fs);
sound(yecho);
axes(handles.axes1);
cla;
plot(t,yecho);grid;title('有回声效果的语音信号yecho')
axes(handles.axes2);
cla;
plot(w,Yecho);axis([0 2000 0 500]);grid;title('有回声效果的语音信号频谱Yecho')
% --- Executes on button press in pushbutton4.
function pushbutton4_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
popup_sel_index = get(handles.popupmenu1, 'Value');
switch popup_sel_index
case 1
y=wavread('v017');
case 2
y=wavread('v016');
case 3
y=wavread('one_two_three');
end
sound(y);
% --- Executes during object creation, after setting all properties.
function popupmenu3_CreateFcn(hObject, eventdata, handles)
% hObject handle to popupmenu3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: popupmenu controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc
set(hObject,'BackgroundColor','white');
else
set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end
set(hObject, 'String', {'Time Sequence', 'Spectrum'});
% --- Executes on selection change in popupmenu3.
function popupmenu3_Callback(hObject, eventdata, handles)
% hObject handle to popupmenu3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = get(hObject,'String') returns popupmenu3 contents as cell array
% contents{get(hObject,'Value')} returns selected item from popupmenu3
% --- Executes on button press in pushbutton5.
function pushbutton5_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
popup_sel_index = get(handles.popupmenu1, 'Value');
switch popup_sel_index
case 1
y=wavread('v017');
case 2
y=wavread('v016');
case 3
y=wavread('one_two_three');
end
Fs=16384;
[Y,w,t]=voice_spectrum(y,Fs);
sound(y,Fs);
axes(handles.axes1);
cla;
plot(t,y);grid;title('语音信号y,采样频率Fs=16384');xlabel('t(s)');ylabel('y');
axes(handles.axes2);
cla;
plot(w,Y);axis([0 2800 0 500]);grid;
title('语音信号y的频谱,采样频率Fs=16384');xlabel('f (Hz)');ylabel('Y');
% --- Executes on button press in pushbutton6.
function pushbutton6_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton6 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLA
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
【达摩老生出品,必属精品,亲测校正,质量保证】 资源名:行时域频域处理_通过变频、变速达到变声目的_用图形用户界面(GUI)_时域频域图形输出_前后波形进行比较_matlab 资源类型:matlab项目全套源码 源码说明: 全部项目源码都是经过测试校正后百分百成功运行的,如果您下载后不能运行可联系我进行指导或者更换。 适合人群:新手及有一定经验的开发人员
资源推荐
资源详情
资源评论
收起资源包目录
行时域频域处理_通过变频、变速达到变声目的_用图形用户界面(GUI)_时域频域图形输出_前后波形进行比较_matlab.rar (77个子文件)
数字信号处理课程设计
untitled3.m 3KB
one_two_three_high_pass.m 339B
v016_pinyi_left2.m 403B
Untitled1.asv 210B
banyi.m 324B
one_two_three_pinyi_right.wav 41KB
Untitled1.m 208B
v017_pinyi_right.asv 398B
one_two_three_low_pass.m 329B
v017_high_pass.wav 43KB
voice_spectrum.m 349B
v016_low_pass.wav 45KB
one_two_three_high.wav 37KB
1.docx 13KB
specrogram1.asv 265B
voiceecho.m 160B
one_two_three_pinyi_left.wav 37KB
high_pass.asv 315B
v017_pinyi_right.wav 47KB
one_two_three.wav 37KB
one_two_three_high_pass.wav 37KB
3_.wav 43KB
pinyi_left.asv 370B
ditong.fda 8KB
pinyi_left.m 368B
v017_pinyi_left.wav 43KB
v016_pinyi_right.wav 49KB
v016_pinyi_left.wav 45KB
one_two_three_low.wav 37KB
V016.WAV 45KB
voice_gui.asv 15KB
pinyi_right.asv 345B
voice_gui.m 15KB
Untitled2.asv 415B
v016_low.wav 45KB
pinyi_right.m 385B
voice_spectrum.asv 287B
v017_low_pass.m 338B
v017_high.m 208B
v017_pinyi_left.m 430B
Untitled.asv 164B
untitled4.fig 1KB
one_two_three_pinyi_right.m 437B
untitled4.m 3KB
v017_123.wav 43KB
v106_low_pass.asv 310B
one_two_three_low_pass.wav 37KB
V017.WAV 43KB
voice_sola.m 2KB
specrogram1.m 265B
low_pass.asv 277B
voice_gui.fig 12KB
v016_pinyi_right.m 419B
v016_high_pass.wav 45KB
hesen.m 377B
untitled3.fig 1KB
v017_high_pass.m 319B
v017_pinyi_right.m 421B
v017_low_pass.wav 43KB
low_pass.m 311B
v106_low_pass.m 311B
v017_low.wav 43KB
v017_pinyi_left.asv 437B
high_pass.m 320B
v017_low.m 114B
banyi.asv 280B
v016_high.wav 45KB
数字信号处理课程设计.doc 318KB
v017_low13.wav 43KB
voice_echo.m 371B
Untitled2.m 449B
v016_pinyi_left.m 404B
Untitled.m 281B
one_two_three_pinyi_left.m 422B
v016_high_pass.m 319B
v017_high.wav 43KB
voice.m 511B
共 77 条
- 1
阿里matlab建模师
- 粉丝: 3194
- 资源: 2782
下载权益
C知道特权
VIP文章
课程特权
开通VIP
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功
- 1
- 2
前往页