Open IngwiePhoenix opened 7 months ago
You're going to have to do two things. One is to add a block to setup.py to switch on risc-v. If it's BE, then you have even more work to do as there seems to be a "all the world is LE" define -- which is obviously not true, but perhaps webrtc-noise-gain has that assumption.
The other thing, which might be hard and might not be, is to make webrtc-noise-gain work on risc-v. I am unclear on status, but have a vague memory that it's not really maintained upstream and is thus vendored here. But don't trust me on that; figure it out :-)
(I'm simply a user here, reading setup.py because this was not portable to BSDs, and hoping to run NetBSD on risc-v some year.)
At least for Gentoo it seems we have now a solution. Andrew created a patch for risc64 for the ebuild:
http://forum.rvspace.org/t/webrtc-noise-gain-for-risc-v/4443/2?u=martin.wozenilek
I've tested this with the VisionFive2-Gentoo-HomeAssistant system and it looks okay.
Here is the patch that you can try
diff '--color=auto' -Naur a/setup.py b/setup.py --- a/setup.py 2024-07-10 20:25:14.667065285 +0100 +++ b/setup.py 2024-07-10 20:24:41.386342397 +0100 @@ -478,6 +478,12 @@ "-DWEBRTC_ARCH_32_BITS", "-DPFFFT_SIMD_DISABLE", ] +elif machine in ("riscv64", "risc"): + # Riscv) + machine_cflags += [ + "-DWEBRTC_ARCH_RISCV", + "-DWEBRTC_ARCH_64_BITS", + ] else: raise ValueError(f"Unsupported machine: {machine}")
Hello there!
So, first off:
I looked at the
setup.py
for a while and took note of which-D
efines and.c/.cc
sources are added to the build. Well, is there a way to help to make RISC-V work?I run a relatively "standard" Debian Unstable (Trixie) so all the default tools are here (gcc, alsa, ffmpeg, ...). Since this seems to be the last package holding back Home Assistant's
assist_pipeline
, I would love to get this sorted. :)Kind regards, Ingwie