module not found - can't download any acoustic models or dictionaries

391 views
Skip to first unread message

caitlin....@gmail.com

unread,
Apr 11, 2024, 5:39:57 AM4/11/24
to MFA Users
Can anyone rescue me from a really basic error? I've used MFA before on a mac at my previous institution (not usually a mac user, just was the computer in the lab) but now I'm trying to install it on my laptop at a new role. I've followed the installation instructions here (https://montreal-forced-aligner.readthedocs.io/en/latest/installation.html#general-installation, using mamba) but I'm hitting errors as soon as I try to download any models or dictionaries - example below with the US English acoustic model, but it's happening with the UK one and the dictionaries too.

(aligner) C:\Users\55151349>mfa model download acoustic english_us_arpa
Traceback (most recent call last):
  File "C:\Users\55151349\AppData\Local\miniconda3\envs\aligner\Scripts\mfa-script.py", line 5, in <module>
    from montreal_forced_aligner.command_line.mfa import mfa_cli
  File "C:\Users\55151349\AppData\Local\miniconda3\envs\aligner\lib\site-packages\montreal_forced_aligner\__init__.py", line 4, in <module>
    import montreal_forced_aligner.acoustic_modeling as acoustic_modeling
  File "C:\Users\55151349\AppData\Local\miniconda3\envs\aligner\lib\site-packages\montreal_forced_aligner\acoustic_modeling\__init__.py", line 7, in <module>
    from montreal_forced_aligner.acoustic_modeling.base import AcousticModelTrainingMixin  # noqa
  File "C:\Users\55151349\AppData\Local\miniconda3\envs\aligner\lib\site-packages\montreal_forced_aligner\acoustic_modeling\base.py", line 12, in <module>
    from _kalpy.gmm import AccumAmDiagGmm
ImportError: DLL load failed while importing _kalpy: The specified module could not be found.

michael.e...@gmail.com

unread,
Apr 11, 2024, 11:34:52 AM4/11/24
to MFA Users
Can you try updating via `conda update -c conda-forge montreal-forced-aligner kalpy`?  That should get mfa=3.0.4 and kalpy=0.6.4 as the latest versions that should fix the issue.  If not, could you try running `conda install -c conda-forge kaldi=*=cpu*` and see if that fixes it?  Either way, could you let me know which one fixes it for you? I'm working on pinning the CPU version in conda, but it's a trial and error process with each release.

Thanks!

Caitlin Halfacre

unread,
Apr 11, 2024, 5:10:18 PM4/11/24
to michael.e...@gmail.com, MFA Users
(base) C:\Users\55151349>conda activate aligner

1st option
(aligner) C:\Users\55151349>conda update -c conda-forge montreal-forced-aligner kalpy
Channels:
 - conda-forge
 - defaults
 - pytorch
Platform: win-64
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: C:\Users\55151349\AppData\Local\miniconda3\envs\aligner

  added / updated specs:
    - kalpy
    - montreal-forced-aligner


The following packages will be SUPERSEDED by a higher-priority channel:

  certifi            pkgs/main/win-64::certifi-2024.2.2-py~ --> conda-forge/noarch::certifi-2024.2.2-pyhd8ed1ab_0


Proceed ([y]/n)? y


Downloading and Extracting Packages:

Preparing transaction: done
Verifying transaction: done
Executing transaction: done

(aligner) C:\Users\55151349>mfa model download acoustic english_mfa

Traceback (most recent call last):
  File "C:\Users\55151349\AppData\Local\miniconda3\envs\aligner\Scripts\mfa-script.py", line 5, in <module>
    from montreal_forced_aligner.command_line.mfa import mfa_cli
  File "C:\Users\55151349\AppData\Local\miniconda3\envs\aligner\lib\site-packages\montreal_forced_aligner\__init__.py", line 4, in <module>
    import montreal_forced_aligner.acoustic_modeling as acoustic_modeling
  File "C:\Users\55151349\AppData\Local\miniconda3\envs\aligner\lib\site-packages\montreal_forced_aligner\acoustic_modeling\__init__.py", line 7, in <module>
    from montreal_forced_aligner.acoustic_modeling.base import AcousticModelTrainingMixin  # noqa
  File "C:\Users\55151349\AppData\Local\miniconda3\envs\aligner\lib\site-packages\montreal_forced_aligner\acoustic_modeling\base.py", line 12, in <module>
    from _kalpy.gmm import AccumAmDiagGmm
ImportError: DLL load failed while importing _kalpy: The specified module could not be found.

(aligner) C:\Users\55151349>conda install -c conda-forge kaldi=*=cpu*
Channels:
 - conda-forge
 - defaults
 - pytorch
Platform: win-64
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: C:\Users\55151349\AppData\Local\miniconda3\envs\aligner

  added / updated specs:
    - kaldi[build=cpu*]


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    kaldi-5.5.1112             |   cpu_he6cc000_1        24.0 MB  conda-forge
    kalpy-0.6.4                |cpu_py39h4d443cc_0         2.0 MB  conda-forge
    ------------------------------------------------------------
                                           Total:        26.0 MB

The following packages will be DOWNGRADED:

  kaldi                          5.5.1112-cuda118h7ef4547_1 --> 5.5.1112-cpu_he6cc000_1
  kalpy                         0.6.4-cuda118py39h50aeb40_0 --> 0.6.4-cpu_py39h4d443cc_0


Proceed ([y]/n)? y


Downloading and Extracting Packages:

Preparing transaction: done
Verifying transaction: done
Executing transaction: done(base) C:\Users\55151349>conda activate aligner

(aligner) C:\Users\55151349>conda update -c conda-forge montreal-forced-aligner kalpy
Channels:
 - conda-forge
 - defaults
 - pytorch
Platform: win-64
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: C:\Users\55151349\AppData\Local\miniconda3\envs\aligner

  added / updated specs:
    - kalpy
    - montreal-forced-aligner


The following packages will be SUPERSEDED by a higher-priority channel:

  certifi            pkgs/main/win-64::certifi-2024.2.2-py~ --> conda-forge/noarch::certifi-2024.2.2-pyhd8ed1ab_0


Proceed ([y]/n)? y


Downloading and Extracting Packages:

Preparing transaction: done
Verifying transaction: done
Executing transaction: done

(aligner) C:\Users\55151349>mfa model download acoustic english_mfa

Traceback (most recent call last):
  File "C:\Users\55151349\AppData\Local\miniconda3\envs\aligner\Scripts\mfa-script.py", line 5, in <module>
    from montreal_forced_aligner.command_line.mfa import mfa_cli
  File "C:\Users\55151349\AppData\Local\miniconda3\envs\aligner\lib\site-packages\montreal_forced_aligner\__init__.py", line 4, in <module>
    import montreal_forced_aligner.acoustic_modeling as acoustic_modeling
  File "C:\Users\55151349\AppData\Local\miniconda3\envs\aligner\lib\site-packages\montreal_forced_aligner\acoustic_modeling\__init__.py", line 7, in <module>
    from montreal_forced_aligner.acoustic_modeling.base import AcousticModelTrainingMixin  # noqa
  File "C:\Users\55151349\AppData\Local\miniconda3\envs\aligner\lib\site-packages\montreal_forced_aligner\acoustic_modeling\base.py", line 12, in <module>
    from _kalpy.gmm import AccumAmDiagGmm
ImportError: DLL load failed while importing _kalpy: The specified module could not be found.

(aligner) C:\Users\55151349>conda install -c conda-forge kaldi=*=cpu*
Channels:
 - conda-forge
 - defaults
 - pytorch
Platform: win-64
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: C:\Users\55151349\AppData\Local\miniconda3\envs\aligner

  added / updated specs:
    - kaldi[build=cpu*]


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    kaldi-5.5.1112             |   cpu_he6cc000_1        24.0 MB  conda-forge
    kalpy-0.6.4                |cpu_py39h4d443cc_0         2.0 MB  conda-forge
    ------------------------------------------------------------
                                           Total:        26.0 MB

