Montreal-Forced-Aligner: [ERROR] Getting MultiprocessingError, KaldiProcessingError when attempting to align a 2-speaker audio file

I tried to run the sample Colab notebook (https://gist.github.com/NTT123/12264d15afad861cb897f7a20a01762e) locally (as a .py file). It’s working fine when I use it for the provided ljspeech data. However, when I try it with my own data (a 16khz wav file and its .txt transcript), I get the following error:

(The audio file is around 4 minutes long, if that’s relevant.)

$ mfa align -t ./temp -j 2 ./temp_mfa modified_librispeech-lexicon.txt ./english.zip ./ljs_alignedcapstone
 WARNING  The previous run had a different configuration than the current, which may cause issues. Please see the log for details or use --clean flag if issues 
          are encountered.
 WARNING  The previous run had a different configuration than the current, which may cause issues. Please see the log for details or use --clean flag if issues 
          are encountered.
 INFO     Setting up corpus information...
 INFO     Found 1 speaker across 1 file, average number of utterances per speaker: 1.0
 INFO     Initializing multiprocessing jobs...
 WARNING  Number of jobs was specified as 2, but due to only having 1 speakers, MFA will only use 1 jobs. Use the --single_speaker flag if you would like to    
          split utterances across jobs regardless of their speaker.
 INFO     Text already normalized.
 INFO     Creating corpus split with features...
 100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1/1  [ 0:00:04 < 0:00:00 , ? it/s ] INFO     Features already generated.
 INFO     Compiling training graphs...
 100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 1/1  [ 0:00:04 < 0:00:00 , ? it/s ] INFO     Performing first-pass alignment...
 INFO     Generating alignments...
   0% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0/1  [ 0:00:14 < -:--:-- , ? it/s ] ERROR    There was an error in the run, please see the log.
Exception ignored in atexit callback: <bound method ExitHooks.history_save_handler of <montreal_forced_aligner.command_line.mfa.ExitHooks object at 0x0000016DD15D2410>>
Traceback (most recent call last):
  File "C:\Users\Ketaki\anaconda3\envs\aligner\lib\site-packages\montreal_forced_aligner\command_line\mfa.py", line 97, in history_save_handler
    raise self.exception
  File "C:\Users\Ketaki\anaconda3\envs\aligner\Scripts\mfa-script.py", line 10, in <module>
    sys.exit(mfa_cli())
  File "C:\Users\Ketaki\anaconda3\envs\aligner\lib\site-packages\click\core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "C:\Users\Ketaki\anaconda3\envs\aligner\lib\site-packages\rich_click\rich_group.py", line 21, in main
    rv = super().main(*args, standalone_mode=False, **kwargs)
  File "C:\Users\Ketaki\anaconda3\envs\aligner\lib\site-packages\click\core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "C:\Users\Ketaki\anaconda3\envs\aligner\lib\site-packages\click\core.py", line 1657, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "C:\Users\Ketaki\anaconda3\envs\aligner\lib\site-packages\click\core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "C:\Users\Ketaki\anaconda3\envs\aligner\lib\site-packages\click\core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "C:\Users\Ketaki\anaconda3\envs\aligner\lib\site-packages\click\decorators.py", line 26, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "C:\Users\Ketaki\anaconda3\envs\aligner\lib\site-packages\montreal_forced_aligner\command_line\align.py", line 113, in align_corpus_cli
    aligner.align()
  File "C:\Users\Ketaki\anaconda3\envs\aligner\lib\site-packages\montreal_forced_aligner\alignment\pretrained.py", line 412, in align
    super().align()
  File "C:\Users\Ketaki\anaconda3\envs\aligner\lib\site-packages\montreal_forced_aligner\alignment\base.py", line 345, in align
    self.align_utterances()
  File "C:\Users\Ketaki\anaconda3\envs\aligner\lib\site-packages\montreal_forced_aligner\alignment\mixins.py", line 436, in align_utterances
    for utterance, log_likelihood in run_kaldi_function(
  File "C:\Users\Ketaki\anaconda3\envs\aligner\lib\site-packages\montreal_forced_aligner\utils.py", line 753, in run_kaldi_function
    raise v
montreal_forced_aligner.exceptions.MultiprocessingError: MultiprocessingError:

Job 1 encountered an error:
Traceback (most recent call last):

  File "C:\Users\Ketaki\anaconda3\envs\aligner\lib\site-packages\montreal_forced_aligner\abc.py", line 85, in run
    yield from self._run()

  File "C:\Users\Ketaki\anaconda3\envs\aligner\lib\site-packages\montreal_forced_aligner\alignment\multiprocessing.py", line 955, in _run
    self.check_call(align_proc)

  File "C:\Users\Ketaki\anaconda3\envs\aligner\lib\site-packages\montreal_forced_aligner\abc.py", line 112, in check_call
    raise KaldiProcessingError([self.log_path])

montreal_forced_aligner.exceptions.KaldiProcessingError: KaldiProcessingError:

There were 1 job(s) with errors when running Kaldi binaries.
See the log files below for more information.
temp\temp_mfa\alignment\log\align.1.log`

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 1
  • Comments: 17 (6 by maintainers)

Most upvoted comments

@299792459b It looks like you’re running on docker, in which case I would recommend using https://hub.docker.com/repository/docker/mmcauliffe/montreal-forced-aligner/general or looking at https://montreal-forced-aligner.readthedocs.io/en/latest/installation.html#installing-mfa-in-your-own-containers. MFA should not be running as root.

Not sure if others hitting this are in the same situation, but I am going to close this as the original issue should be solved or at least better with the latest MFA model, but the root cause is really that MFA relies on accurate speaker labels heavily. For those encountering error as root users and the links above don’t help, feel free to make other issues.

i got the same problem(There was an error encountered starting the global MFA database server),how can i fix it?