MATLAB语音录入加噪低通滤波去噪

目录

摘要

1、源程序+文档,MATLAB语音去噪,GUI界面设计,低通滤波去噪;
2、对.WAV文件进行时域与频域分析并进行播放。
3、画出所要加入的噪音信号的时域图形并进行分析并对噪音信号进行播放,
4、语音采集FIR低通滤波器,
5、IIR低通滤波,使用巴特沃斯滤波器

语音信号分析是语音信号处理的前提和基础,只有分析出可表示语音信号本质特征的参数,才有可能利用这些参数进行高效的语音通信、语音合成和语音识别等处理[8]。而且,语音合成的音质好坏,语音识别率的高低,也都取决于对语音信号分桥的准确性和精确性。因此语音信号分析在语音信号处理应用中具有举足轻重的地位。
贯穿于语音分析全过程的是”短时分析技术”。因为,语音信号从整体来看其特性及表征其本质特征的参数均是随时间而变化的,所以它是一个非乎稳态过程,不能用处理乎稳信号的数字信号处理技术对其进行分析处理。但是,由于不同的语音是由人的口腔肌肉运动构成声道某种形状而产生的响应,而这种口腔肌肉运动相对于语音频率来说是非常缓慢的,所以从另一方面看,虽然语音倍号具有时变特性,但是在一个短时间范围内(一般认为在10~30ms的短时间内),其特性基本保持不变即相对稳定,因面可以将其看作是一个准稳态过程,即语音信号具有短时平稳性。所以任何语音信号的分析和处理必须建立在”短时”的基础上.即进行”短时分析”,将语音信号分为一段一段来分析其特征参数,其中每一段称为一”帧”,帧长一般取为10~30ms。这样,对于整体的语音信号来讲,分析出的是由每一帧特征参数组成的特征参数时间序列。
根据分析参数的不同性质,语音信号分析可分为时域分析、频域分析、逆域分析等。时域分析方法具有计算简单、计算量小、物理意义明确等优点。然而,由于语音信号最重要的感知特征反映在功率谱上,而相位变化只起到很小的作用,所以频域分析比时域分析更重要。

[En]

According to the different properties of the analyzed parameters, speech signal analysis can be divided into time domain analysis, frequency domain analysis, inverse domain analysis and so on. Time domain analysis method has the advantages of simplicity, small amount of calculation and clear physical meaning. However, because the most important perceptual characteristic of speech signal is reflected in the power spectrum, and the phase change only plays a small role, so frequency domain analysis is more important than time domain analysis.

语音信号的时域分析就是对语音信号的时域参数进行分析和提取。在语音分析中,第一次接触和最直观的就是它的时域波形。语音信号本身就是一个时域信号,所以时域分析是最早也是应用最广泛的分析方法,它直接利用语音信号的时域波形进行分析。时间域分析通常用于最基本的参数分析和应用,如语音分割、预处理、大分类等。这种分析方法的特点是用①表达的语音信号更直观,物理意义明确。②实现简单,运算量少。③可以得到一些重要的语音参数。④只使用示波器等通用设备,使用相对简单。

[En]

The time domain analysis of speech signal is to analyze and extract the time domain parameters of speech signal. In speech analysis, the first contact and the most intuitive is its time domain waveform. The speech signal itself is a time-domain signal, so time-domain analysis is the earliest and most widely used analysis method, which directly uses the time-domain waveform of the speech signal. Time domain analysis is usually used for the most basic parameter analysis and applications, such as speech segmentation, preprocessing, large classification and so on. The characteristic of this analysis method is that the speech signal expressed by ① is more intuitive and the physical meaning is clear. ② is easy to implement and has few operations. ③ can get some important parameters of speech. ④ only uses general equipment such as oscilloscope, which is relatively simple to use.

语音信号的时域参数有短时能量、短时过零率、短时白相关函数和短时平均幅度差函数等,这是语音信号的一组最基本的短时参数,在各种语音信号数字处理技术中都要应用[6]。在计算这些参数时使用的一般是方窗或海明窗。
语音信号的频域分析就是对语音信号的频域特性进行分析。从广义上讲,语音信号的频域分析包括频谱分析、功率谱分析、倒谱分析、频谱包络分析等,而常用的频域分析方法有带通滤波器法、傅里叶变换法、线预测法等。

[En]

The frequency domain analysis of speech signal is to analyze the frequency domain characteristics of speech signal. In a broad sense, the frequency domain analysis of speech signal includes spectrum, power spectrum, cepstrum, spectrum envelope analysis and so on, while the commonly used frequency domain analysis methods include bandpass filter bank method, Fourier transform method, line prediction method and so on.

首先用一小段音乐对信号进行采样,提取采样语音信号的时域波形和频谱;然后对加噪后的语音信号进行时域分析和频域分析,得到波形和频谱;最后将噪声信号与原始信号叠加,再进行时域分析和频域分析得到波形和频谱。然后根据音乐信号、噪声和混合信号的频谱进行了滤波器的设计。重点是滤清器的技术指标设计。最后通过滤波得到最终需要的信号,并对滤波前后的语音信号的波形和频谱进行比较。

