rhasspy / webrtc-noise-gain

Tiny wrapper around webrtc-audio-processing for noise suppression/auto gain only
MIT License
15 stars 18 forks source link

Unable to install (compile) on AMD 64 #17

Open ferdyvi opened 7 months ago

ferdyvi commented 7 months ago

Trying to install homeassistant 2024.2.x, pip3.12 module is not able to complete the installation while it compiles (since wheel package for python 3.12 is not present). Very long error log, here tail part:

..... /tmp/pip-install-6v52qols/webrtc-noise-gain_387db575794d4cecba1b3abb22efa28c/webrtc-audio-processing/webrtc-audio-processing-1/modules/audio_processing/agc2/adaptive_mode_level_estimator.cc:45:1: error: control reaches end of non-void function [-Werror=return-type] 45 | } | ^ cc1plus: some warnings being treated as errors Traceback (most recent call last): File "/tmp/pip-build-env-yegcho52/overlay/lib/python3.12/site-packages/setuptools/_distutils/unixccompiler.py", line 185, in _compile self.spawn(compiler_so + cc_args + [src, '-o', obj] + extra_postargs) File "/tmp/pip-build-env-yegcho52/overlay/lib/python3.12/site-packages/setuptools/_distutils/ccompiler.py", line 1041, in spawn spawn(cmd, dry_run=self.dry_run, **kwargs) File "/tmp/pip-build-env-yegcho52/overlay/lib/python3.12/site-packages/setuptools/_distutils/spawn.py", line 70, in spawn raise DistutilsExecError( setuptools._distutils.errors.DistutilsExecError: command '/usr/bin/gcc' failed with exit code 1

ferdyvi commented 7 months ago

Workaround: add ["-w"] to extra_compile_args in setup.py

dewitte-77 commented 6 months ago

Workaround with the additional compiler parameter "-w" also worked for me on Opensuse Tumbleweed on intel N100 some more steps to make it easier for other users

  1. download the package pip download webrtc-noise-gain
  2. unpack tar -xvzf webrtc_noise_gain-1.2.3.tar.gz
  3. enter folder cd webrtc_noise_gain-1.2.3
  4. open setup.py and add the parameter "-w" to the common_cflags section common_cflags = [ "-DWEBRTC_LIBRARY_IMPL", "-DWEBRTC_ENABLE_SYMBOL_EXPORT", "-DNDEBUG", "-DWEBRTC_APM_DEBUG_DUMP=0", "-D_GNU_SOURCE", "-w", ]
  5. save the changes and exit
  6. install the package using pip pip install .