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