xiph/rnnoise

file generated unreadable

victorrosi opened this issue · 3 comments

Hello,

First of all thank you for this great tool that I wish to add to my pipeline for audio dataset preprocessing.

I tried rnnoise few weeks ago on a 45 minutes long audio file (16bit, 48 kHz) and it worked really well in the command line.

However I've bee trying to use it on smaller samples (4-5 seconds) but the file generated is unreadable and while it seems to be identified as a wave audio file, it's impossible to see it's information. I tried it both on google colab and a personal conda environment.

I don't seem to have any error message on installation after typing this:

"""
% git clone https://github.com/xiph/rnnoise.git
% cd rnnoise
% ./autogen.sh
% ./configure
% make
"""

installation seems to be ok:

Screenshot 2023-03-31 at 15 27 04

Thank you for your help :)))

Same problem

Okay, I figured out why this is happening. It's outputting .pcm files into your output directory, even though they may be named as .wav files, they actually are 16bit .pcm files.

Running this command on your "disguised" .pcm folder (the folder holding your 'corrupted' .wav files) should work (you may need to pip install sox or sudo apt-get sox if you don't have it):

rnnoise_output/*; do sox -t raw -b 16 -e signed -c 1 -r 48000 "$file" rnnoise_output_wav/"$(basename "$file" .wav).wav"; done

where rnnoise_output/ is the directory holding your 'corrupted' .wav files, and 'rnnoise_output_wav/' is the directory holding your actual correct .wav files.