史榮珍+王懷登+袁杰
摘 要: 為了分析語音去噪的效果,首先介紹了小波變換和分解的相關(guān)理論知識,然后對Daubechies小波、Symmlets小波、Coiflets小波和Haar小波特性做了比較分析。最后選取一段添加了高斯白噪聲的實(shí)際語音信號,選取heursure啟發(fā)式閾值,利用Matlab軟件分別對各種小波基下的去噪效果進(jìn)行仿真實(shí)驗(yàn)。并通過計(jì)算去噪前后的信噪比(SNR)和最小均方差(MSE)的值,分析比較各種小波基函數(shù)的去噪效果,并得出最優(yōu)小波基函數(shù)。
關(guān)鍵詞: 小波分析; 去噪; 閾值函數(shù); 信噪比; 最小均方誤差
中圖分類號: TN912.3?34; TP391.9 文獻(xiàn)標(biāo)識碼: A 文章編號: 1004?373X(2014)03?0049?03
Research on speech signal denoising in different wavelet basis function
SHI Rong?zhen1, WANG Huai?deng1, YUAN Jie2
(1. School of Information Science and Engineering, Nanjing University Jinling College, Nanjing 210089, China;
2. School of Electronic Science and Engineering, Nanjing University, Nanjing 210093, China)
Abstract: In order to analyze the effect of speech de?noising, the relevant theoretical knowledge of the wavelet transform and decomposition are introduced, and then the features of Daubechies wavelet, Symmlets wavelet, Coiflets wavelet and Haar wavelet are compared and analyzed. A section of real speech signals added with Gaussian white noise is chosen, and the simulation experiment of the denoising effect in different wavelet basis is conducted in Matlab with heursure threshold. Through calculating the signal to noise ratio (SNR) and minimum mean square error (MSE) before and after denoising, and the performance of various wavelet basis functions are analyzed and compared, and the optimal wavelet function is obtained.
Keywords: wavelet analysis; de?noising; threshold function; SNR; MSE
0 前 言
傳統(tǒng)信號去噪方法是將含噪聲的信號進(jìn)行傅里葉變換后,通過濾波器進(jìn)行濾波以達(dá)到去噪的目的。該方法對于平穩(wěn)信號濾波效果較好。而對于非平穩(wěn)信號以及信號和噪聲頻帶重疊的信號,去噪效果較差。而語音信號是一種常見的非平穩(wěn)信號,故傳統(tǒng)濾波方法去噪效果較不理想。語音信號是低頻信號,可以通過小波變換使信號的能量在小波變換域集中于少數(shù)小波系數(shù)上。而噪聲通常表現(xiàn)為高頻信號,其能量分布于大量小波系數(shù)上。即意味著語音信號的小波系數(shù)值通常高于噪聲的小波系數(shù)值。在這一領(lǐng)域,目前也已提出了自適應(yīng)濾波、語音識別和閾值去噪等眾多方法[1?4],其中Donoho等人提出的小波軟、硬閾值去噪法獲得國內(nèi)外學(xué)者的廣泛關(guān)注[5]。
1 小波變換
小波變換是時(shí)頻信號分析最有效的工具之一。實(shí)際上,小波就是由同一母函數(shù)經(jīng)伸縮和平移后得到的一組函數(shù)系列。令其平移伸縮后的函數(shù)為[ψa,τ(t)],則有:
[ψa,τ(t)=1aψt-τa, a>0,τ∈R] (1)
稱[ψa,τ(t)]為依賴于[a,][τ]的小波母函數(shù)。[a]為伸縮參數(shù),[τ]為位移參數(shù)。因伸縮參數(shù)[a]和位移參數(shù)[τ]都是連續(xù)變化的值,所以[ψa,τ(t)]是連續(xù)小波。若應(yīng)用到離散信號中,則需將伸縮參數(shù)和位移參數(shù)離散化。常用的離散化方法為:
[a=a0m, τ=ka0mτ0] (2)
式中:[m]是尺度因子,[k]是位移因子,[m]和[k]均為整數(shù);[τ0]為[m=0]時(shí)的均勻采樣間隔。在實(shí)際工作中,最常用的小波是二進(jìn)小波。兩參數(shù)選取為:
[a0=2, τ0=1]
二進(jìn)小波變換可表示為:
[ψm,k(t)=2-m/2ψ(2-mt-k)] (3)
設(shè)[ψ(t)∈L2(R),]其傅里葉變換為[ψ(ω),]如果滿足[-∞+∞ψ(ω)2ωdω<+∞]的容許條件,如果其二進(jìn)伸縮和平移得到的小波基函數(shù)[ψm,k(t),]即構(gòu)成了[L2(R)]的規(guī)范正交基,則稱[ψ(t)]為正交小波,稱[ψm,k(t)]為正交小波基函數(shù)[6]。
2 小波分解理論
多尺度小波分析基本思想是把信號投影到一組正交的小波函數(shù)構(gòu)成的子空間上,形成信號在不同尺度上的展開,從而獲得信號在不同頻帶的特征,同時(shí)保留信號在各尺度上的時(shí)域特征。任意信號均可通過小波變換分解為細(xì)節(jié)部分和大尺度逼近部分。細(xì)節(jié)部分表示信號的高頻特征,反映其細(xì)微變化;而大尺度逼近部分則包含信號的低頻信息。因此,小波變換又被稱為數(shù)學(xué)顯微鏡。多尺度分解可表示如下:
[V0=Vj⊕Wj=V2⊕W2⊕W1=V3⊕W3⊕W2⊕W1=…]
其中[V0]是由尺度函數(shù)張成的零尺度空間;[Vj]是尺度為[j]的尺度空間,代表分解中的低頻部分;[Wj]則是尺度為[j]的小波空間,表示高頻部分。任意信號[f(t)][(f(t)∈V0)]分別向尺度空間和小波空間投影可得大尺度逼近部分[V1]和細(xì)節(jié)部分[W1,]然后將大尺度逼近部分[V1]再進(jìn)一步分解,如此反復(fù)就可得任意尺度上的逼近部分和細(xì)節(jié)部分。
小波基函數(shù)的應(yīng)用是充分發(fā)揮其用很少的非零小波系數(shù)去有效逼近特殊函數(shù)類的能力。小波函數(shù)[ψ(t)]的設(shè)計(jì)必須被最優(yōu)化以產(chǎn)生盡可能多的小幅值小波系數(shù)。這性質(zhì)主要依賴于信號的正則性、小波的消失矩階數(shù)及其支撐集的大小。常見的緊支撐的正交小波有Daubechies小波、Symmlets小波、Coiflets小波和Haar小波。L階Symmlets小波具有L階消失矩,而L階Coiflets小波具有2L階消失矩。Coiflets小波的消失矩階數(shù)越高,用信號的采樣值逼近多分辨率分析中的離散逼近信號的誤差越小。Daubechies小波只考慮了小波函數(shù)獲得最大消失矩,而未考慮尺度函數(shù)的消失矩。與Coiflets小波相比,在同樣的小波消失矩時(shí),Coiflets小波相關(guān)聯(lián)的濾波器具有更長的長度,而且其尺度函數(shù)具有較高的消失矩。Haar小波具有對稱性的緊支撐正交小波,且僅有一階消失距。相比而言,Coiflets小波的正交性、消失矩和對稱性均比較好。在實(shí)際應(yīng)用中,正交性、對稱性和消失矩等小波特性均對去噪效果有所影響。本文選取以上幾種正交小波分別進(jìn)行語音去噪,并比較其效果。
3 閾值去噪的基本原理
閾值去噪是較常見的一種基于小波理論的去噪方法,國內(nèi)外學(xué)者對該方法深入擴(kuò)展,研究深入,也取得了很多成果[7?16]。閾值去噪的原理就是首先選取合適的小波函數(shù),然后對含噪語音信號進(jìn)行小波變換,設(shè)定一個(gè)閾值,將低于這個(gè)閾值的小波系數(shù)置為零,高于這個(gè)閾值的小波系數(shù)保留,從而去除噪聲,并保留有用信息。最優(yōu)小波基函數(shù)的選擇是小波語音去噪算法中一個(gè)關(guān)鍵的環(huán)節(jié)。當(dāng)然用于小波變換的基小波選擇也不是惟一的,需要根據(jù)具體染噪信號的情況來選擇合適的小波函數(shù)進(jìn)行變換。去噪過程框圖如圖1所示。
圖1 小波閾值去噪框圖
4 語音信號去噪實(shí)驗(yàn)分析
實(shí)驗(yàn)選用一段用計(jì)算機(jī)錄制的實(shí)際環(huán)境下的語音信號進(jìn)行去噪實(shí)驗(yàn),噪聲選用較常見的正態(tài)高斯白噪聲,首先對原始語音信號進(jìn)行加噪處理,隨后采用軟閾值函數(shù),對染噪信號進(jìn)行小波閾值去噪處理。實(shí)驗(yàn)中根據(jù)各個(gè)小波函數(shù)的特點(diǎn)選用sym8、coif4、db3和haar小波函數(shù)作為去噪的小波基函數(shù),最大分解尺度取3層,并選用了Matlab自帶的基于heursure的啟發(fā)式閾值。各小波基函數(shù)下軟閾值去噪后的波形如圖2所示。
信號的信噪比(SNR)和最小均方差(MSE)是評價(jià)去噪性能的常用參數(shù)。相同情況下,SNR越大,表明信號的噪聲干擾越小,去噪效果越好。MSE越小,表示信號越接近原始真實(shí)信號。由圖2可看出,heursure軟閾值去噪對引入的白噪聲大大衰減,采用不同的小波函數(shù),去噪的效果也不相同,去噪前后的各項(xiàng)性能指標(biāo)見表1。
表1 去噪前后的各項(xiàng)性能指標(biāo)
[性能指標(biāo)\&染噪信號\&sym8去噪\&coif4去噪\&db3去噪\&haar去噪\&SNR\&10.000 0\&15.699 7\&15.733 6\&14.446 2\&11.017 5\&MSE(×10-4)\&0.278 7\&0.075 0\&0.074 4\&0.100 1\&0.220 5\&]
從表1中的數(shù)據(jù)也可看出采用不同的小波基函數(shù),去噪后的SNR和MSE也不相同,sym8、coif4、db3和haar幾種正交小波基中coif4小波去噪后的信噪比最高,最小均方差最小,故其去噪效果最優(yōu),這和Coiflets小波的正則性,較高的消失矩和接近對稱等特性具有一定關(guān)系。
5 結(jié) 語
本文首先介紹了小波變換及小波分解的相關(guān)理論知識,并分析了常見的4種小波的特性,然后采用Matlab自帶的基于heursure的啟發(fā)式閾值,選取不同的小波基函數(shù),對染噪語音信號做去噪實(shí)驗(yàn),并分別計(jì)算去噪前后的SNR和MSE的值,得出較優(yōu)的小波基函數(shù)。小波的正則性,消失矩及對稱性對去噪效果的影響,以后將對此做更深一步的研究。
參考文獻(xiàn)
[1] 王彪,李建文,王鐘斐.基于小波分析的新閾值去噪方法[J].計(jì)算機(jī)工程與設(shè)計(jì),2011,32(3):1099?1102.
[2] 馮巖,唐普英.基于Matlab的語音增強(qiáng)系統(tǒng)的設(shè)計(jì)[J].通信技術(shù),2010,43(5):187?191.
[3] 王偉軍,左東廣.一種基于自適應(yīng)濾波的語音降噪方法研究[J].現(xiàn)代電子技術(shù),2012,35(2):84?86.
[4] 袁鵬飛,楊燕翔,廖國軍,等.語音去噪LMS適應(yīng)濾波器算法的改進(jìn)[J].電子設(shè)計(jì)工程,2011,19(1):80?83.
[5] DONOHO D L. De?noising by soft thresholding [J]. IEEE Transactions on Information Theory, 1995, 41(3): 617?627.
[6] 劉濤,曾祥利,曾軍.實(shí)用小波分析入門[M].北京:國防工業(yè)出版社,2006.
[7] XU Y H, WANG G, GU Y, et al. A novel wavelet packet speech enhancement algorithm based on time?frequency threshold [C]// Proceedings of 2007 2nd International Conference on Innovative Computing, Information and Control. Kumamoto, Japan: ICICIC, 2007: 492.
[8] LUN D P, HSUNG T C. Improved wavelet based a?priori SNR estimation for speech enhancement [C]// Proceedings of 2010 IEEE International Symposium on Circuits and Systems. Paris, France: ISCAS, 2010: 2382?2385.
[9] ZOICAN S. Speech de?noising system with non local means algorithm [C]// Proceedings of 2010 9th International Symposium on Electronics and Telecommunications. Timisoara, Romania: ISETC, 2010: 315?318.
[10] WANG K C, CHIN C L, TSAI Y H. A wavelet?based denoising system using time?frequency adaptation for speech enhancement [C]// Proceedings of 2009 International Conference on Asian Language Processing. Singapore: IALP, 2009: 114?117.
[11] SUMITHRA M G, THANUSKODI K. Wavelet based speech signal de?noising using hybrid thresholding [C]// Proceedings of 2009 International Conference on Control, Automation, Communication and Energy Conservation. Tamil Nadu, India: INCACEC, 2009: 1?7.
[12] LEI S F, TUNG Y K. Speech enhancement for nonstationary noises by wavelet packet transform and adaptive noise estimation [C]// Proceedings of 2005 International Symposium on Intelligent Signal Processing and Communication Systems. Hong Kong, China: ISPACS, 2005: 41?44.
[13] 蘇凱,蔣宇中,劉月亮,等.Chirp信號的去噪研究及其Matlab實(shí)現(xiàn)[J].通信技術(shù),2011,44(7):51?53.
[14] MEDINA C A, ALCAIM A, APOLINARIO J A JR. Wavelet denoising of speech using neural networks for [J]. Electronics Letters, 2003, 39(25): 1869?1871.
[15] HYUNG I K, CHO N I. Image denoising based on a statistical model for wavelet coefficients [C]// Proceedings of 2008 International Conference on Acoustics, Speech and Signal Processing. Las Vegas: ICASSP, 2008: 1269?1272.
[16] LUN D P K, SHEN T W, HSUNG T C, et al. Improved speech presence probability estimation based on wavelet denoising [C]// Proceedings of 2012 IEEE International Symposium on Circuits and System. Seoul, Korea (South): ISCAS, 2013: 1018?1021.
[8] LUN D P, HSUNG T C. Improved wavelet based a?priori SNR estimation for speech enhancement [C]// Proceedings of 2010 IEEE International Symposium on Circuits and Systems. Paris, France: ISCAS, 2010: 2382?2385.
[9] ZOICAN S. Speech de?noising system with non local means algorithm [C]// Proceedings of 2010 9th International Symposium on Electronics and Telecommunications. Timisoara, Romania: ISETC, 2010: 315?318.
[10] WANG K C, CHIN C L, TSAI Y H. A wavelet?based denoising system using time?frequency adaptation for speech enhancement [C]// Proceedings of 2009 International Conference on Asian Language Processing. Singapore: IALP, 2009: 114?117.
[11] SUMITHRA M G, THANUSKODI K. Wavelet based speech signal de?noising using hybrid thresholding [C]// Proceedings of 2009 International Conference on Control, Automation, Communication and Energy Conservation. Tamil Nadu, India: INCACEC, 2009: 1?7.
[12] LEI S F, TUNG Y K. Speech enhancement for nonstationary noises by wavelet packet transform and adaptive noise estimation [C]// Proceedings of 2005 International Symposium on Intelligent Signal Processing and Communication Systems. Hong Kong, China: ISPACS, 2005: 41?44.
[13] 蘇凱,蔣宇中,劉月亮,等.Chirp信號的去噪研究及其Matlab實(shí)現(xiàn)[J].通信技術(shù),2011,44(7):51?53.
[14] MEDINA C A, ALCAIM A, APOLINARIO J A JR. Wavelet denoising of speech using neural networks for [J]. Electronics Letters, 2003, 39(25): 1869?1871.
[15] HYUNG I K, CHO N I. Image denoising based on a statistical model for wavelet coefficients [C]// Proceedings of 2008 International Conference on Acoustics, Speech and Signal Processing. Las Vegas: ICASSP, 2008: 1269?1272.
[16] LUN D P K, SHEN T W, HSUNG T C, et al. Improved speech presence probability estimation based on wavelet denoising [C]// Proceedings of 2012 IEEE International Symposium on Circuits and System. Seoul, Korea (South): ISCAS, 2013: 1018?1021.
[8] LUN D P, HSUNG T C. Improved wavelet based a?priori SNR estimation for speech enhancement [C]// Proceedings of 2010 IEEE International Symposium on Circuits and Systems. Paris, France: ISCAS, 2010: 2382?2385.
[9] ZOICAN S. Speech de?noising system with non local means algorithm [C]// Proceedings of 2010 9th International Symposium on Electronics and Telecommunications. Timisoara, Romania: ISETC, 2010: 315?318.
[10] WANG K C, CHIN C L, TSAI Y H. A wavelet?based denoising system using time?frequency adaptation for speech enhancement [C]// Proceedings of 2009 International Conference on Asian Language Processing. Singapore: IALP, 2009: 114?117.
[11] SUMITHRA M G, THANUSKODI K. Wavelet based speech signal de?noising using hybrid thresholding [C]// Proceedings of 2009 International Conference on Control, Automation, Communication and Energy Conservation. Tamil Nadu, India: INCACEC, 2009: 1?7.
[12] LEI S F, TUNG Y K. Speech enhancement for nonstationary noises by wavelet packet transform and adaptive noise estimation [C]// Proceedings of 2005 International Symposium on Intelligent Signal Processing and Communication Systems. Hong Kong, China: ISPACS, 2005: 41?44.
[13] 蘇凱,蔣宇中,劉月亮,等.Chirp信號的去噪研究及其Matlab實(shí)現(xiàn)[J].通信技術(shù),2011,44(7):51?53.
[14] MEDINA C A, ALCAIM A, APOLINARIO J A JR. Wavelet denoising of speech using neural networks for [J]. Electronics Letters, 2003, 39(25): 1869?1871.
[15] HYUNG I K, CHO N I. Image denoising based on a statistical model for wavelet coefficients [C]// Proceedings of 2008 International Conference on Acoustics, Speech and Signal Processing. Las Vegas: ICASSP, 2008: 1269?1272.
[16] LUN D P K, SHEN T W, HSUNG T C, et al. Improved speech presence probability estimation based on wavelet denoising [C]// Proceedings of 2012 IEEE International Symposium on Circuits and System. Seoul, Korea (South): ISCAS, 2013: 1018?1021.