vosk-api icon indicating copy to clipboard operation
vosk-api copied to clipboard

mac build

Open aeirya opened this issue 2 years ago • 4 comments

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).

aeirya avatar Sep 03 '21 11:09 aeirya

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.

Lexstok avatar Sep 03 '21 13:09 Lexstok

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?

justmark0 avatar Oct 24 '21 01:10 justmark0

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> .

uuid0 avatar Apr 19 '22 07:04 uuid0

FYI, just published M1 (arm64) docker images:

sskorol avatar Apr 22 '22 08:04 sskorol