MFA 2.0: no aligned output

342 views
Skip to first unread message

Thea Knowles

unread,
Jan 27, 2021, 1:28:03 PM1/27/21
to MFA Users
Hello!
I am running MFA 2.0 for the first time on Mac OSX Big Sur (11.1; recent update). All steps of the installation appeared to work.

First attempts to align (without training) new data proceeded without any errors, but no TextGrids were produced in the output directory. I attempted on data I'd previously successfully aligned with MFA 1.1, and then finally with the librispeech test data, with the same result each time (no errors and no output). A check of the files in ~Documents/MFA/ confirm the words.txt and phones

Below is what I ran and the terminal output. The output directory was created but is empty.

```

(base) Theas-MBP:aligner theaknowles$ mfa align /Users/theaknowles/Documents/test/Librispeech /Users/theaknowles/Documents/test/librispeech-lexicon.txt english ~/Documents/aligned_librispeech

All required kaldi binaries were found!

Setting up corpus information...

Number of speakers in corpus: 3, average number of utterances per speaker: 122.33333333333333

Parsing dictionary without pronunciation probabilties without silence probabilties

Creating dictionary information...

Setting up corpus_data directory...

Generating base features (mfcc)...

Calculating CMVN...

Done with setup.

Done! Everything took 158.46843099594116 seconds

```

For version 1.1 there was usually a progress bar that would get printed after "Done with setup." which doesn't appear in the above output.

Any thoughts? Many thanks!

Thea Knowles

unread,
Jan 28, 2021, 10:58:07 AM1/28/21
to MFA Users

An update: This was in fact due to my negligence and skipping a final step of installing Kaldi (d'oh). I believe I also needed to activate the Conda/virtual environment. XTools & brew have also been updated at this point.

However, having corrected that I am now running into a new error:


  • FileNotFoundError: [Errno 2] No such file or directory: '/Users/theaknowles/Documents/MFA/in/corpus_data/split1/feats.0.scp'


Full command + output: 

(aligner) Theas-MBP:aligner theaknowles$ mfa align -d /Users/theaknowles/Documents/test/in /Users/theaknowles/Documents/test/librispeech-lexicon.txt /Users/theaknowles/Documents/test/english.zip /Users/theaknowles/Documents/test/out_new

All required kaldi binaries were found!

Setting up corpus information...

Number of speakers in corpus: 1, average number of utterances per speaker: 1.0

Parsing dictionary without pronunciation probabilties without silence probabilties

Creating dictionary information...

Setting up corpus_data directory...

Generating base features (mfcc)...

Traceback (most recent call last):

  File "/Users/theaknowles/opt/miniconda3/envs/aligner/bin/mfa", line 8, in <module>

    sys.exit(main())

  File "/Users/theaknowles/opt/miniconda3/envs/aligner/lib/python3.8/site-packages/montreal_forced_aligner/command_line/mfa.py", line 290, in main

    run_align_corpus(args, acoustic_languages)

  File "/Users/theaknowles/opt/miniconda3/envs/aligner/lib/python3.8/site-packages/montreal_forced_aligner/command_line/align.py", line 147, in run_align_corpus

    align_corpus(args)

  File "/Users/theaknowles/opt/miniconda3/envs/aligner/lib/python3.8/site-packages/montreal_forced_aligner/command_line/align.py", line 81, in align_corpus

    a = PretrainedAligner(corpus, dictionary, acoustic_model, align_config,

  File "/Users/theaknowles/opt/miniconda3/envs/aligner/lib/python3.8/site-packages/montreal_forced_aligner/aligner/pretrained.py", line 56, in __init__

    super(PretrainedAligner, self).__init__(corpus, dictionary, align_config, temp_directory,

  File "/Users/theaknowles/opt/miniconda3/envs/aligner/lib/python3.8/site-packages/montreal_forced_aligner/aligner/base.py", line 40, in __init__

    self.setup()

  File "/Users/theaknowles/opt/miniconda3/envs/aligner/lib/python3.8/site-packages/montreal_forced_aligner/aligner/pretrained.py", line 75, in setup

    super(PretrainedAligner, self).setup()

  File "/Users/theaknowles/opt/miniconda3/envs/aligner/lib/python3.8/site-packages/montreal_forced_aligner/aligner/base.py", line 45, in setup

    self.align_config.feature_config.generate_features(self.corpus)

  File "/Users/theaknowles/opt/miniconda3/envs/aligner/lib/python3.8/site-packages/montreal_forced_aligner/features/config.py", line 170, in generate_features

    self.generate_base_features(corpus)

  File "/Users/theaknowles/opt/miniconda3/envs/aligner/lib/python3.8/site-packages/montreal_forced_aligner/features/config.py", line 158, in generate_base_features

    corpus.combine_feats()

  File "/Users/theaknowles/opt/miniconda3/envs/aligner/lib/python3.8/site-packages/montreal_forced_aligner/corpus/base.py", line 436, in combine_feats

    with open(path, 'r') as inf:


FileNotFoundError: [Errno 2] No such file or directory: '/Users/theaknowles/Documents/MFA/in/corpus_data/split1/feats.0.scp'


Output in the corpus_data/split1/log:

dyld: Library not loaded: @loader_path/libfst.10.dylib

  Referenced from: /Users/theaknowles/Documents/MFA/thirdparty/bin/copy-feats

  Reason: image not found

dyld: Library not loaded: @loader_path/libfst.10.dylib

  Referenced from: /Users/theaknowles/Documents/MFA/thirdparty/bin/compute-mfcc-feats

  Reason: image not found


Things I've tried:

- Retraced the installation steps starting with (2), create (and overwrite) a new Conda environment 

- Updated Xtools, which was outdated after the upgrade to Big Sur

- Updated and upgraded brew, as per advice #2 here & apparently a known recent OSX issue ("How to Fix ‘Dyld: Library not Loaded’ Error on MacOS")

- installed openblas (brew install openblas), after sussing out this might be the issue from similar errors posted here and here and then, when that still didn't work...

- tried creating a symbolic link via advice #1 here 

Error persists and the log message remains the same. I'm unclear at this point whether this is related to an earlier error I made somewhere in the install or an OSX issue, or neither. Any thoughts appreciated!

michael.e...@gmail.com

unread,
Jan 28, 2021, 11:41:05 AM1/28/21
to MFA Users
Very odd, I'm always not too sure about mac issues since I don't use it regularly.  I'm hoping to do a pass of testing on a virtual machine Mac soon though.  For the meantime, you could try recompiling kaldi with `.configure --static`, which should include all the necessary FST aspects in the kaldi binaries and make it so that they shouldn't be looking for libfst.10.dylib at all at runtime.

Thea Knowles

unread,
Jan 28, 2021, 11:41:48 AM1/28/21
to MFA Users
And finally (and now I will step away from this for a little bit), I'm back to the same problem ("no error, no output").

The above problem (FileNotFound) was related to my trying to build platform-specific binaries from scratch instead of just stopping at step 4 for "all platforms" (mfa thirdparty download). So again, d'oh.

I'm back, however, to no aligned textgrid output, no error, but this time alignment most definitely seems to be taking place as per the output from mfa align (specifically "Setup pretrained aligner","Performed alignment" and "Exported TextGrids", all of which were not printed when I was running into my first issue).

Full command + output for 1 .wav + .lab pair from Librispeech example:

(aligner) Theas-MBP:aligner theaknowles$ mfa align -d /Users/theaknowles/Documents/test/in /Users/theaknowles/Documents/test/librispeech-lexicon.txt /Users/theaknowles/Documents/test/english.zip /Users/theaknowles/Documents/test/out

All required kaldi binaries were found!

Setting up corpus information...

Number of speakers in corpus: 1, average number of utterances per speaker: 1.0

Parsing dictionary without pronunciation probabilties without silence probabilties

Creating dictionary information...

Setting up corpus_data directory...

Generating base features (mfcc)...

Calculating CMVN...

Done with setup.

Setup pretrained aligner in 4.67058801651001 seconds

Performed alignment in 2.7705650329589844 seconds

Exported TextGrids in 2.0274698734283447 seconds

Done! Everything took 11.402724981307983 seconds


Log files:
- MFA/in/align/log/align.final.0.log looks fine (ends with "Done 1, errors on 0").
- MFA/in/align/log/get_ctm_align.0.log still contains the warning "dyld: Library not loaded: @loader_path/libkaldi-nnet3.dylib" (fwiw I did delete the MFA/in folder before reattempting alignment, so this is indeed the latest log and not leftover from previous attempts)

Again, have tried this with both the librispeech example data + my data that had been previously successfully aligned with 1.1. The output textgrids do not exist anywhere (i.e., this isn't resulting from mis-specifying the output directory).


Thea Knowles

unread,
Jan 28, 2021, 11:45:35 AM1/28/21
to MFA Users
Saw this just as posting my most recent update. I'll try this and run again with the build platform specific binaries from scratch option.

michael.e...@gmail.com

unread,
Jan 28, 2021, 11:47:04 AM1/28/21
to MFA Users
Very odd indeed, sorry about all these issues!  Not sure why it's saying nnet3 is required for anything in the CTM, but my current plan is to finish up work on the latest release that should have better logging and tracking of issues for things like this, and then try to install on a mac virtual machine and recompile binaries so hopefully they'll work better after that.

Thea Knowles

unread,
Jan 28, 2021, 11:51:44 AM1/28/21
to MFA Users
That's okay! I'm figuring a lot of new things out while trying to troubleshoot. I'll keep an eye out for news on the new release and will report back if I get things working here. Thanks so much for the responses!

michael.e...@gmail.com

unread,
Feb 2, 2021, 5:44:10 PM2/2/21
to MFA Users
Hi Thea,

New version is up on pip now, so you can try updating and rerunning.  The logging should point to better places to debug.  Also updated the MacOSX binaries by building them on a virtual machine, so they're available via the `mfa thirdparty download` command.

Let me know if you run into any issues!
Michael

Thea Knowles

unread,
Feb 3, 2021, 3:27:59 PM2/3/21
to MFA Users
Great - thanks so much for the update!
Reply all
Reply to author
Forward
0 new messages