xiph / rnnoise

Recurrent neural network for audio noise reduction
BSD 3-Clause "New" or "Revised" License
4.09k stars 896 forks source link

why training.f32's size is 43550089 ? it should be 43500000! #95

Open NileZhou opened 5 years ago

NileZhou commented 5 years ago

./denoise_training signal.raw noise.raw 500000 > training.f32

rowenbuzz commented 4 years ago

Need an answer to this as well.

rowenbuzz commented 4 years ago

Hey @NileZhou a co-worker found this post: https://stackoverflow.com/questions/1586421/why-is-fwrite-writing-more-than-i-tell-it-to

So, changing 'w' to 'wb' got this to work for us on Windows 10 when we were trying to use the forked repo: https://github.com/jagger2048/rnnoise-windows/

We had the exact same issue but with a slightly different number from yours (43591195). Which for anyone else reading this, caused numpy to not work when reshape is called.

I'm not sure where the issue is here in the original repo, but it was in denoise.c for us in the rnnoise-windows repo in the second link above. Perhaps using the same fopen where the parameter is "r" it should be "rb"?

More Info: https://stackoverflow.com/questions/43777913/the-difference-in-file-access-mode-w-and-wb

Are you on Windows as well..?