[En]

First, a small piece of music is used and the signal is sampled; the time domain waveform and frequency spectrum of the sampled speech signal are drawn; secondly, the time domain analysis and frequency domain analysis of the added noise are carried out to get the waveform and frequency spectrum; thirdly, the noise signal is superimposed with the original signal, and then the time domain analysis and frequency domain analysis are carried out to get the waveform and spectrum. Then the filter is designed according to the frequency spectrum of music signal, noise and mixed signal. The key point is to design the technical index of the filter. Finally, the final required signal is obtained by filtering, and the waveform and frequency spectrum of the speech signal before and after filtering are compared.

设连续信号属带限信号,最高截止频率为wc,如果采样角频率ws>=2wc,那么让采采样信号通过一个增益为T、截止频率为ws/2=pi/T的理想低通滤波器,可以唯一地恢复原连续信号。
在整个过程中,过滤器的设计是非常重要的,尤其是技术指标的设计。输入信号中的有用频率分量和期望频率分量占据不同的频带,通过合适的选频滤波器对干扰进行滤波,得到纯信号,达到滤波的目的。

[En]

In the whole process, the design of the filter is very important, especially the design of technical indicators. The useful frequency components and the desired frequency components in the input signal occupy different frequency bands, and the interference is filtered by a suitable frequency selection filter to get the pure signal to achieve the purpose of filtering.

分析了原始信号的频谱和噪声信号的频谱,然后根据给定的指标,得到了模拟滤波器的系统函数。

[En]

The spectrum of the original signal and the spectrum of the noise signal are analyzed, and then according to the given index, the system function of the analog filter is obtained.

模块功能与源程序代码

一、对.WAV文件进行时域与频域分析并进行播放

MATLAB语音录入加噪低通滤波去噪

; 二、画出所要加入的噪音信号的时域图形并进行分析并对噪音信号进行播放。此过程是由语音加噪控键控制的

MATLAB语音录入加噪低通滤波去噪

三、语音采集,按键,等待5s,自动保存在’录音.wav’,弹出下列提示框,录音完毕。

MATLAB语音录入加噪低通滤波去噪

; 四、FIR低通滤波器

按下键对有噪音频进行低通去噪,确定滤波通/阻带的起始频率和截止频率(对于低通滤波,只有起始频率的输入频率值才是真实频率值,根据频谱图可以判断)。在选择窗函数、汉明窗和低通滤波器类型后,将产生滤波后的波形和频谱。同时保存相应的时域和频域波形。

[En]

Press the key to perform low-pass denoising of noisy audio to determine the start frequency and cut-off frequency of the filter pass / stopband (for low-pass filtering, only the input frequency value of the start frequency is the real frequency value, which can be judged according to the spectrum diagram). After selecting the window function hamming window and the type of low-pass filter, the filtered waveform and spectrum will be generated. The corresponding waveforms in time domain and frequency domain are saved at the same time.

MATLAB语音录入加噪低通滤波去噪

五、IIR低通滤波

使用巴特沃斯滤波器,巴特沃斯低通滤波器的幅值平方函数定义为:

[En]

Using the Butterworth filter, the amplitude square function of the Butterworth low-pass filter is defined as:

MATLAB语音录入加噪低通滤波去噪

其中C为一常数参数,N为滤波器阶数,λ为归一化低通截止频率

MATLAB语音录入加噪低通滤波去噪

巴特沃斯滤波器设计步骤
巴特沃斯低通滤波器的设计指标

[En]

Design index of Butterworth low-pass filter

Ω p :通带截止频率;
α p : 通带最小衰减,单位dB;
Ω s :阻带开始频率;
α s :阻带最大衰减,单位dB;
计算归一化频率

MATLAB语音录入加噪低通滤波去噪

当 α = 3 d B 时,Ω p = Ω C 为通常意义上的截止频率。
根据设计要求求出阶次N和参数C
其中

MATLAB语音录入加噪低通滤波去噪
MATLAB语音录入加噪低通滤波去噪

注意当αp = 3 dB时 C=1
利用N查表
通过N值查表获得归一化巴特沃斯低通滤波器的系统函数;

MATLAB语音录入加噪低通滤波去噪

转换为所需的滤波器低通滤波器:

[En]

Transform to the desired filter low-pass filter:

这两个按钮用于在时间域和频率域中查看先前经过滤波的波形

[En]

These two buttons to view the previously filtered waveforms in time domain and frequency domain

MATLAB语音录入加噪低通滤波去噪

; 源码链接+文档

https://download.csdn.net/download/a_zxswer/19239820.

Original: https://blog.csdn.net/a_zxswer/article/details/117403927
Author: HH予
Title: MATLAB语音录入加噪低通滤波去噪

原创文章受到原创版权保护。转载请注明出处:https://www.johngo689.com/512930/

转载文章受原作者版权保护。转载请注明原作者出处!

(0)

大家都在看

亲爱的 Coder【最近整理,可免费获取】👉 最新必读书单  | 👏 面试题下载  | 🌎 免费的AI知识星球