function varargout = main(varargin)
% MAIN MATLAB code for main.fig
% MAIN, by itself, creates a new MAIN or raises the existing
% singleton*.
%
% H = MAIN returns the handle to a new MAIN or the handle to
% the existing singleton*.
%
% MAIN('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in MAIN.M with the given input arguments.
%
% MAIN('Property','Value',...) creates a new MAIN or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before main_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to main_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 main
% Last Modified by GUIDE v2.5 19-Feb-2023 10:00:31
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @main_OpeningFcn, ...
'gui_OutputFcn', @main_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 main is made visible.
function main_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 main (see VARARGIN)
% Choose default command line output for main
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes main wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = main_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)
axes(handles.axes1)
global s
global Fs
[FileName,pname]=uigetfile({'*.mp3';'*.wam'});
Fs=44100;
[s,fs]=audioread(FileName);
s=resample(s,fs,44100);
s=s(:,1);
s = Normalization(s);
N=length(s);
t=(0:N-1)/Fs;
plot(t,s);
xlabel('时间') %x轴坐标描述
ylabel('幅值');
title('时域图');
% --- 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)
axes(handles.axes2)
global s
global Fs
N=length(s);
NFFT=2^nextpow2(N);
Z=fft(s,NFFT)/N;
f = Fs/2*linspace(0,1,NFFT/2+1);
V=2*abs(s(1:NFFT/2+1));
plot(f,2*abs(Z(1:NFFT/2+1)));
axis([0,1600,0,0.1])
title('频域图');
xlabel('频率');
ylabel('幅值');
% --- 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 s
global Fs
y=s;
fs=Fs;%采样频率
p0=2e-5;%参考声压
f=[1.00 1.25 1.600 2.00 2.50 3.15 4.00 5.00 6.30 8.0]; %基准中心频率
f1=[20.00 25.0 31.5 40.0 50.0 63.0 80];
fc=[f1,100*f,1000*f,10000*f]; %%%%%%%%%中心频率%%%%%%%%
%20-16000Hz A声级计权值
cf=[-50.5,-44.7,-39.4,-34.6,-30.2,-26.2,-22.5,-19.1,-16.1,-13.4,-10.9,-8.6,-6.6,-4.8,-3.2,-1.9,-0.8,0,0.6,1.0,1.2,1.3,1.2,1.0,0.5,-0.1,-1.1,-2.5,-4.3,-6.6];
t1=1;
t2=2;
x=y;%截取需要处理的数据段
n=length(x);
t=(0:1/fs:(n-1)/fs);
w=hanning(n); %汉宁窗
xx=1.633*x.*w; %加汉宁窗(恢复系数为1.633)
nfft=2^nextpow2(n);
%nextpow2(n)-取最接近的较大2次幂
a = fft(xx,nfft);
f = fs/2*linspace(0,1,nfft/2);
w=2*abs(a(1:nfft/2)/n);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%1/3倍频程计算
oc6=2^(1/6);
nc=length(cf);
%下面这个求1/3倍频程的程序是按照振动振级计算那个来的
for j=1:nc
fl=fc(j)/oc6;
fu=fc(j)*oc6;
nl=round(fl*nfft/fs+1);
nu=round(fu*nfft/fs+1);
if fu>fs/2
m=j-1;
break;
end
b=zeros(1,nfft);
b(nl:nu)=a(nl:nu);
b(nfft-nu+1:nfft-nl+1)=a(nfft-nu+1:nfft-nl+1);
c=ifft(b,nfft);
yc(j)=sqrt(var(real(c(1:n))));
end
aj_sumn=0;
for i=1:nc
Lp1(i)=20*log10(yc(i)/p0);%未计权1/3倍频程声压级
end
%%%%%
for jj=1:nc
aj_sumn=aj_sumn+10^(0.1*Lp1(j));
end
Lp=10*log10(aj_sumn);%未计权总声压级
axes(handles.axes3);
bar(Lp1(1:nc));
gg=zeros(1,nc);
for i=1:nc
gg(1:nc)=fc(1:nc);
end
ggg=1:nc;
ylabel('声压级(dB)');
xlabel('频率')
set(gca,'xtick',ggg);
set(gca,'xticklabel',gg);
% --- 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)
% --- 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)
% --- 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 s
global Fs
y=s;
fs=Fs;%采样频率
p0=2e-5;%参考声压
f=[1.00 1.25 1.600 2.00 2.50 3.15 4.00 5.00 6.30 8.0]; %基准中心频率
f1=[20.00 25.0 31.5 40.0 50.0 63.0 80];
fc=[f1,100*f,1000*f,10000*f]; %%%%%%%%%中心频率%%%%%%%%
%20-16000Hz A声级计权值
cf=[-50.5,-44.7,-39.4,-34.6,-30.2,-26.2,-22.5,-19.1,-16.1,-13.4,-10.9,-8.6,-6.6,-4.8,-3.2,-1.9,-0.8,0,0.6,1.0,1.2,1.3,1.2,1.0,0.5,-0.1,-1.1,-2.5,-4.3,-6.6];
t1=1;
t2=2;
x=y;%截取需要处理的数据段
n=length(x);
t=(0:1/fs:(n-1)/fs);
w=hanning(n); %汉宁窗
xx=1.633*x.*w; %加汉宁窗(恢复系数为1.633)
nfft=2^nextpow2(n);
%nextpow2(n)-取最接近的较大2次幂
a = fft(xx,nfft);
f = fs/2*linspace(0,1,nfft/2);
w=2*abs(a(1:nfft/2)/n);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%1/3倍频程计算
oc6=2^(1/6);
nc=length(cf);
%下面这个求1/3倍频程的程序是按照振动振级计算那个来的
for j=1:nc
fl=fc(j)/oc6;
fu=fc(j)*oc6;
nl=round(fl*nfft/fs+1);
nu=round(fu*nfft/fs+1);
if fu>fs/2
m=j-1;
break;
end
b=zeros(1,nfft);
b(nl:nu)=a(nl:nu);
b(nfft-nu+1:nfft-nl+1)=a(nfft-nu+1:nfft-nl+1);
c=ifft(b,nfft);
yc(j)=sqrt(var(real(c(1:n))));
end
aj_sumn=0;
for i=1:nc
Lp1(i)=20*log10(yc(i)/p0);%未计权1/3倍频程声压级
end
%%%%%
for jj=1:nc
aj_sumn=aj_sumn+10^(0.1*Lp1(j));
end
Lp=10*log10(aj_sumn);%未计权总声压级
gg=zeros(1,nc);
for i=1:nc
gg(1:nc)=fc(1:nc);
end
ggg=1:nc;
%%%%%A计权1/3倍频程声压级
Lap=Lp1+cf;
aj_sum=0;
for j=1:nc
aj_sum=aj_sum+10
没有合适的资源?快使用搜索试试~ 我知道了~
一个基于A计权下的1/3倍频程语音清晰度指数测试系统
![preview](https://csdnimg.cn/release/downloadcmsfe/public/img/white-bg.ca8570fa.png)
共14个文件
m:7个
mp3:6个
fig:1个
![preview-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/scale.ab9e0183.png)
1 下载量 191 浏览量
2024-03-01
16:41:35
上传
评论
收藏 1.81MB ZIP 举报
温馨提示
一个基于A计权下的1/3倍频程语音清晰度指数测试系统是一个专门用于评估语音清晰度的系统。它结合了A计权网络和1/3倍频程分析,以模拟人耳对不同频率声音的感知特性,并计算语音清晰度指数。以下是关于这个系统的一些详细说明: 1. A计权网络 A计权网络是一种模拟人耳对不同频率声音敏感度的电子滤波器。A计权网络对低频和高频的衰减较大,而对中频的增益较大,这与人耳对声音的感知特性相似。因此,使用A计权网络可以更接近人耳的真实感受来评估声音的响度。 2. 1/3倍频程分析 1/3倍频程分析是一种频率分析方法,它将频率轴分为若干个1/3倍频程宽的频带。这种方法能够更精细地分析声音的频谱特性,特别是在低频和高频区域。 3. 语音清晰度指数 语音清晰度指数(Speech Intelligibility Index,SII)是一个用于评估语音清晰度的指标。它通常基于语音信号的频谱特性和人耳的听觉特性来计算。SII值越高,表示语音的清晰度越高。 4. 测试系统组成 基于A计权下的1/3倍频程语音清晰度指数测试系统通常包括以下几个部分: 声音采集设备:用于采集待测试的语音信号。
资源推荐
资源详情
资源评论
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![application/x-rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![zip](https://img-home.csdnimg.cn/images/20210720083736.png)
![rar](https://img-home.csdnimg.cn/images/20210720083606.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
![pdf](https://img-home.csdnimg.cn/images/20210720083512.png)
收起资源包目录
![package](https://csdnimg.cn/release/downloadcmsfe/public/img/package.f3fc750b.png)
![folder](https://csdnimg.cn/release/downloadcmsfe/public/img/folder.005fa2e5.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
![file-type](https://csdnimg.cn/release/download/static_files/pc/images/minetype/UNKNOWN.png)
共 14 条
- 1
资源评论
![avatar-default](https://csdnimg.cn/release/downloadcmsfe/public/img/lazyLogo2.1882d7f4.png)
![avatar](https://profile-avatar.csdnimg.cn/37e7a315a6d548649a5e09d8019c076f_myclassone.jpg!1)
全球学习中心
- 粉丝: 3
- 资源: 93
上传资源 快速赚钱
我的内容管理 展开
我的资源 快来上传第一个资源
我的收益
登录查看自己的收益我的积分 登录查看自己的积分
我的C币 登录后查看C币余额
我的收藏
我的下载
下载帮助
![voice](https://csdnimg.cn/release/downloadcmsfe/public/img/voice.245cc511.png)
![center-task](https://csdnimg.cn/release/downloadcmsfe/public/img/center-task.c2eda91a.png)
最新资源
- 如何充分运用ansys的HELP
- pandas-2.2.2-cp311-cp311-musllinux-1-1-x86-64.whl
- C语言可变长数组(VLA)详解与应用
- android-studio-2024.1.1.12-windows-zip.zip.001
- 辰光PHP客服系统多商户全开源V3.1版+安装教程
- android-studio-2024.1.1.12-windows-zip.zip.002
- 斜拉桥ansys命令流apdl
- android-studio-2024.1.1.12-windows-exe.zip.001
- 板壳理论ppt,文件为ppt形式,详细讲解了板壳的基本力学理论
- 深入理解Kotlin中的Lambda表达式
资源上传下载、课程学习等过程中有任何疑问或建议,欢迎提出宝贵意见哦~我们会及时处理!
点击此处反馈
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback](https://img-home.csdnimg.cn/images/20220527035711.png)
![feedback-tip](https://img-home.csdnimg.cn/images/20220527035111.png)
安全验证
文档复制为VIP权益,开通VIP直接复制
![dialog-icon](https://csdnimg.cn/release/downloadcmsfe/public/img/green-success.6a4acb44.png)