【语音处理】基于matlab GUI语音信号处理【含Matlab源码 290期】

一、简介

本设计针对现在大部分语音处理软件内容繁多、操作不便等问题,采用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

三、运行结果

在这里插入图片描述

四、备注

完整代码或者代写添加QQ 1564658423
往期回顾>>>>>>
【信号处理】基于matlab HMM的睡眠状态检测【含Matlab源码 050期】
【信号处理】基于matlab CDR噪声和混响抑制【含Matlab源码 051期】
【信号处理】基于matlab最小二乘法解决稀疏信号恢复问题【含Matlab源码 052期】
【信号处理】基于matlab小波变换的音频水印嵌入提取【含Matlab源码 053期】
【信号处理】基于matlab ICA算法信号分离【含Matlab源码 054期】
【信号处理】基于matlab GUI界面的脉搏信号之脉率存档【含Matlab源码 237期】
【信号处理】基于matlab GUI界面的虚拟信号发生器(各种波形)【含Matlab源码 271期】
【信号处理】基于matlab GUI界面信号发生器之电子琴【含Matlab源码 272期】
【信号处理】基于matlab的数字电子琴设计与实现【含Matlab源码 273期】
【雷达通信】基于matlab的雷达数字信号处理【含Matlab源码 281期】
【雷达通信】基于matlab线性调频(LFM)脉冲压缩雷达仿真【含Matlab源码 283期】
【雷达通信】基于mtatlab距离多普勒(RD)、CS、RM算法的机载雷达成像【含Matlab源码 284期】
【雷达通信】《现代雷达系统分析与设计》大作业【含Matlab源码 285期】

猜你喜欢

转载自blog.csdn.net/TIQCmatlab/article/details/113800676