【滤波器】基于汉宁窗FIR滤波器实现语音信号加噪去噪含Matlab源码
1 简介
结合数字滤波器的理论基础和设计方法,在MATLAB程序语言环境下,设计出有限长单位脉冲响应(FIR)数字滤波器,同时利用GUI界面设计FIR数字滤波器人机交互平台,该系统平台界面直观、操作简单且功能齐全,可实现对加噪语音信号的去噪滤波功能.平台主要包括语音信号、加噪信号、FIR数字滤波器设计和去噪信号四个模块,用户可根据读入的语音信号及噪声信号特点调整滤波器技术指标,实现滤波器的优化设计,最终达到FIR数字滤波器对语音信号的去噪处理效果.
2 部分代码
function varargout = filter_config(varargin)
% FILTER_CONFIG M-file for filter_config.fig
% FILTER_CONFIG, by itself, creates a new FILTER_CONFIG or raises the existing
% singleton*.
%
% H = FILTER_CONFIG returns the handle to a new FILTER_CONFIG or the handle to
% the existing singleton*.
%
% FILTER_CONFIG('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in FILTER_CONFIG.M with the given input arguments.
%
% FILTER_CONFIG('Property','Value',...) creates a new FILTER_CONFIG or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before filter_config_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to filter_config_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 filter_config
% Last Modified by GUIDE v2.5 20-Nov-2012 22:45:50
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @filter_config_OpeningFcn, ...
'gui_OutputFcn', @filter_config_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 filter_config is made visible.
function filter_config_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 filter_config (see VARARGIN)
% Choose default command line output for filter_config
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes filter_config wait for user response (see UIRESUME)
% uiwait(handles.panal1);
% --- Outputs from this function are returned to the command line.
function varargout = filter_config_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;
axes(handles.axes1);
plot(20*log10(abs(fft(bs))));
axis([0 3*Wn -inf inf]);
axes(handles.axes2);
plot(angle(fft(bs)));
axis([-inf inf -inf inf]);
setappdata(handles.panal1,'bl1',bl1);
setappdata(handles.panal1,'bl2',bl2);
setappdata(handles.panal1,'bf_window',bf_window);
setappdata(handles.panal1,'bh',bh);
setappdata(handles.panal1,'bs',bs);
setappdata(handles.panal1,'Wn',Wn);
setappdata(0,'bs',bs);
setappdata(0,'bh',bh);
setappdata(0,'bl1',bl1);
% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes on button press in close.
function close_Callback(hObject, eventdata, handles)
% hObject handle to close (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
clc;
close filter_config;
function Wn_Callback(hObject, eventdata, handles)
% hObject handle to Wn (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of Wn as text
% str2double(get(hObject,'String')) returns contents of Wn as a double
% --- Executes during object creation, after setting all properties.
function Wn_CreateFcn(hObject, eventdata, handles)
% hObject handle to Wn (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit 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
function band_Callback(hObject, eventdata, handles)
% hObject handle to band (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of band as text
% str2double(get(hObject,'String')) returns contents of band as a double
% --- Executes during object creation, after setting all properties.
function band_CreateFcn(hObject, eventdata, handles)
% hObject handle to band (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit 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
function Wdel_Callback(hObject, eventdata, handles)
% hObject handle to Wdel (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: get(hObject,'String') returns contents of Wdel as text
% str2double(get(hObject,'String')) returns contents of Wdel as a double
% --- Executes during object creation, after setting all properties.
function Wdel_CreateFcn(hObject, eventdata, handles)
% hObject handle to Wdel (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit 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 filter_choose.
function filter_choose_Callback(hObject, eventdata, handles)
% hObject handle to filter_choose (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 filter_choose contents as cell array
% contents{get(hObject,'Value')} returns selected item from filter_choose
bl1=getappdata(handles.panal1,'bl1');
bl2=getappdata(handles.panal1,'bl2');
bf_window=getappdata(handles.panal1,'bf_window');
bh=getappdata(handles.panal1,'bh');
bs=getappdata(handles.panal1,'bs');
Wn=getappdata(handles.panal1,'Wn');
select=get(handles.filter_choose,'value');
switch select
case 1
axes(handles.axes1);
plot(20*log10(abs(fft(bs))));
axis([0 3*Wn -40 1]);
axes(handles.axes2);
plot(angle(fft(bs)));
axis([0 Wn -4 1]);
case 2
axes(handles.axes1);
plot(20*log10(abs(fft(bl1))));
axis([0 3*Wn -40 1]);
axes(handles.axes2);
plot(angle(fft(bl1)));
axis([0 Wn -4 1]);
case 3
axes(handles.axes1);
plot(20*log10(abs(fft(bl2))));
axis([0 3*Wn -40 1]);
axes(handles.axes2);
plot(angle(fft(bl2)));
axis([0 Wn -4 1]);
case 4
axes(handles.axes1);
plot(20*log10(abs(fft(bf_window))));
axis([0 3*Wn -40 1]);
axes(handles.axes2);
plot(angle(fft(bf_window)));
axis([0 Wn -4 1]);
case 5
axes(handles.axes1);
plot(20*log10(abs(fft(bh))));
axis([0 3*Wn -40 1]);
axes(handles.axes2);
plot(angle(fft(bh)));
axis([Wn 2*Wn -4 1]);
end
% --- Executes during object creation, after setting all properties.
function filter_choose_CreateFcn(hObject, eventdata, handles)
% hObject handle to filter_choose (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
3 仿真结果
4 参考文献
[1]冯浩. 基于MATLAB GUI的FIR数字滤波器语音信号去噪处理[J]. 菏泽学院学报, 2016, 38(5):5.
博主简介:擅长智能优化算法、神经网络预测、信号处理、元胞自动机、图像处理、路径规划、无人机等多种领域的Matlab仿真,相关matlab代码问题可私信交流。
部分理论引用网络文献,若有侵权联系博主删除。
【滤波器】基于汉宁窗FIR滤波器实现语音信号加噪去噪含Matlab源码相关推荐
- 基于汉宁窗FIR滤波器实现语音信号的去噪处理
基于汉宁窗FIR滤波器实现语音信号的去噪处理 在语音通信中,由于种种原因,常常存在着各种噪声,这些噪声会极大地影响语音信号的质量和清晰度.为了解决这个问题,我们可以采用基于汉宁窗FIR滤波器的方法来对 ...
- 【Matlab语音处理】汉宁窗FIR陷波滤波器语音信号加噪去噪【含GUI源码 1711期】
一.代码运行视频(哔哩哔哩) [Matlab语音处理]汉宁窗FIR陷波滤波器语音信号加噪去噪[含GUI源码 1711期] 二.matlab版本及参考文献 1 matlab版本 2014a 2 参考文献 ...
- 【GPS仿真】基于matlab GPS信号捕获跟踪【含Matlab源码 2126期】
⛄一.获取代码方式 获取代码方式1: 完整代码已上传我的资源:[GPS仿真]基于matlab GPS信号捕获跟踪[含Matlab源码 2126期] 点击上面蓝色字体,直接付费下载,即可. 获取代码方式 ...
- 【语音响度】基于matlab语音声强与响度【含Matlab源码 541期】
⛄一.获取代码方式 获取代码方式1: 完整代码已上传我的资源:[语音响度]基于matlab语音声强与响度[含Matlab源码 541期] 点击上面蓝色字体,直接付费下载,即可. 获取代码方式2: 付费 ...
- 【滤波器】基于FIR+IIR(高通+低通+带通)滤波器实现音频信号去噪含Matlab源码
1 简介 结合数字滤波器的理论基础和设计方法,在MATLAB程序语言环境下,设计出有限长单位脉冲响应(FIR)数字滤波器,同时利用GUI界面设计FIR数字滤波器人机交互平台,该系统平台界面直观.操作简 ...
- 【语音去噪】基于FIR滤波器实现音频去噪含Matlab源码
1 简介 结合数字滤波器的理论基础和设计方法,在MATLAB程序语言环境下,设计出有限长单位脉冲响应(FIR)数字滤波器,同时利用GUI界面设计FIR数字滤波器人机交互平台,该系统平台界面直观.操作简 ...
- 【滤波器】基于低通滤波器语音信号加噪与去噪含Matlab源码
1 简介 1.1 课题的背景与意义 通过语音传递信息是人类最重要.最有效.最常用和最方便的交换信息的形式.让计算机能听懂人类的语言,是人类自计算机诞生以来梦寐以求的想法,用现代手段研究语音信号,使人们 ...
- 【语音去噪】基于最小二乘自适应滤波LMS和RLS实现语音去噪含Matlab源码
1 简介 自适应信号处理的理论和技术已经成为人们常用滤波和去噪技术.文中讲述了自适应滤波的原理以及LMS算法和RLS算法两种基本自适应算法的原理及步骤.并用MATLAB分别对两种算法进行了自适应滤波仿 ...
- 【语音识别】基于matlab GUI MFCC+VAD端点检测智能语音门禁系统【含Matlab源码 451期】
⛄一.MFCC简介 1 引言 语音识别是一种模式识别, 就是让机器通过识别和理解过程把语音信号转变为相应的文本或命令的技术.语音识别技术主要包括特征提取技术.模式匹配准则及模型训练技术3个方面.目前一 ...
最新文章
- 企业研发管理工具应用分析
- 搭建Harbor 2.x仓库 - docker私仓搭建
- easyui datagrid b表格中的内容显示null_扫盲 | 实际工作中,B 端设计都在做什么?...
- 管线命令 cut grep
- 鲁迅散文——随感录三十五
- python thinker canvas create_arc 使用详解
- BATJ面试必会|Jvm 虚拟机篇
- 【C++ Priemr | 15】虚函数表剖析(二)
- PHP中使用八进制 可以在前面加,PHP学习笔记(二)
- 关于session.auto_start报警的问题
- android百度地图例子,使用百度地图API进行Android地图应用开发(Eclipse)(示例代码)...
- 【Yii框架系列一】Yii中CDbCriteria常用总结
- js判断对象是否为空或对象的属性是否为空
- 超平面(hyperplane)
- 【评测】牛血清白蛋白(BSA)篇
- [工具]Microsoft To-Do,简约还是简陋?
- C++的替代:微软如何使用rust?
- 【学术】 一个博士的经历(小木虫精华帖,留着细细体会!)
- 超星移动图书馆opds_移动图书馆工厂实验室为农村地区带来了新技能
- python数据分析——择偶标准与黑名单
热门文章
- java组件介绍_Java组件介绍 - osc_wws45aot的个人空间 - OSCHINA - 中文开源技术交流社区...
- fis pure开发php,GitHub - fex-team/fis-pure: 基于FIS的纯前端模块化解决方案
- 基于vue3+springboot的个人博客系统
- 越“抽”越“亏”,网约车的未来在哪里?
- 【网络安全】反序列化漏洞详细解析
- 读书笔记 摘自:《思维导图攻略:快速上手与落地实践》
- 裸机服务器安装centos7新手心酸历程
- pkg-config: exec: “pkg-config“: executable file not found in $PATH
- mysql服务启动不了问题
- Linux看门狗驱动程序设计(三) 测试验证