Package Details: noise-suppression-for-voice 0.91-1

Git Clone URL: https://aur.archlinux.org/noise-suppression-for-voice.git (read-only, click to copy)
Package Base: noise-suppression-for-voice
Description: A real-time noise suppression plugin for voice
Upstream URL: https://github.com/werman/noise-suppression-for-voice
Licenses: GPL3
Submitter: WorMzy
Maintainer: WorMzy
Last Packager: WorMzy
Votes: 19
Popularity: 1.92
First Submitted: 2020-06-29 22:45
Last Updated: 2021-01-03 00:17

Latest Comments

solonovamax commented on 2021-03-22 01:13

A while ago I changed my /etc/makepkg.conf to include CFLAGS="-march=native -ftree-vectorize -O2 -Ofast -mtune=generic -pipe -fno-plt" and CXXFLAGS="-march=native -ftree-vectorize -O2 -Ofast -mtune=generic -pipe -fno-plt" because I read like 2 wiki pages and said it might make things faster (idk, I read big words and trust them), it seems that was the issue. If I added those flags in the clean chroot, I could reproduce it. It turns out the flag that was breaking it was -Ofast, which was enabling -ffast-math. I just added

@@ -21,0 +22 @@
+  CFLAGS+=" -fno-fast-math"

to the PKGBUILD, which fixed the issue. Since this explicitly depends on fast math being disabled, you think you could add that for safety?

Also, I couldn't get it to work with -DFLOAT_APPROX=1 or -DOPUS_FLOAT_APPROX=1 (which I found with some searching.)

WorMzy commented on 2021-03-21 20:57

I can't reproduce that. Try building in a clean chroot. Alternatively try adding -DFLOAT_APPROX=1 to the cmake args.

solonovamax commented on 2021-03-21 19:10

Issues with build:

In file included from /home/solonovamax/.cache/yay/noise-suppression-for-voice/src/noise-suppression-for-voice-0.91/src/rnnoise/include/rnnoise/celt_lpc.h:31,
                 from /home/solonovamax/.cache/yay/noise-suppression-for-voice/src/noise-suppression-for-voice-0.91/src/rnnoise/src/celt_lpc.c:32:
/home/solonovamax/.cache/yay/noise-suppression-for-voice/src/noise-suppression-for-voice-0.91/src/rnnoise/include/rnnoise/arch.h:171:2: error: #error Cannot build libopus with -ffast-math unless FLOAT_APPROX is defined. This could result in crashes on extreme (e.g. NaN) input
  171 | #error Cannot build libopus with -ffast-math unless FLOAT_APPROX is defined. This could result in crashes on extreme (e.g. NaN) input
      |  ^~~~~
make[2]: *** [src/rnnoise/CMakeFiles/RnNoise.dir/build.make:82: src/rnnoise/CMakeFiles/RnNoise.dir/src/celt_lpc.c.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /home/solonovamax/.cache/yay/noise-suppression-for-voice/src/noise-suppression-for-voice-0.91/src/rnnoise/include/rnnoise/pitch.h:39,
                 from /home/solonovamax/.cache/yay/noise-suppression-for-voice/src/noise-suppression-for-voice-0.91/src/rnnoise/src/pitch.c:38:
/home/solonovamax/.cache/yay/noise-suppression-for-voice/src/noise-suppression-for-voice-0.91/src/rnnoise/include/rnnoise/arch.h:171:2: error: #error Cannot build libopus with -ffast-math unless FLOAT_APPROX is defined. This could result in crashes on extreme (e.g. NaN) input
  171 | #error Cannot build libopus with -ffast-math unless FLOAT_APPROX is defined. This could result in crashes on extreme (e.g. NaN) input
      |  ^~~~~
make[2]: *** [src/rnnoise/CMakeFiles/RnNoise.dir/build.make:121: src/rnnoise/CMakeFiles/RnNoise.dir/src/pitch.c.o] Error 1
In file included from /home/solonovamax/.cache/yay/noise-suppression-for-voice/src/noise-suppression-for-voice-0.91/src/rnnoise/src/rnn.c:3 :
/home/solonovamax/.cache/yay/noise-suppression-for-voice/src/noise-suppression-for-voice-0.91/src/rnnoise/include/rnnoise/arch.h:171:2: error: #error Cannot build libopus with -ffast-math unless FLOAT_APPROX is defined. This could result in crashes on extreme (e.g. NaN) input
  171 | #error Cannot build libopus with -ffast-math unless FLOAT_APPROX is defined. This could result in crashes on extreme (e.g. NaN) input
      |  ^~~~~
make[2]: *** [src/rnnoise/CMakeFiles/RnNoise.dir/build.make:134: src/rnnoise/CMakeFiles/RnNoise.dir/src/rnn.c.o] Error 1
In file included from /home/solonovamax/.cache/yay/noise-suppression-for-voice/src/noise-suppression-for-voice-0.91/src/rnnoise/include/rnnoise/kiss_fft.h:34,
                 from /home/solonovamax/.cache/yay/noise-suppression-for-voice/src/noise-suppression-for-voice-0.91/src/rnnoise/include/rnnoise/_kiss_fft_guts.h:36,
                 from /home/solonovamax/.cache/yay/noise-suppression-for-voice/src/noise-suppression-for-voice-0.91/src/rnnoise/src/kiss_fft.c:38:
/home/solonovamax/.cache/yay/noise-suppression-for-voice/src/noise-suppression-for-voice-0.91/src/rnnoise/include/rnnoise/arch.h:171:2: error: #error Cannot build libopus with -ffast-math unless FLOAT_APPROX is defined. This could result in crashes on extreme (e.g. NaN) input
  171 | #error Cannot build libopus with -ffast-math unless FLOAT_APPROX is defined. This could result in crashes on extreme (e.g. NaN) input
      |  ^~~~~
In file included from /home/solonovamax/.cache/yay/noise-suppression-for-voice/src/noise-suppression-for-voice-0.91/src/rnnoise/include/rnnoise/kiss_fft.h:34,
                 from /home/solonovamax/.cache/yay/noise-suppression-for-voice/src/noise-suppression-for-voice-0.91/src/rnnoise/src/denoise.c:38:
/home/solonovamax/.cache/yay/noise-suppression-for-voice/src/noise-suppression-for-voice-0.91/src/rnnoise/include/rnnoise/arch.h:171:2: error: #error Cannot build libopus with -ffast-math unless FLOAT_APPROX is defined. This could result in crashes on extreme (e.g. NaN) input
  171 | #error Cannot build libopus with -ffast-math unless FLOAT_APPROX is defined. This could result in crashes on extreme (e.g. NaN) input
      |  ^~~~~
make[2]: *** [src/rnnoise/CMakeFiles/RnNoise.dir/build.make:108: src/rnnoise/CMakeFiles/RnNoise.dir/src/kiss_fft.c.o] Error 1
make[2]: *** [src/rnnoise/CMakeFiles/RnNoise.dir/build.make:95: src/rnnoise/CMakeFiles/RnNoise.dir/src/denoise.c.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:197: src/rnnoise/CMakeFiles/RnNoise.dir/all] Error 2
make: *** [Makefile:149: all] Error 2
==> ERROR: A failure occurred in build().
    Aborting...
removing untracked AUR files from cache...
:: Cleaning (4/4): /home/solonovamax/.cache/yay/noise-suppression-for-voice
Removing noise-suppression-for-voice-0.91.tar.gz
error making: noise-suppression-for-voice

I have no clue how c++ compilation works (because I normally work in java. Also because I stupid.), but attempting to add -fno-fast-math and -DCOMPILE_FLAGS="-fno-fast-math" to the cmake command didn't work.

WorMzy commented on 2021-01-03 00:17

See https://wiki.archlinux.org/index.php/CMake_package_guidelines#CMake_undesired_behaviors

Thanks for the heads up about the obsolete patch file, I've removed it.

inv3rse commented on 2021-01-02 23:35

Thanks for creating this package.

Is there a reason to use -DCMAKE_BUILD_TYPE=None instead of -DCMAKE_BUILD_TYPE=Release? I would expect a more optimized version with the latter.

And the headers.patch file seems to be a left over from the version before that can be removed from the source archive.