rnnoise icon indicating copy to clipboard operation
rnnoise copied to clipboard

windows

Open FIVIL opened this issue 5 years ago • 13 comments

Hi, can we create windows .exe file, or is there any code made for windows??

FIVIL avatar Aug 05 '18 19:08 FIVIL

The code is C90 and should compile fine on Windows

jmvalin avatar Aug 05 '18 21:08 jmvalin

is there windows version?

techsin avatar Nov 15 '18 20:11 techsin

Has anyone had success with running this on Windows 7 or 10 x64?

It works great on Linux, Mac and MSYS2 in Windows when the compiled dll has a dependency on MSYS-2.0.dll.

However, I am unable to get it to run on Windows with no dependencies. On two separate Windows 7 64bit computers, it compiles in Visual Studio 2015 and MSYS2 MingW64 environments and then the example program runs but cuts out before processing the entire file. Upon further inspection with custom code, the vad probability after each call to rnnoise_process_frame is always 0. The same exact code works on Mac, Linux, and MSYS2 when it is dependent on MSYS-2.0.dll.

Please comment on why this might only work on linux variants or confirm/negate/augment my findings.

I noticed this project popped up a couple months ago but it does not appear to be complete. https://github.com/jagger2048/rnnoise-windows , I suspect the project owner was unsuccessful and abandoned the project.

Thanks,

jobeninc avatar Dec 19 '18 22:12 jobeninc

Has anyone had success with running this on Windows 7 or 10 x64?

It works great on Linux, Mac and MSYS2 in Windows when the compiled dll has a dependency on MSYS-2.0.dll.

However, I am unable to get it to run on Windows with no dependencies. On two separate Windows 7 64bit computers, it compiles in Visual Studio 2015 and MSYS2 MingW64 environments and then the example program runs but cuts out before processing the entire file. Upon further inspection with custom code, the vad probability after each call to rnnoise_process_frame is always 0. The same exact code works on Mac, Linux, and MSYS2 when it is dependent on MSYS-2.0.dll.

Please comment on why this might only work on linux variants or confirm/negate/augment my findings.

I noticed this project popped up a couple months ago but it does not appear to be complete. https://github.com/jagger2048/rnnoise-windows , I suspect the project owner was unsuccessful and abandoned the project.

Thanks,

Hi, I recently update the vs2017 project so it can run on win10 x64 platform successfully.

Meanwhile, the rnnoise_process_frame() return 0 maybe is that your input data is not correct. The parameters of the function are S16 format PCM and treat them as float data, not truly F32 format PCM data.

jagger2048 avatar Mar 11 '19 09:03 jagger2048

windows file io has the binary mode and text mode. binary mode is not specified in rnnoise_demo.c. (i have not tested if specifying binary mode fix the bug)

contribu avatar Apr 09 '19 13:04 contribu

I compile on Windows and Linux. However run with same PCM files, get diffierent F32 files

NileZhou avatar Oct 11 '19 04:10 NileZhou

I compile on Windows and Linux. However run with same PCM files, get diffierent F32 files

two F32 have the same size, data Not

NileZhou avatar Oct 11 '19 04:10 NileZhou

Meanwhile, the rnnoise_process_frame() return 0 maybe is that your input data is not correct. The parameters of the function are S16 format PCM and treat them as float data, not truly F32 format PCM data.

Thanks. This is exactly what I was doing wrong. If anyone else runs into this issue. The floats submitted to rnnoise_process_frame() should be values between -32,768 and 32,767 rather than -1 and 1.

jobeninc avatar Nov 05 '19 19:11 jobeninc

Meanwhile, the rnnoise_process_frame() return 0 maybe is that your input data is not correct. The parameters of the function are S16 format PCM and treat them as float data, not truly F32 format PCM data.

Thanks. This is exactly what I was doing wrong. If anyone else runs into this issue. The floats submitted to rnnoise_process_frame() should be values between -32,768 and 32,767 rather than -1 and 1.

I am trying to run this on real time microphone stream in a plugin. Do we have to convert the samples(float32 by default) to short int and then load it to float type array? Direct conversions are giving distorted output. Any leads will be great in this regard. Thanks

raikarsagar avatar Jun 04 '20 14:06 raikarsagar

Meanwhile, the rnnoise_process_frame() return 0 maybe is that your input data is not correct. The parameters of the function are S16 format PCM and treat them as float data, not truly F32 format PCM data.

Thanks. This is exactly what I was doing wrong. If anyone else runs into this issue. The floats submitted to rnnoise_process_frame() should be values between -32,768 and 32,767 rather than -1 and 1.

I am trying to run this on real-time microphone stream in a plugin. Do we have to convert the samples(float32 by default) to short int and then load it to float type array? Direct conversions are giving distorted output. Any leads will be great in this regard. Thanks

No, you can simply convert the f32 PCM sample to target RNNoise data format,i.e. data_to_proc = f32 * 32768.0f, not the short int. For more details, you can reference the following link B&R Jagger

jagger2048 avatar Jun 08 '20 04:06 jagger2048

Meanwhile, the rnnoise_process_frame() return 0 maybe is that your input data is not correct. The parameters of the function are S16 format PCM and treat them as float data, not truly F32 format PCM data.

Thanks. This is exactly what I was doing wrong. If anyone else runs into this issue. The floats submitted to rnnoise_process_frame() should be values between -32,768 and 32,767 rather than -1 and 1.

I am trying to run this on real-time microphone stream in a plugin. Do we have to convert the samples(float32 by default) to short int and then load it to float type array? Direct conversions are giving distorted output. Any leads will be great in this regard. Thanks

No, you can simply convert the f32 PCM sample to target RNNoise data format,i.e. data_to_proc = f32 * 32768.0f, not the short int. For more details, you can reference the following link B&R Jagger

Thanks for the suggestion. This seems to be not resolving issue. The input audio samples are converted to [-32768,32767] from [-1,1] but the output samples are having too small in magnitude. (FYI: I am using JUCE framework for this plugin)

raikarsagar avatar Jun 09 '20 18:06 raikarsagar

Meanwhile, the rnnoise_process_frame() return 0 maybe is that your input data is not correct. The parameters of the function are S16 format PCM and treat them as float data, not truly F32 format PCM data.

Thanks. This is exactly what I was doing wrong. If anyone else runs into this issue. The floats submitted to rnnoise_process_frame() should be values between -32,768 and 32,767 rather than -1 and 1.

I am trying to run this on real-time microphone stream in a plugin. Do we have to convert the samples(float32 by default) to short int and then load it to float type array? Direct conversions are giving distorted output. Any leads will be great in this regard. Thanks

No, you can simply convert the f32 PCM sample to target RNNoise data format,i.e. data_to_proc = f32 * 32768.0f, not the short int. For more details, you can reference the following link B&R Jagger

Thanks for the suggestion. This seems to be not resolving issue. The input audio samples are converted to [-32768,32767] from [-1,1] but the output samples are having too small in magnitude. (FYI: I am using JUCE framework for this plugin)

the output samples are having too small in magnitude

In rnnoise, its output range [ -32768, 32767], you can just convert to [-1, 1], the PCM format. For the magnitude, maybe you need to add an AGC model after applying noise suppression.

jagger2048 avatar Jun 10 '20 02:06 jagger2048

windows file io has the binary mode and text mode. binary mode is not specified in rnnoise_demo.c. (i have not tested if specifying binary mode fix the bug)

Solved in #130

wegylexy avatar Jun 29 '20 00:06 wegylexy