本设计针对现在大部分语音处理软件内容繁多、操作不便等问题,采用MATLAB综合运用GUI界面设计、各种函数调用等来实现语音信号的变频、变幅、傅里叶变换及滤波,程序界面简练,操作简便。
function varargout = untitledb(varargin)
% UNTITLEDB MATLAB code for untitledb.fig
% UNTITLEDB, by itself, creates a new UNTITLEDB or raises the existing
% singleton*.
%
% H = UNTITLEDB returns the handle to a new UNTITLEDB or the handle to
% the existing singleton*.
%
% UNTITLEDB('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in UNTITLEDB.M with the given input arguments.
%
% UNTITLEDB('Property','Value',...) creates a new UNTITLEDB or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before untitledb_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to untitledb_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 untitledb
% Last Modified by GUIDE v2.5 13-Jan-2017 21:00:41
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @untitledb_OpeningFcn, ...
'gui_OutputFcn', @untitledb_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 untitledb is made visible.
function untitledb_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 untitledb (see VARARGIN)
% Choose default command line output for untitledb
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes untitledb wait for user response (see UIRESUME)
% uiwait(handles.figure1);
global t fs x x11 f y0 y1 y2 mag x6 x7 x77 x20 k N fullname;
fs= str2num(get(handles.edit3,'String'));
a = str2num(get(handles.edit4,'String'));
b = str2num(get(handles.edit5,'String'));
N=(b-a)*fs+1;
x20=zeros(10,N);
x6=0;
x7=0;
x20=[];
x77=0;
k=0;
% --- Outputs from this function are returned to the command line.
function varargout = untitledb_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;
% --- Executes on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes during object creation, after setting all properties.
function pushbutton1_CreateFcn(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% --- Executes on selection change in popupmenu1.
function popupmenu1_Callback(hObject, eventdata, handles)
% hObject handle to popupmenu1 (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 popupmenu1 contents as cell array
% contents{
get(hObject,'Value')} returns selected item from popupmenu1
% --- Executes during object creation, after setting all properties.
function popupmenu1_CreateFcn(hObject, eventdata, handles)
% hObject handle to popupmenu1 (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 popupmenu2.
function popupmenu2_Callback(hObject, eventdata, handles)
% hObject handle to popupmenu2 (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 popupmenu2 contents as cell array
% contents{
get(hObject,'Value')} returns selected item from popupmenu2
% --- Executes during object creation, after setting all properties.
function popupmenu2_CreateFcn(hObject, eventdata, handles)
% hObject handle to popupmenu2 (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 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 = cellstr(get(hObject,'String')) returns popupmenu3 contents as cell array
% contents{
get(hObject,'Value')} returns selected item from popupmenu3
% --- 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 && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --- Executes on selection change in popupmenu4.
function popupmenu4_Callback(hObject, eventdata, handles)
% hObject handle to popupmenu4 (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 popupmenu4 contents as cell array
% contents{
get(hObject,'Value')} returns selected item from popupmenu4
% --- Executes during object creation, after setting all properties.
function popupmenu4_CreateFcn(hObject, eventdata, handles)
% hObject handle to popupmenu4 (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
完整代码或者代写添加QQ912100926。
往期回顾>>>>>>
【信号处理】基于GUI界面之处理录音与音频【Matlab 123期】
【信号处理】CDR噪声和混响抑制【含Matlab源码 198期】
【信号处理】最小二乘法解决稀疏信号恢复问题【Matlab 199期】
【信号处理】遗传算法的VST混响【Matlab 200期】
【信号处理】HMM的睡眠状态检测【Matlab 201期】
【信号处理】小波变换的音频水印嵌入提取【Matlab 202期】
【信号处理】ICA算法信号分离【Matlab 203期】
【信号处理】基于GUI界面的脉搏信号之脉率存档【Matlab 204期】
【信号处理】基于GUI界面的虚拟信号发生器(各种波形)【Matlab 205期】
【信号处理】基于GUI界面信号发生器之电子琴【Matlab 206期】
【信号处理】数字电子琴设计与实现【Matlab 207期】
【雷达通信】雷达数字信号处理【Matlab 214期】
【雷达通信】线性调频(LFM)脉冲压缩雷达仿真【Matlab 215期】
【雷达通信】距离多普勒(RD)、CS、RM算法的机载雷达成像【Matlab 216期】
【雷达通信】《现代雷达系统分析与设计》【Matlab 217期】