【语音去噪】多窗口谱减法语音信号去噪【含Matlab源码 2584期】

   日期:2024-12-26    作者:kzzdb 移动:http://oml01z.riyuangf.com/mobile/quote/31791.html

🚅座右铭:行百里者,半于九十。

【语音去噪】多窗口谱减法语音信号去噪【含Matlab源码 2584期】

🏆代码获取方式
CSDN Matlab武动乾坤—代码获取方式

更多Matlab语音处理仿真内容点击👇
①Matlab语音处理(进阶版

⛳️关注CSDN Matlab武动乾坤,更多资源等你来

在语音去噪中最常用的方法是谱减法,谱减法是一种发展较早且应用较为成熟的语音去噪算法,该算法利用加性噪声与语音不相关的特点,在假设噪声是统计平稳的前提下,用无语音间隙测算到的噪声频谱估计值取代有语音期间噪声的频谱,与含噪语音频谱相减,从而获得语音频谱的估计值。谱减法具有算法简单、运算量小的特点,便于实现快速处理,往往能够获得较高的输出信噪比,所以被广泛采用。该算法经典形式的不足之处是处理后会产生具有一定节奏性起伏、听上去类似音乐的“音乐噪声”。

function fwseg_dist_noise_AI= AIST(cleanFile, enhancedFile,noiseFile)
% ----------------------------------------------------------------------
% Articulation index_short time(AIST)Objective Speech Quality Measure
% This function implements the AIST Measure
% Usage:AIST=AIST(clean.wav,enhanced.wav,noise.wav)
% clean.wav.wav-clean input file in.wav format
% enhanced.wav-enhanced output file in .wav format
% noise.wav- noise file which is noisy-clean
% AI_ST --computed AIST
% Note that the AIST measure is limited in the range[0,1].
% Example call: AI_ST = AIST(‘sp04.wav’,‘sp04_babble_sn10.wav’,’sp04_babble_sn10.wav-sp04.wav’)
% SNR=Xhat2/D2
% ----------------------------------------------------------------------
if nargin~=3
fprintf(‘USAGE: AIST=AIST(cleanFile.wav, enhancedFile.wav,noiseFile) ’);
fprintf(‘For more help, type: help comp_fwseg ’);
return;
end
[data0, Srate0]= audioread(noiseFile);
[data1, Srate1]= audioread(cleanFile);
[data2, Srate2]= audioread(enhancedFile);
if ( Srate0~= Srate1)
error( ‘The three files do not match! ’);
end
len= min(min(length(data0), length( data1)), length( data2));
data0= data0( 1: len)+eps;
data1= data1( 1: len)+eps;
data2= data2( 1: len)+eps;
wss_dist_vec_noisy= fwseg_noise( data0, data1, data2,Srate1);
fwseg_dist_noise_AI=mean(wss_dist_vec_noisy);
% ----------------------------------------------------------------------
function distortion = fwseg_noise(noise_speech, clean_speech, processed_speech,sample_rate)
% ----------------------------------------------------------------------
% Check the length of the noisy,the clean and processed speech.Must be the
% same
% ----------------------------------------------------------------------
noise_length = length(noise_speech);
clean_length = length(clean_speech);
processed_length = length(processed_speech);
if (noise_length ~= clean_length | clean_length ~= processed_length)
disp(‘Error: Files must have same length.’);
return
end
% ----------------------------------------------------------------------
% Global Variables
Len=30;
% ----------------------------------------------------------------------
winlength = round(Lensample_rate/1000); % window length in samples
skiprate = floor(winlength/4); %window skip in samples
max_freq = sample_rate/2; %maximum bandwidth
num_crit = 25; % number of critical bands
USE_25=1;
n_fft = 2^nextpow2(2
winlength);
n_fftby2 = n_fft/2; % FFT size/2
gamma=1; % power exponent
% ----------------------------------------------------------------------
%Critical Band Filter Definitions(Center Frequency and Bandwidths in Hz)
% ----------------------------------------------------------------------
cent_freq(1) = 50.0000; bandwidth(1) = 70.0000;
cent_freq(2) = 120.000; bandwidth(2) = 70.0000;
cent_freq(3) = 190.000; bandwidth(3) = 70.0000;
cent_freq(4) = 260.000; bandwidth(4) = 70.0000;
cent_freq(5) = 330.000; bandwidth(5) = 70.0000;
cent_freq(6) = 400.000; bandwidth(6) = 70.0000;
cent_freq(7) = 470.000; bandwidth(7) = 70.0000;
cent_freq(8) = 540.000; bandwidth(8) = 77.3724;
cent_freq(9) = 617.372; bandwidth(9) = 86.0056;
cent_freq(10) = 703.378; bandwidth(10) = 95.3398;
cent_freq(11) = 798.717; bandwidth(11) = 105.411;
cent_freq(12) = 904.128; bandwidth(12) = 116.256;
cent_freq(13) = 1020.38; bandwidth(13) = 127.914;
cent_freq(14) = 1148.30; bandwidth(14) = 140.423;
cent_freq(15) = 1288.72; bandwidth(15) = 153.823;
cent_freq(16) = 1442.54; bandwidth(16) = 168.154;
cent_freq(17) = 1610.70; bandwidth(17) = 183.457;
cent_freq(18) = 1794.16; bandwidth(18) = 199.776;
cent_freq(19) = 1993.93; bandwidth(19) = 217.153;
cent_freq(20) = 2211.08; bandwidth(20) = 235.631;
cent_freq(21) = 2446.71; bandwidth(21) = 255.255;
cent_freq(22) = 2701.97; bandwidth(22) = 276.072;
cent_freq(23) = 2978.04; bandwidth(23) = 298.126;
cent_freq(24) = 3276.17; bandwidth(24) = 321.465;
cent_freq(25) = 3597.63; bandwidth(25) = 346.136;
% ----------------------------------------------------------------------
% Set up the critical band filters.Note here that Gaussianly shaped
% filter are used.Also, the sum of the filter weights are equivalent
% for each critical band filter.Filter less than -30dB point of filter
% ----------------------------------------------------------------------
bw_min = bandwidth (1); % minimum critical bandwidth
min_factor = exp (-30.0 / (2.0 * 2.303)); % -30 dB point of filter
for i = 1:num_crit
f0 = (cent_freq (i) / max_freq) * (n_fftby2);
all_f0(i) = floor(f0);
bw = (bandwidth (i) / max_freq) * (n_fftby2);
norm_factor = log(bw_min) - log(bandwidth(i));
j = 0:1:n_fftby2-1;
crit_filter(i,:) = exp (-11 (((j - floor(f0)) https://blog.csdn.net/KeepingMatlab/article/details/bw).^2) + norm_factor);
crit_filter(i,:) = crit_filter(i,:).
(crit_filter(i,:) > min_factor);
end

1 matlab版本
2014a

2 参考文献
[1]韩纪庆,张磊,郑铁然.语音信号处理(第3版)[M].清华大学出版社,2019.
[2]柳若边.深度学习:语音识别技术实践[M].清华大学出版社,2019.

3 备注
简介此部分摘自互联网,仅供参考,若侵权,联系删除

🍅 仿真咨询
1 各类智能优化算法改进及应用

生产调度、经济调度、装配线调度、充电优化、车间调度、发车优化、水库调度、三维装箱、物流选址、货位优化、公交排班优化、充电桩布局优化、车间布局优化、集装箱船配载优化、水泵组合优化、解医疗资源分配优化、设施布局优化、可视域基站和无人机选址优化

2 机器学习和深度学习方面
卷积神经网络(CNN)、LSTM、支持向量机(SVM)、最小二乘支持向量机(LSSVM)、极限学习机(ELM)、核极限学习机(KELM)、BP、RBF、宽度学习、DBN、RF、RBF、DELM、XGBOOST、TCN实现风电预测、光伏预测、电池寿命预测、辐射源识别、交通流预测、负荷预测、股价预测、PM2.5浓度预测、电池健康状态预测、水体光学参数反演、NLOS信号识别、地铁停车精准预测、变压器故障诊断

3 图像处理方面
图像识别、图像分割、图像检测、图像隐藏、图像配准、图像拼接、图像融合、图像增强、图像压缩感知

4 路径规划方面
旅行商问题(TSP)、车辆路径问题(VRP、MVRP、CVRP、VRPTW等)、无人机三维路径规划、无人机协同、无人机编队、机器人路径规划、栅格地图路径规划、多式联运运输问题、车辆协同无人机路径规划、天线线性阵列分布优化、车间布局优化

5 无人机应用方面
无人机路径规划、无人机控制、无人机编队、无人机协同、无人机任务分配

6 无线传感器定位及布局方面
传感器部署优化、通信协议优化、路由优化、目标定位优化、Dv-Hop定位优化、Leach协议优化、WSN覆盖优化、组播优化、RSSI定位优化

7 信号处理方面
信号识别、信号加密、信号去噪、信号增强、雷达信号处理、信号水印嵌入提取、肌电信号、脑电信号、信号配时优化

8 电力系统方面
微电网优化、无功优化、配电网重构、储能配置

9 元胞自动机方面
交通流 人群疏散 病毒扩散 晶体生长


特别提示:本信息由相关用户自行提供,真实性未证实,仅供参考。请谨慎采用,风险自负。


举报收藏 0评论 0
0相关评论
相关最新动态
推荐最新动态
点击排行
{
网站首页  |  关于我们  |  联系方式  |  使用协议  |  隐私政策  |  版权隐私  |  网站地图  |  排名推广  |  广告服务  |  积分换礼  |  网站留言  |  RSS订阅  |  违规举报  |  鄂ICP备2020018471号