coqui-ai / STT

🐸STT - The deep learning toolkit for Speech-to-Text. Training and deploying STT models has never been so easy.
https://coqui.ai
Mozilla Public License 2.0
2.27k stars 275 forks source link

Add support to ARM macOS node bindings #2353

Open dsouza95 opened 1 year ago

dsouza95 commented 1 year ago

This draft PR enables ARM (M1/M2) builds for the macOS nodejs bindings and the underlying libraries (other bindings still only support x64, but it should be easier to add ARM suport for them now).

One important consideration: Github does not yet include ARM-based macOS runners, so the build CI needs a self-hosted runner for now. I am not really sure how to go about that, specially now that the project is no longer being maintaned, but it should be possible to use one's personal M1 Mac as a runner. Perhaps this PR should wait for Github ARM macOS runners to available before merging.

reuben commented 1 year ago

It should be possible to build from a x64 host to an ARM target, this is what we currently do in order to build libstt for Apple Silicon. That said, since adding CI that doesn't run won't affect anything in the project, I'm not opposed to merging this once it's ready.

dsouza95 commented 1 year ago

Oh, I had noticed that you were building from a x64 host to an ARM target, but when I tried to do so for the node bindings, it would make x64 instructions regardless. I figured it was because of that and proceeded to use the self-hosted ARM, but it should be way better to use x64 for now. I will try to do so then, as github actions won't skip the job if the self-hosted os is not available, but rather wait indefinately for someone to pick the job up.

hendryman commented 1 year ago

+1 to get this running. It would simply be awesome!

What does "building a self-hosted runner" mean?

dsouza95 commented 1 year ago

@hendryman, building with a self-hosted runner means that the build workflow that would normally run on servers hosted by github, would instead run on a server (or even a personal computer) provided by someone else.

hendryman commented 1 year ago

I guess I would need instructions to achieve that : ) Thanks so much for putting the effort into making your solution available for the rest of us!