function varargout = caji(varargin)
% CAJI MATLAB code for caji.fig
% CAJI, by itself, creates a new CAJI or raises the existing
% singleton*.
%
% H = CAJI returns the handle to a new CAJI or the handle to
% the existing singleton*.
%
% CAJI('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in CAJI.M with the given input arguments.
%
% CAJI('Property','Value',...) creates a new CAJI or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before caji_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to caji_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 caji
% Last Modified by GUIDE v2.5 06-Jan-2015 16:59:56
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @caji_OpeningFcn, ...
'gui_OutputFcn', @caji_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 caji is made visible.
function caji_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 caji (see VARARGIN)
% Choose default command line output for caji
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes caji wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = caji_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)
global sys
[y,fs,nbits]=wavread(sys);
fs=16000;
sound(y,fs)
Y=fft(y);
N=length(y);n=0:N-1;
q=n*2*pi/N;
subplot(2,2,2);plot(n,y);title('原始信号波形');
subplot(2,2,4);plot(q/pi,abs(Y));title('原始信号频谱')
%%此部分实现采样频率为8khz的语音信号的播放与分析
% --- 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)
global sys
[x,fs,nbits]=wavread(sys);
fs=8000;
y=decimate(x,2);
sound(y,fs)
X=fft(y);
N=length(y);n=0:N-1;
q=n*2*pi/N;
figure(2)
subplot(2,1,1);plot(y);title('fs=8khz信号波形');
subplot(2,1,2);plot(q/pi,abs(X));title('fs=8khz信号频谱');
%此部分实现采样频率为4khz的语音信号的播放与分析
% --- Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global sys
[x,fs,nbits]=wavread(sys);
fs=4000;
y=decimate(x,4);
sound(y,fs)
X=fft(y);
N=length(y);n=0:N-1;
q=n*2*pi/N;
figure(3)
subplot(2,1,1);plot(y);title('fs=4khz信号波形');
subplot(2,1,2);plot(q/pi,abs(X));title('fs=4khz信号频谱');
%此部分实现采样频率为2khz的语音信号的播放与分析
% --- Executes on button press in pushbutton4.
function pushbutton4_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global sys
[x,fs,nbits]=wavread(sys);
fs=2000;
y=decimate(x,8);
sound(y,fs)
X=fft(y);
N=length(y);n=0:N-1;
q=n*2*pi/N;
figure(4)
subplot(2,1,1);plot(y);title('fs=2khz信号波形');
subplot(2,1,2);plot(q/pi,abs(X));title('fs=2khz信号频谱');
%此部分实现对原始语音信号添加噪声并对加噪后的语音信号进行分析
% --- Executes on button press in pushbutton5.
function pushbutton5_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton5 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
edt6 = get(handles.edit6,'String');
edt8 = get(handles.edit8,'String');
ff=str2num(edt6);
gg=str2num(edt8);
global sys
[x,fs,nbits]=wavread(sys);
fs=16000;
n=0:length(x)-1;
x1=x+ff*cos(gg*pi*n)';
SNR1=snr(x1,x)
ss=num2str(SNR1);%在文本标签8中显示信噪比
set(handles.text10,'String',ss);
sound(x1,fs)
X=fft(x1);
N=length(x);n=0:N-1;q=n*2*pi/N;
figure(5)
subplot(2,1,1);plot(x1);title('加噪信号波形');
subplot(2,1,2);plot(q/pi,abs(X));title('加噪信号频谱');
%此部分实现对原始语音信号进行内插恢复并对恢复后的语音信号进行分析
% --- Executes on button press in pushbutton6.
function pushbutton6_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton6 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global sys
[y,fs,nbits]=wavread(sys);
fs=16000;
N=length(y);
n=0:N-1;
ni=0:N-1;
yi=interp1(n,y,ni,'spline');
sound(yi,fs)
Y=fft(yi);
q=n*2*pi/N;
figure(6)
subplot(2,1,1);plot(yi);title('恢复信号波形');
subplot(2,1,2);plot(q/pi,abs(Y));title('恢复信号频谱');
%此部分是巴特沃斯滤波器的设计程序
% --- Executes on button press in pushbutton7.
function pushbutton7_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton7 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
%wp=input1*pi;ws=input2*pi;Rp=input3;Rs=input4;
edt1 = get(handles.edit1,'String'); edt2= get(handles.edit2,'String');
edt3= get(handles.edit3,'String'); edt4 = get(handles.edit4,'String');
aa=str2num(edt1);bb=str2num(edt2);cc=str2num(edt3);dd=str2num(edt4);
wp=aa*pi;ws=bb*pi;Rp=cc;Rs=dd;
fs=16000;
T=1/fs;
OmegaP=(2/T)*tan(wp/2);
OmegaS=(2/T)*tan(ws/2);
ep=sqrt(10^(Rp/10)-1);
Ripple=sqrt(1/(1+ep*ep));
Attn=1/(10^(Rs/20));
A1=1/Attn;a1=sqrt(A1*A1-1)/ep;
a2=OmegaS/OmegaP;
N=ceil(logm(a1+sqrt(a1*a1-1))/logm(a2+sqrt(a2*a2-1)));
jieshu=num2str(N);%在文本标签8中显示滤波器阶数
set(handles.text8,'String',jieshu);
[cs,ds]=u_buttap(N,OmegaP);
[b,a]=bilinear(cs,ds,1/T);
[db,mag,pha,w]=freqz_m(b,a);
figure(7)
subplot(2,1,1);plot(w/pi,mag);xlabel('Hz'),ylabel('MAG');
title('digital filter Magnitude Response');
axis([0,1,0,1.1]);grid
subplot(2,1,2);plot(w/pi,db);xlabel('Hz'),ylabel('DB');
title('digital filter Magnitude in DB')
axis([0,1,-40,5]);grid
%此部分是用巴特沃斯数字滤波器对加噪信号进行滤波并对滤波后的信号进行分析
% --- Executes on button press in pushbutton8.
function pushbutton8_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton8 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global s
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
滤波器设计在数字信号处理中占有极其重要的地位,IIR滤波器是滤波器设计的重要组成部分。课题基于Matlab有噪音语音信号处理的设计与实现,综合运用数字信号处理的理论知识对加噪声语音信号进行时域、频域分析和滤波。在设计实现的过程中,用巴特沃斯、切比雪夫和双线性变换法设计IIR数字滤波器,并利用Matlab作为辅助工具完成设计中的计算与图形的绘制。Matlab图形用户界面GUI的数字滤波器设计与仿真方法,不仅依赖于Matlab代码,而且充分利用控件,使得设计更加的快捷、直观、灵活性强。通过LabVIEW对所设计的系统进行仿真分析,可以有效快捷地设计IIR数字滤波器,结果的各项性能指标均达到指定要求。并对语音信号进行分帧(enframe函数),分别取浊音帧和清音帧计算短时能量和短时平均过零率等参数,并对结果进行比较分析。
资源推荐
资源详情
资源评论
收起资源包目录
基于IIR滤波的语音信号处理系统设计.rar (56个子文件)
基于IIR滤波的语音信号处理系统设计
M文件
语音分析-M文件名zuizhong.m
figure2.jpg 29KB
figure12.jpg 26KB
auto_correlation.m 201B
freqz_m.m 423B
figure13.jpg 21KB
figure1.jpg 29KB
figure11.jpg 34KB
u_chb1ap.m 372B
figure14.jpg 37KB
sgn.m 210B
snr.m 176B
enframe.m 372B
figure7.jpg 39KB
zuizhong.m 6KB
afd_butt.m 393B
jilu.m 406B
u_buttap.m 397B
figure9.jpg 38KB
figure5.jpg 25KB
chi1.WAV 31KB
figure3.jpg 28KB
figure8.jpg 29KB
figure10.jpg 30KB
figure6.jpg 30KB
figure4.jpg 25KB
GUI - M文件名为caji.m
figure2.jpg 29KB
figure12.jpg 26KB
auto_correlation.m 201B
freqz_m.m 423B
figure13.jpg 21KB
figure1.jpg 29KB
figure11.jpg 34KB
u_chb1ap.m 372B
figure14.jpg 37KB
sgn.m 210B
snr.m 176B
enframe.m 372B
figure7.jpg 39KB
afd_butt.m 393B
jilu.m 406B
u_buttap.m 397B
figure9.jpg 38KB
figure5.jpg 25KB
chi1.WAV 31KB
caji.m 21KB
caji.fig 8KB
figure3.jpg 28KB
figure8.jpg 29KB
figure10.jpg 30KB
figure6.jpg 30KB
figure4.jpg 25KB
程序清单
Matlab必作部分.doc 983KB
利用LabVIEW录制语音.vi 74KB
Matlab选作部分.doc 300KB
利用LabVIEW进行系统仿真设计.vi 253KB
课设任务书.doc 28KB
共 56 条
- 1
资源评论
一只快乐的小青年
- 粉丝: 9
- 资源: 16
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功