vosk-api
vosk-api copied to clipboard
mac build
i was wondering if you could help me build from source on my mac.
i tried building python module, running it requires me to have compiled libvosk.dyld
.
i see docker files for linux and windows but not for mac.
i found others' efforts of doing the same task (#88) and i hoped it's got more straightforward since then.
also wanted to note the latest version of vosk-api hasn't been built for mac yet (#680).
I managed to get it run (not compiled from source) after following the instructions on this page: https://medium.com/@wagnernoise/installing-pyaudio-on-macos-9a5557176c4d (I use python3)
However, pip blocked on installing pyaudio - I had to remove and reinstall the latest xcode command line tools for it to work. Oh and I needed to pip install sounddevice as well for the tests to run.
I am using M1.
I had installed vosk==0.3.31 🥳 (latest version) on python version Python 3.6.8, Python 3.7.9, (and not for Python 3.8.10). And could not install any in docker 😭 when using M1. The same docker-compose.yml
I've tried to install in ubuntu 20.04 and it worked for me.
What can be the issue? Is there any way to run docker with vosk in M1?
The CPU architecture of the M1 processor is aarch64/arm64, which is currently not supported by vosk (see above and especially here https://github.com/alphacep/vosk-api/issues/692).
The CPU architecture of your docker image is the same as the one of the host by default, but you can build an x86_64 docker image using buildx :
docker buildx build --platform linux/amd64 --load -t <your image>:<your tag> .