Montreal-Forced-Aligner icon indicating copy to clipboard operation
Montreal-Forced-Aligner copied to clipboard

[BUG] FeatureGenerationError on soundfiles

Open cbeaumard opened this issue 2 years ago • 4 comments

Debugging checklist

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

Describe the issue I want to generate TextGrids from my own soundfiles (I don't have textfiles for them). No problem when using the mfa validate command.

For Reproducing your issue Please fill out the following:

  1. Corpus structure
    • What language is the corpus in? French
    • How many files/speakers? 18/3
    • Are you using lab files or TextGrid files for input? None
  2. Dictionary
    • Are you using a dictionary from MFA? If so, which one? french_mfa
    • 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? french_mfa
    • If it's a model you've trained, what data was it trained on?

Log file INFO Generating final features...
0% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0/18 [ 0:00:01 < -:--:-- , ? 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 0x7f984d21a910>> Traceback (most recent call last): File "/home/cbeaumard/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 "/home/cbeaumard/miniconda3/envs/aligner/bin/mfa", line 10, in sys.exit(mfa_cli()) ^^^^^^^^^ File "/home/cbeaumard/miniconda3/envs/aligner/lib/python3.11/site-packages/click/core.py", line 1157, in call return self.main(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/cbeaumard/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 "/home/cbeaumard/miniconda3/envs/aligner/lib/python3.11/site-packages/click/core.py", line 1078, in main rv = self.invoke(ctx) ^^^^^^^^^^^^^^^^ File "/home/cbeaumard/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 "/home/cbeaumard/miniconda3/envs/aligner/lib/python3.11/site-packages/click/core.py", line 1434, in invoke return ctx.invoke(self.callback, **ctx.params) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/cbeaumard/miniconda3/envs/aligner/lib/python3.11/site-packages/click/core.py", line 783, in invoke return __callback(*args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/cbeaumard/miniconda3/envs/aligner/lib/python3.11/site-packages/click/decorators.py", line 33, in new_func return f(get_current_context(), *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/cbeaumard/miniconda3/envs/aligner/lib/python3.11/site-packages/montreal_forced_aligner/command_line/align.py", line 111, in align_corpus_cli aligner.align() File "/home/cbeaumard/miniconda3/envs/aligner/lib/python3.11/site-packages/montreal_forced_aligner/alignment/pretrained.py", line 333, in align self.setup() File "/home/cbeaumard/miniconda3/envs/aligner/lib/python3.11/site-packages/montreal_forced_aligner/alignment/pretrained.py", line 207, in setup self.load_corpus() File "/home/cbeaumard/miniconda3/envs/aligner/lib/python3.11/site-packages/montreal_forced_aligner/corpus/acoustic_corpus.py", line 1082, in load_corpus self.generate_features() File "/home/cbeaumard/miniconda3/envs/aligner/lib/python3.11/site-packages/montreal_forced_aligner/corpus/acoustic_corpus.py", line 512, in generate_features self.generate_final_features() File "/home/cbeaumard/miniconda3/envs/aligner/lib/python3.11/site-packages/montreal_forced_aligner/corpus/acoustic_corpus.py", line 459, in generate_final_features raise FeatureGenerationError( montreal_forced_aligner.exceptions.FeatureGenerationError: FeatureGenerationError:

No utterances had features, please check the logs for errors.

Desktop (please complete the following information):

  • OS: Windows
  • Version: Windows 11
  • Any other details about the setup (Cloud, Docker, etc): server connected with SSH (under linux)

Additional information MFA was installed with conda.

cbeaumard avatar Sep 26 '23 12:09 cbeaumard

Also have the same error

  • System: Intel and M2 Mac
  • MFA latest (running fine on other files); installed using conda and in the same environment as openai-whisper
  • WAV files in English
  • english_mfa acoustic model and english_us_mfa dictionary
  • validation workflow not tested for this bug

delale avatar Oct 10 '23 06:10 delale

Are there any errors listed in the make_mfcc.X.log, generate_final_features.X.log, or cmvn.log files in ~/Documents/MFA/{corpus_name}/{corpus_name}/splitX/log (replacing {corpus_name} with your dataset name and X with the number of jobs)?

This is likely a bug in 3.0.X only, so if you need a workable version asap, installing the stable 2.2 via https://montreal-forced-aligner.readthedocs.io/en/latest/installation.html#installing-older-versions-of-mfa should unblock you.

mmcauliffe avatar Oct 10 '23 14:10 mmcauliffe

@mmcauliffe Can confirm that this is solved when moving to 2.2.17, so most likely a bug in 3.0.X. Thank you for the quick response.

delale avatar Oct 11 '23 08:10 delale

I also meet this bug, version is 3.0.X alpha 6:

mfa align /scratch/v-zhikangniu/LibriSpeech english_us_mfa english_mfa /data/v-zhikangniu/algner --clean
Please be aware that you are running an alpha version of MFA. If you would like to install a more stable version, please visit https://montreal-forced-aligner.readthedocs.io/en/latest/installation.html#installing-older-versions-of-mfa
 INFO     Setting up corpus information...                                                                                                                               
 INFO     Loading corpus from source files...                                                                                                                            
 100% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 433,343/100  [ 0:00:00 < 0:00:00 , 2,383 it/s ]
 INFO     Found 5831 speakers across 433343 files, average number of utterances per speaker: 74.31709826787858                                                           
 INFO     Initializing multiprocessing jobs...                                                                                                                           
 INFO     Normalizing text...                                                                                                                                            
   0% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0/433,343  [ 0:00:02 < -:--:-- , ? it/s ]
 INFO     Generating MFCCs...                                                                                                                                            
   0% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0/433,343  [ 0:00:02 < -:--:-- , ? it/s ]
 INFO     Calculating CMVN...                                                                                                                                            
 INFO     Generating final features...                                                                                                                                   
   0% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0/433,343  [ 0:00:02 < -:--:-- , ? 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 0x7fbf16508dd0>>
Traceback (most recent call last):
  File "/anaconda/envs/aligner/lib/python3.11/site-packages/montreal_forced_aligner/command_line/mfa.py", line 107, in history_save_handler
    raise self.exception
  File "/anaconda/envs/aligner/bin/mfa", line 10, in <module>
    sys.exit(mfa_cli())
             ^^^^^^^^^
  File "/anaconda/envs/aligner/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/anaconda/envs/aligner/lib/python3.11/site-packages/rich_click/rich_command.py", line 126, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/anaconda/envs/aligner/lib/python3.11/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/anaconda/envs/aligner/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/anaconda/envs/aligner/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/anaconda/envs/aligner/lib/python3.11/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/anaconda/envs/aligner/lib/python3.11/site-packages/montreal_forced_aligner/command_line/align.py", line 122, in align_corpus_cli
    aligner.align()
  File "/anaconda/envs/aligner/lib/python3.11/site-packages/montreal_forced_aligner/alignment/pretrained.py", line 333, in align
    self.setup()
  File "/anaconda/envs/aligner/lib/python3.11/site-packages/montreal_forced_aligner/alignment/pretrained.py", line 207, in setup
    self.load_corpus()
  File "/anaconda/envs/aligner/lib/python3.11/site-packages/montreal_forced_aligner/corpus/acoustic_corpus.py", line 1089, in load_corpus
    self.generate_features()
  File "/anaconda/envs/aligner/lib/python3.11/site-packages/montreal_forced_aligner/corpus/acoustic_corpus.py", line 511, in generate_features
    self.generate_final_features()
  File "/anaconda/envs/aligner/lib/python3.11/site-packages/montreal_forced_aligner/corpus/acoustic_corpus.py", line 458, in generate_final_features
    raise FeatureGenerationError(
montreal_forced_aligner.exceptions.FeatureGenerationError: FeatureGenerationError:

No utterances had features, please check the logs in /home/v-zhikangniu/Documents/MFA/LibriSpeech/LibriSpeech/split3/log for errors.

and the mfa validate looks like successful?

ZhikangNiu avatar Oct 17 '23 05:10 ZhikangNiu

Should be fixed in latest releases of 3.0.X

mmcauliffe avatar Mar 05 '24 18:03 mmcauliffe

The same problem happens in 3.1.3.

Aaashair avatar Jul 26 '24 09:07 Aaashair

I was facing the same issue for multi-speaker folders. when i did the alignment for individual files the error was no more. So i do not understand what is happening here.

nandishaivalli avatar Aug 02 '24 08:08 nandishaivalli