⛄一、简介
椭圆滤波器是一种数字滤波器,可以用于语音信号的去噪处理。其主要思想是利用双线性变换法设计一个级联型的椭圆IIR滤波器,对含噪语音信号进行滤波去噪处理。具体步骤如下:
1 读入含噪语音信号,并进行预处理,如去除直流分量等。
2 设计椭圆IIR滤波器,可以使用MATLAB中的ellip函数进行设计。需要指定滤波器的阶数、通带截止频率、阻带截止频率、通带最大衰减和阻带最小衰减等参数。
3 利用级联型结构实现滤波器,可以使用MATLAB中的cascade函数进行实现。
4 对含噪语音信号进行滤波处理,可以使用MATLAB中的filter函数进行实现。
5 对滤波前后的波形和频谱进行分析,评估滤波性能。
⛄二、部分源代码
function varargout = untitled(varargin)
% UNTITLED MATLAB code for untitled.fig
% UNTITLED, by itself, creates a new UNTITLED or raises the existing
% singleton*.
%
% H = UNTITLED returns the handle to a new UNTITLED or the handle to
% the existing singleton*.
%
% UNTITLED(‘CALLBACK’,hObject,eventData,handles,…) calls the local
% function named CALLBACK in UNTITLED.M with the given input arguments.
%
% UNTITLED(‘Property’,‘Value’,…) creates a new UNTITLED or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before untitled_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to untitled_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 untitled
% Last Modified by GUIDE v2.5 14-May-2016 01:02:21
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct(‘gui_Name’, mfilename, …
‘gui_Singleton’, gui_Singleton, …
‘gui_OpeningFcn’, @untitled_OpeningFcn, …
‘gui_OutputFcn’, @untitled_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 untitled is made visible.
function untitled_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 untitled (see VARARGIN)
% Choose default command line output for untitled
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes untitled wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% — Outputs from this function are returned to the command line.
function varargout = untitled_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)
msgbox(‘¼ ʼ’,’ ӭ ');
fs=8000;
y=audiorecorder(fs,16,1);
recordblocking(y, 5);
a=getaudiodata(y);
audiowrite(‘test1.wav’,a,fs);
msgbox('¼ ','лл ');
⛄三、运行结果
⛄四、matlab版本及参考文献
1 matlab版本
2014a
2 参考文献
[1]韩纪庆,张磊,郑铁然.语音信号处理(第3版)[M].清华大学出版社,2019.
[2]柳若边.深度学习:语音识别技术实践[M].清华大学出版社,2019.
3 备注
简介此部分摘自互联网,仅供参考,若侵权,联系删除