function varargout = exp1_gui(varargin)
% EXP1_GUI MATLAB code for exp1_gui_timer.fig
% EXP1_GUI, by itself, creates a new EXP1_GUI or raises the existing
% singleton*.
%
% H = EXP1_GUI returns the handle to a new EXP1_GUI or the handle to
% the existing singleton*.
%
% EXP1_GUI('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in EXP1_GUI.M with the given input arguments.
%
% EXP1_GUI('Property','Value',...) creates a new EXP1_GUI or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before exp1_gui_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to exp1_gui_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help exp1_gui
% Last Modified by GUIDE v2.5 12-Jan-2022 11:05:09
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @exp1_gui_OpeningFcn, ...
'gui_OutputFcn', @exp1_gui_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(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 exp1_gui is made visible.
function exp1_gui_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to exp1_gui (see VARARGIN)
% Choose default command line output for exp1_gui
clc;
global PAUSE_FLAG
global STOP_FLAG
global INDEX
handles.output = hObject;
% Update handles structure
handles.file = 0;
handles.path = 0;
handles.show_flag = 1;%默认显示普通波形图
handles.channel_num = 2;%默认声道数为2
handles.varied = 1:2;
PAUSE_FLAG = 0;
STOP_FLAG = 0;
INDEX = 0;
guidata(hObject, handles);
%1个图像显示的情况
set(handles.axes_graph1,'visible','on');
set(handles.axes_graph2,'visible','on');
% set(handles.axes_graph1,'position',[5.5 11 92 30]);
set(handles.popupmenu_waveform,'Enable','inactive');
% UIWAIT makes exp1_gui wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = exp1_gui_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.output;
% --------------------------------------------------------------------
function function1_Callback(hObject, eventdata, handles)
% hObject handle to function1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --------------------------------------------------------------------
%选择文件选项按钮
function choose_file_Callback(hObject, eventdata, handles)
% hObject handle to choose_file (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
[handles.file,handles.path] = uigetfile('/Users/jianghongqi/Desktop/第六学期/语音信号处理/语音信号处理实验/实验一/语音素材/speech.wav','*.wav');
if handles.file == 0
return
end
[handles.y,handles.fs,handles.player]=process_data(handles);
guidata(hObject, handles);
% --------------------------------------------------------------------
%退出选项按钮
function exit_option_Callback(hObject, eventdata, handles)
% hObject handle to exit_option (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
close
% --- Executes on slider movement.
%进度条功能
function slider_progress_bar_Callback(hObject, eventdata, handles)
% hObject handle to slider_progress_bar (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'Value') returns position of slider
% get(hObject,'Min') and get(hObject,'Max') to determine range of slider
% --- Executes during object creation, after setting all properties.
function slider_progress_bar_CreateFcn(hObject, eventdata, handles)
% hObject handle to slider_progress_bar (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: slider controls usually have a light gray background.
if isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor',[.9 .9 .9]);
end
% --- Executes on selection change in popupmenu_channel_choose.
%选择声道下拉框
function popupmenu_channel_choose_Callback(hObject, eventdata, handles)
% hObject handle to popupmenu_channel_choose (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = cellstr(get(hObject,'String')) returns popupmenu_channel_choose contents as cell array
% contents{get(hObject,'Value')} returns selected item from popupmenu_channel_choose
%设置图
%set(handles.axes_graph1,'position',[5.5 11 92 30]);
%取值为当前的声道数
index = get(hObject,'Value');
index2 = handles.show_flag;
if index2 == 2 && index ~= 1
msgbox('李萨如图形只支持双声道','提示');
set(hObject,'Value',1);
return
end
if handles.total_channel_num == 2
if index == 1
handles.channel_num = 2;%双声道播放
handles.varied = 1:handles.channel_num;
else
handles.channel_num = 1;%选择一个声道播放
handles.varied = index-1;
end
else
handles.channel_num = 1;
handles.varied = 1;
end
handles.player = audioplayer(handles.y(:,handles.varied),handles.fs);
guidata(hObject, handles);
%选择波形图
if index2 == 1
%清除图形的显示
clean_graph(handles);
play_with_time1(handles,1:length(handles.y),handles.y)%这个函数里会读取声道数
else
%清除图形的显示
clean_graph(handles);
play_with_time3(handles,handles.y);
end
% --- Executes during object creation, after setting all properties.
function popupmenu_channel_choose_CreateFcn(hObject, eventdata, handles)
% hObject handle to popupmenu_channel_choose (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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --- Executes on selection change in popupmenu_waveform.
%选择波形下拉框
function popupmenu_waveform_Callback(hObject, eventdata, handles)
% hObject handle to popupmenu_waveform (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GU
没有合适的资源?快使用搜索试试~ 我知道了~
【语音处理】基于matlab GUI音频信号提取分析【含Matlab源码 1738期】.zip
共10个文件
m:3个
ds_store:2个
wav:2个
1.该资源内容由用户上传,如若侵权请联系客服进行举报
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
2.虚拟产品一经售出概不退款(资源遇到问题,请及时私信上传者)
版权申诉
0 下载量 137 浏览量
2023-10-07
12:22:53
上传
评论 2
收藏 3.85MB ZIP 举报
温馨提示
CSDN海神之光上传的全部代码均可运行,亲测可用,尽我所能,为你服务; 1、代码压缩包内容 主函数:exp1_gui.m Fig:GUI操作界面; 运行结果效果图; 课程作业报告; 2、代码运行版本 Matlab 2019b;若运行有误,根据提示修改;若不会,可私信博主; 3、运行操作步骤 步骤一:将所有文件放到 Matlab的当前文件夹中; 步骤二:双击打开exp1_gui.m文件;(若有其他m文件,无需运行) 步骤三:点击运行,等程序运行完得到结果; 4、语音处理系列仿真咨询 如需其他服务,可私信博主或扫描博主博客文章底部QQ名片; 4.1 CSDN博客或资源的完整代码提供 4.2 期刊或参考文献复现 4.3 Matlab程序定制 4.4 科研合作 语音处理系列程序定制或科研合作方向:语音隐藏、语音压缩、语音识别、语音去噪、语音评价、语音加密、语音合成、语音分析、语音分离、语音处理、语音编码、音乐检索、特征提取、声源定位、情感识别、语音采集播放变速等;
资源推荐
资源详情
资源评论
收起资源包目录
【语音处理】基于matlab GUI音频信号提取分析【含Matlab源码 1738期】.zip (10个子文件)
【语音处理】基于matlab GUI音频信号提取分析【含Matlab源码 1738期】
.DS_Store 6KB
exp1_gui.m 28KB
exp1.m 2KB
语音素材
wav_file.wav 1.79MB
.DS_Store 6KB
speaking.wav 833KB
播放显示.mov 2.7MB
运行结果.PNG 83KB
exp1_helper.m 2KB
exp1_gui.fig 82KB
共 10 条
- 1
资源评论
海神之光
- 粉丝: 5w+
- 资源: 6110
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
最新资源
- 虚拟 Python 环境构建器.zip
- 洪涝灾害应急信息-JAVA-基于springBoot洪涝灾害应急信息管理系统设计与实现(毕业论文+PPT)
- 嗨玩旅游网站-JAVA-基于springboot嗨玩旅游网站设计与实现(毕业论文+PPT)
- 艰难学习 Python3 的代码.zip
- 个性化旅游推荐-JAVA-基于springboot个性化旅游推荐系统的设计与实现(毕业论文+PPT)
- 腾讯云 API 3.0 SDK for Python.zip
- 胡迈的 IA 独裁者完整指南.zip
- 老齐(qiwsir)的Python基础教程Gitbook版.zip
- 编程入门课程中使用的所有幻灯片、答案文件和其他解决方案.zip
- 编写代码来锻炼你的 Python 知识 .zip
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功