MontrealCorpusTools / Montreal-Forced-Aligner

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

[BUG] #702

Closed rahulbouri closed 5 months ago

rahulbouri commented 10 months ago

Debugging checklist

[yes ] Have you updated to latest MFA version? [ yes] Have you tried rerunning the command with the --clean flag?

Describe the issue While running 'mfa train' for Libri-TTS dataset with wav files having sample-rate=16kHz and a metadata file which is tab delimited. using the librispeech-lexicon.txt to generate TextGrid files I am encountering an error in the 'run'. I am attaching the exact terminal output is attached in Additional Context section.

For Reproducing your issue Please fill out the following:

  1. Corpus structure
    • What language is the corpus in? en
    • How many files/speakers? 1
    • Are you using lab files or TextGrid files for input? None
  2. Dictionary
    • Are you using a dictionary from MFA? If so, which one?
    • If it's a custom dictionary, what is the phoneset?
  3. Acoustic model
    • If you're using an acoustic model, is it one download through MFA? If so, which one?
    • If it's a model you've trained, what data was it trained on?

Log file Please attach the log file for the run that encountered an error (by default these will be stored in ~/Documents/MFA).

Desktop (please complete the following information):

Additional context

INFO Setting up corpus information...
INFO Found 1 speaker across 5736 files, average number of utterances per speaker: 5736.0
INFO Initializing multiprocessing jobs...
WARNING Number of jobs was specified as 3, 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 Features already generated.
INFO Filtering utterances for training...
INFO Initializing training for monophone...
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 0x1440a6c10>> Traceback (most recent call last): File "/Users/rahulbouri/miniconda3/envs/aligner/lib/python3.11/site-packages/montreal_forced_aligner/command_line/mfa.py", line 100, in history_save_handler raise self.exception File "/Users/rahulbouri/miniconda3/envs/aligner/bin/mfa", line 10, in sys.exit(mfa_cli()) ^^^^^^^^^ File "/Users/rahulbouri/miniconda3/envs/aligner/lib/python3.11/site-packages/click/core.py", line 1157, in call return self.main(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/rahulbouri/miniconda3/envs/aligner/lib/python3.11/site-packages/rich_click/rich_group.py", line 21, in main rv = super().main(args, standalone_mode=False,
kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/rahulbouri/miniconda3/envs/aligner/lib/python3.11/site-packages/click/core.py", line 1078, in main rv = self.invoke(ctx) ^^^^^^^^^^^^^^^^ File "/Users/rahulbouri/miniconda3/envs/aligner/lib/python3.11/site-packages/click/core.py", line 1688, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/rahulbouri/miniconda3/envs/aligner/lib/python3.11/site-packages/click/core.py", line 1434, in invoke return ctx.invoke(self.callback, ctx.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/rahulbouri/miniconda3/envs/aligner/lib/python3.11/site-packages/click/core.py", line 783, in invoke return __callback(*args, *kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/rahulbouri/miniconda3/envs/aligner/lib/python3.11/site-packages/click/decorators.py", line 33, in new_func return f(get_current_context(), args, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/rahulbouri/miniconda3/envs/aligner/lib/python3.11/site-packages/montreal_forced_aligner/command_line/train_acoustic_model.py", line 117, in train_acoustic_model_cli trainer.train() File "/Users/rahulbouri/miniconda3/envs/aligner/lib/python3.11/site-packages/montreal_forced_aligner/acoustic_modeling/trainer.py", line 523, in train trainer.train() File "/Users/rahulbouri/miniconda3/envs/aligner/lib/python3.11/site-packages/montreal_forced_aligner/acoustic_modeling/base.py", line 384, in train self.initialize_training() File "/Users/rahulbouri/miniconda3/envs/aligner/lib/python3.11/site-packages/montreal_forced_aligner/acoustic_modeling/base.py", line 217, in initialize_training self._trainer_initialization() File "/Users/rahulbouri/miniconda3/envs/aligner/lib/python3.11/site-packages/montreal_forced_aligner/acoustic_modeling/monophone.py", line 315, in _trainer_initialization job = self.jobs[0]


IndexError: list index out of range
**
<img width="1230" alt="Screenshot 2023-09-28 at 4 49 30 PM" src="https://github.com/MontrealCorpusTools/Montreal-Forced-Aligner/assets/84013546/8f94e6a8-c73c-4ce6-8302-17739f502c15">
mmcauliffe commented 10 months ago

It sounds like you have one file with all of the transcripts rather than per-sound file transcripts. See https://montreal-forced-aligner.readthedocs.io/en/latest/user_guide/corpus_structure.html for how the input corpus should be formatted and see https://github.com/MontrealCorpusTools/MFA-reorganization-scripts/blob/main/Librispeech/reorganize_librispeech.py for an example script that does converts transcripts from the librispeech format to something MFA can use.