FaNT工具使用:合成帶噪聲音信號

FaNT - Filtering and Noise Adding Tool

(用於Aurora-2和Aurora-4加噪信號的生成)
官網鏈接:link
Github鏈接:link

FaNT的功能和特性
  • 提供基於四種頻率特性的信號濾波:G.712, IRS, MIRS, P.341
  • 根據指定信噪比將噪聲疊加到聲音信號上
  • 可處理8KHz和16KHz的信號,輸入輸出信號格式均爲.raw
FaNT的使用方法
xxxx@xxxx:~$ ./filter_add_noise -h
Usage:	./filter_add_noise [Options]

Options:
	-i	<filename> containing a list of speech files
	-o	<filename> containing a list of output speech files
	-n	<filename> referencing a noise file
		(NOT giving a noise file means NO noise adding)
	-u	to indicate and enable processing of 16 kHz data
		(Note: Only P.341 filtering can be applied in case of 16 kHz data!)
	-m	<mode> for estimating S and N
		(possible modes are: snr_4khz or snr_8khz or a_weight)
		(Note: S and N are estimated from the whole range up to 4 or up to 8 kHz
		       or after applying an A-weighting filter)
		(NOT defining the mode means S and N are estimated after G.712 filtering)
	-d	to enable DC offset compensation for calculating S and N
	-f	<type of filter>
		(possible filters are: g712, p341, irs, mirs )
		(NOT applying this option means NO filtering)
	-l	<value> of the desired normalization level
		(NOT applying this option means NO normalization)
	-s	<value> of the desired SNR in dB
	-w	<value> of the desired SNR range
		(defining this values -> SNR randomly chosen between)
		(the value of the -s option and the sum of s+w)
	-r	<value> of the random seed
		(NOT applying this option the seed is calculated from the actual time)
	-e	<filename> of logfile
	-a	<filename> of index list file
  • -r 設置隨機數種子
    一般給定的噪聲信號段長度要長於語音信號段, 這裏的做法是從噪聲信號中隨機截取一段與語音信號等長的信號,再與語音信號疊加,輸出的加噪信號與語音信號段等長
  • -f 設置濾波模式
    對8KHz信號,四種濾波模式均適用;對16KHz信號,僅有P.341適用,其餘均爲通話信道設置。處理16KHz信號時,需加-u標誌
  • -m 設置估計噪聲和語音信號能量時的濾波模式
    默認情況下,在估計噪聲和語音信號能量前,算法會基於G.712對信號進行濾波,實際計算能量的頻率範圍爲300~3400Hz。注意,這裏的濾波僅用於估算信號的能量,與-f設置的濾波模式無關。若要取消這種濾波處理,對8KHz信號可設置**-m snr_4khz**,對16KHz信號可設置**-m snr_8khz**
  • -s -w 設置SNR
    僅設置-s,則SNR爲固定值;同時設置-w,SNR在[s, s+w]範圍內隨機取值
  • -d 設置估計噪聲和語音信號能量時的直流偏置處理處理模式
    如設置-d,在估算噪聲和語音信號能量時,直流偏置(DC offsets)會從信號中移除

對8KHz信號:

./filter_add_noise -i example/in.list -o example/out.list -n example/subway.raw -f g712 -s 10 -r 10 -e fant.log

對16KHz信號:

./filter_add_noise -i example/in.list -o example/out.list -n example/subway.raw -u 16000 -m snr_8khz -s 10 -r 10 -e fant.log
處理.wav文件

可處理.wav文件的對應工具Github鏈接:link
主要函數:addnoise.sh main_addnoise.sh

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章