当前位置:网站首页 > 技术博客 > 正文

基于matlab的语音信号处理与分析

一、简介

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

三、运行结果

在这里插入图片描述

四、备注

版本:2014a

版权声明


相关文章:

  • 收藏夹吃灰是什么意思2025-08-23 09:01:04
  • mysql in和=的区别2025-08-23 09:01:04
  • 原型设计的流程2025-08-23 09:01:04
  • sift matlab2025-08-23 09:01:04
  • int类型和integer的区别2025-08-23 09:01:04
  • python面向对象编程的三大特性2025-08-23 09:01:04
  • webpack怎么打包?为什么用?怎么配置?2025-08-23 09:01:04
  • clutch clench 区别2025-08-23 09:01:04
  • css 光晕2025-08-23 09:01:04
  • 前端酷炫页面2025-08-23 09:01:04