Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

file generated unreadable #214

Open
victorrosi opened this issue Mar 31, 2023 · 3 comments
Open

file generated unreadable #214

victorrosi opened this issue Mar 31, 2023 · 3 comments

Comments

@victorrosi
Copy link

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 :)))

@grazder
Copy link

grazder commented May 30, 2023

Same problem

@ericlaycock
Copy link

ericlaycock commented Jun 15, 2023

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.

@Pawandeep-prog
Copy link

actually input is expected to be PCM
and output is also PCM

you can use ffmpeg to convert your audio file into pcm file and output file from pcm into mp3/ wav file

input conversion : ffmpeg -i ./sample-ac 1 -ar 48000 -f s16le -acodec pcm_s16le pcm-sample.pcm
output conversion: ffmpeg -f s16le -ar 44100 -i ./pcm-sample-denoised.pcm output.mp3

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants