步骤1)
〜/ rnnoise / wavutils / bin中/ wav2pcm speech_only.wav speech_only.pcm
〜/ rnnoise / wavutils / bin中/ wav2pcm noise_only.wav noise_only.pcm
〜/ rnnoise / wavutils / bin中/ wav2pcm speech_noise.wav speech_noise.pcm
步骤2)〜/ rnnoise / src / denoise_training speech_only.pcm noise_only.pcm 500000 > training.f32
* 注意步骤2,不要修改denoise.c里面的count,stdout也不用改成fout
* 注意步骤3,一定要切换到training目录下执行,这样denoise_data.h5才会在training目录下,我试过在 其他目录下执行第四步〜/ rnnoise / training / rnn_train.py -> denoise_data9.h5-> newweights9i.hdf5 是会报错的,报错如下:
OSError: Unable to open file (unable to open file: name = 'training.h5', errno = 2, error messa
步骤3)cd training ; ./bin2hdf5.py …/src/training.f32 50000000 87 training.h5
步骤4)〜/ rnnoise / training / rnn_train.py
步骤5)./dump_rnn.py weights.hdf5 rnn_data.c rnn_data.h orig
注意把生成的rnn_data.c文件放到src文件下在make.
步骤6)make clean
步骤7)〜/ rnnoise / examples / rnnoise_demo speech_noise.pcm denoised_speech_noise.pcm
步骤7) pcm2wav 1 48000 16 noise_only.pcm noise_only.wav