nomonosound / fast-align-audio

A fast python library for aligning similar audio snippets passed in as NumPy arrays
ISC License
40 stars 1 forks source link

Mac M2 Compatibility #13

Open crlandsc opened 1 month ago

crlandsc commented 1 month ago

Would it be an easy update to release a version for Mac? pip installing says it's only compatible with x86/x64 architectures. Thanks!

iver56 commented 1 month ago

Thanks for the request! The current C code was written (by @jonashaag) with SIMD instructions that are specific to the x86-64 CPU architecture. Adding a scalar implementation and/or NEON implementation for ARM compatibility is certainly feasible. Once that is in place, it's mostly a matter of updating the Github Actions config file, so it builds for MacOS ARM.

I currently cannot make any promises on when or if I will make this happen. If you want to give it a stab yourself, here are some examples of changes that are similar to what would need to be done in fast-align-audio:

https://github.com/nomonosound/numpy-rms/pull/4/files https://github.com/nomonosound/numpy-rms/pull/5/files https://github.com/nomonosound/numpy-rms/pull/7/files

jonashaag commented 1 month ago

It should be relatively easy to switch to a library like https://github.com/google/highway

crlandsc commented 1 month ago

Thanks for the info! I'm also not sure if I have the capacity to get to this right now as it's not critical to what I'm working on. I was just hoping to find something that could efficiently time align signals when a dry signal is mixed with itself that was convolved with an IR. If the IR creates a delay, it would be nice to be able to account for this without adding much overhead.

iver56 commented 1 month ago

That is indeed the use case Jonas had in mind when he originally made this