MontrealCorpusTools / Montreal-Forced-Aligner

Command line utility for forced alignment using Kaldi
https://montrealcorpustools.github.io/Montreal-Forced-Aligner/
MIT License
1.33k stars 246 forks source link

Cannot install on macOS 12.0.1 M1 with miniforge #372

Open stefanocoretta opened 2 years ago

stefanocoretta commented 2 years ago

Hi! I tried to install MFA on macOS 12.0.1 M1 with miniforge.

I get the following error:

PackagesNotFoundError: The following packages are not available from current channels:

  - montreal-forced-aligner

Current channels:

  - https://conda.anaconda.org/conda-forge/osx-arm64
  - https://conda.anaconda.org/conda-forge/noarch
  - https://repo.anaconda.com/pkgs/main/osx-arm64
  - https://repo.anaconda.com/pkgs/main/noarch
  - https://repo.anaconda.com/pkgs/free/osx-arm64
  - https://repo.anaconda.com/pkgs/free/noarch
  - https://repo.anaconda.com/pkgs/r/osx-arm64
  - https://repo.anaconda.com/pkgs/r/noarch

I retried using the full anaconda instead of miniforge and that did work (but I would prefer to stick to miniforge).

I am using homebrew, upgraded and packages up to date.

mmcauliffe commented 2 years ago

Ah right, the conda packages aren't currently being built for non-intel platforms. I'll try to enable them and see if I can get them built.

mmcauliffe commented 2 years ago

@stefanocoretta Ok, arm64 packages should be up now if you wouldn't mind testing to see if they work? Or I should take that back, the kaldi ones are up, so you should be able to do:

conda install -c conda-forge kaldi pynini
pip install montreal-forced-aligner

and it should all work. I'll hopefully have the MFA conda package on arm64 for the next release, but if you could let me know if the kaldi packages are failing for whatever reason, that would help a ton! (i.e., do compute-mfcc-feats and gmm-align-compiled work from within the environment?)

stefanocoretta commented 2 years ago

Hi! I tried installing, but seems that pynini is not available from arm channels...

Screenshot 2021-12-14 at 07 46 47
mmcauliffe commented 2 years ago

Ah dang, yeah I just hit when trying to enable the build, Looks like G2P won't work on arm64 at the moment, but I'll see if I can cut Kyle a PR for supporting it in the future. For now, this should work:

conda install -c conda-forge kaldi
pip install montreal-forced-aligner
stefanocoretta commented 2 years ago

Right! I was trying to install pynini from source, but a dependency (openfst) is not available for arm... :(

I tried without pynini but I get this:

Screenshot 2021-12-14 at 07 55 32

BTW, I did try to install using the full anaconda some days ago and that did work. I am not that familiar with python, how is it possible that with the full installation of anaconda things work but with miniconda and miniforge they don't? 😱

mmcauliffe commented 2 years ago

It might be a difference in the solver they use? It seems like conda is slowly moving over to using mamba, so I would try running conda install mamba in your base environment, and then retrying the installation?

stefanocoretta commented 2 years ago

Nope, tried that too. Does not work. 🤷‍♂️

mmcauliffe commented 2 years ago

Dang, ok, last thing to try for the moment, maybe try: conda install -c conda-forge kaldi-5.5.992-cpu_h1234567_5. That should help the solver. Failing that, I have some packaging changes in the pipeline, so maybe those packages will play nicer here too.

stefanocoretta commented 2 years ago

Nope :D Not available from current channels... I guess for now I will just uninstall miniforge and install full anaconda, but if you would like me to try miniforge out again later on let me know.

stefanocoretta commented 2 years ago

Ok so I understand now why with anaconda MFA installs fine. It's because anaconda is x86 only (no arm64 version). While when I install miniconda/forge the arm64 version is installed.

mmcauliffe commented 2 years ago

Ok there should be a new build up and available that should work (5.5.992_7), if you get a chance, could you run a test?

stefanocoretta commented 2 years ago

Thanks! Sure, I'll try it out on Monday and update you.

stefanocoretta commented 2 years ago

Hello! I tried installing again, but it still says the package is not available. I'm not very familiar with python stuff, so maybe I am supposed to look for the build somewhere else?

stefanocoretta commented 2 years ago

EDIT: Never mind. I got now that you were talking about a new build for kaldi. Unfortunately, that didn't work either. What I did now was to manually install the Intel-version of miniconda from the conda website.

calebhkelley commented 2 years ago

I'm new to MFA and I'm on macOS 12.2.1. I keep getting this error... Any ideas about what to do here?

Intel MKL FATAL ERROR: This system does not meet the minimum requirements for use of the Intel(R) Math Kernel Library.
The processor must support the Intel(R) Supplemental Streaming SIMD Extensions 3 (Intel(R) SSSE3) instructions.
The processor must support the Intel(R) Streaming SIMD Extensions 4.2 (Intel(R) SSE4.2) instructions.
The processor must support the Intel(R) Advanced Vector Extensions (Intel(R) AVX) instructions.