The following packages will be DOWNGRADED:

  kaldi                          5.5.1112-cuda118h7ef4547_1 --> 5.5.1112-cpu_he6cc000_1
  kalpy                         0.6.4-cuda118py39h50aeb40_0 --> 0.6.4-cpu_py39h4d443cc_0


Proceed ([y]/n)? y


Downloading and Extracting Packages:

Preparing transaction: done
Verifying transaction: done
Executing transaction: done
(aligner) C:\Users\55151349>conda update -c conda-forge montreal-forced-aligner kalpy
Channels:
 - conda-forge
 - defaults
 - pytorch
Platform: win-64
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: C:\Users\55151349\AppData\Local\miniconda3\envs\aligner

  added / updated specs:
    - kalpy
    - montreal-forced-aligner


The following packages will be SUPERSEDED by a higher-priority channel:

  certifi            pkgs/main/win-64::certifi-2024.2.2-py~ --> conda-forge/noarch::certifi-2024.2.2-pyhd8ed1ab_0


Proceed ([y]/n)? y


Downloading and Extracting Packages:

Preparing transaction: done
Verifying transaction: done
Executing transaction: done

(aligner) C:\Users\55151349>mfa model download acoustic english_mfa

Traceback (most recent call last):
  File "C:\Users\55151349\AppData\Local\miniconda3\envs\aligner\Scripts\mfa-script.py", line 5, in <module>
    from montreal_forced_aligner.command_line.mfa import mfa_cli
  File "C:\Users\55151349\AppData\Local\miniconda3\envs\aligner\lib\site-packages\montreal_forced_aligner\__init__.py", line 4, in <module>
    import montreal_forced_aligner.acoustic_modeling as acoustic_modeling
  File "C:\Users\55151349\AppData\Local\miniconda3\envs\aligner\lib\site-packages\montreal_forced_aligner\acoustic_modeling\__init__.py", line 7, in <module>
    from montreal_forced_aligner.acoustic_modeling.base import AcousticModelTrainingMixin  # noqa
  File "C:\Users\55151349\AppData\Local\miniconda3\envs\aligner\lib\site-packages\montreal_forced_aligner\acoustic_modeling\base.py", line 12, in <module>
    from _kalpy.gmm import AccumAmDiagGmm
ImportError: DLL load failed while importing _kalpy: The specified module could not be found.

2nd option
(aligner) C:\Users\55151349>conda install -c conda-forge kaldi=*=cpu*
Channels:
 - conda-forge
 - defaults
 - pytorch
Platform: win-64
Collecting package metadata (repodata.json): done
Solving environment: done

## Package Plan ##

  environment location: C:\Users\55151349\AppData\Local\miniconda3\envs\aligner

  added / updated specs:
    - kaldi[build=cpu*]


The following packages will be downloaded:

    package                    |            build
    ---------------------------|-----------------
    kaldi-5.5.1112             |   cpu_he6cc000_1        24.0 MB  conda-forge
    kalpy-0.6.4                |cpu_py39h4d443cc_0         2.0 MB  conda-forge
    ------------------------------------------------------------
                                           Total:        26.0 MB

The following packages will be DOWNGRADED:

  kaldi                          5.5.1112-cuda118h7ef4547_1 --> 5.5.1112-cpu_he6cc000_1
  kalpy                         0.6.4-cuda118py39h50aeb40_0 --> 0.6.4-cpu_py39h4d443cc_0


Proceed ([y]/n)? y


Downloading and Extracting Packages:

Preparing transaction: done
Verifying transaction: done
Executing transaction: done


________________________________________________________
Seems that the second one has worked. I can now download dictionariesand acoustic models. I've downloaded the English UK one. Though I have to admit I'm considering a slight hack which would be using the American one with a custom derhotacized dictionary so that I can then use the TextGrids with FAVE, but that's not a problem at your end!



--
You received this message because you are subscribed to a topic in the Google Groups "MFA Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mfa-users/YoIcobRoi9o/unsubscribe.
To unsubscribe from this group and all its topics, send an email to mfa-users+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/mfa-users/a935d9a6-06cd-4fbd-879e-6cf667897d2cn%40googlegroups.com.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages