daanzu / kaldi-active-grammar

Python Kaldi speech recognition with grammars that can be set active/inactive dynamically at decode-time
GNU Affero General Public License v3.0
332 stars 49 forks source link

unable to install on Mac OS 12.3.1 #69

Open droundy opened 2 years ago

droundy commented 2 years ago

I am unable to install kaldi-active-grammar on macOS Monterey version 12.3.1.

My Python is 3.8.9, and pip install kaldi-active-grammar fails with an error message "No matching distribution found for kaldi-active-grammar".

When I download the release wheel for macOS, I am told that it is not a supported wheel on this platform.

Any suggestions? Or do you just need to build another wheel? I notice the download is labeled macos_10_9 so maybe it's for too old a macOS?

droundy commented 2 years ago

Looks like the issue may be that I have an m1 Mac with an arm cpu?

denvaar commented 1 year ago

I'm also seeing this problem. M1 Mac as well.

denvaar commented 1 year ago

@droundy have you found a way around it? I've been trying to build from source, but running into a lot of issues.

droundy commented 1 year ago

No, I have not.

denvaar commented 1 year ago

@droundy after a lot of tweaking and trial and error I was finally able to build from source and create a wheel that I can use with Dragonfly. I can try to come up with some instructions if you're interested, though it may be pretty hacky.

bogdan0083 commented 1 year ago

@denvaar Hi there! I would be happy if you could provide some kind of instruction for building this project on Macbook M1.

I've been trying to build the project wheel for a few days to no avail, your instructions would help a lot.

Thank you! ❤️

bogdan0083 commented 1 year ago

I finally managed to build kaldi-active-grammar on Mac M1. Here's PR: https://github.com/daanzu/kaldi-active-grammar/pull/75. It's not merged yet but you can already try to clone that branch from my fork, remove SOURCE_DIR, BUILD_DIR, DOWNLOAD_DIR and add the following changes to the file CMakeLists.txt:

Снимок экрана 2023-01-28 в 15 18 56

This temporary fix will use my kaldi fork instead of David's. Then use can use

python setup.py bdist_wheel

and the wheel will be installed in the dist folder. Now you can install the built .whl file as a pip package.

In case you're stuck or something is not working you can ask a question here, I'd be happy to help.