一、簡介
本設計針對現在大部分語音處理軟體內容繁多、操作不便等問題,采用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期】
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/259470.html
標籤:其他
上一篇:【模式識別】基于matlab Hough變換圖片車道線檢測
下一篇:零基礎C語言學習
