Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] mfa validate raises exception #779

Open
yzmyyff opened this issue Mar 18, 2024 · 2 comments
Open

[BUG] mfa validate raises exception #779

yzmyyff opened this issue Mar 18, 2024 · 2 comments
Assignees
Labels

Comments

@yzmyyff
Copy link

yzmyyff commented Mar 18, 2024

Debugging checklist

[ ] Have you read the troubleshooting page (https://montreal-forced-aligner.readthedocs.io/en/latest/user_guide/troubleshooting.html) and searched the documentation to ensure that your issue is not addressed there?
[ ] Have you updated to latest MFA version (check https://montreal-forced-aligner.readthedocs.io/en/latest/changelog/changelog_3.0.html)? What is the output of mfa version?

3.0.2

[ ] Have you tried rerunning the command with the --clean flag?

yes

Describe the issue
When I validate my corpus, it throws a ZeroDivisionError, and no useful information is generated.

For Reproducing your issue
Please fill out the following:

  1. Corpus structure
    • What language is the corpus in?
    • How many files/speakers?
    • Are you using lab files or TextGrid files for input?
  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).

 INFO     Generating initial alignments...                                                                                                            
   0% ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 0/2,000  [ 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 
0x7f0fd5d34d60>>
Traceback (most recent call last):
  File "/opt/conda/envs/aligner/lib/python3.10/site-packages/montreal_forced_aligner/command_line/mfa.py", line 107, in history_save_handler
    raise self.exception
  File "/opt/conda/envs/aligner/bin/mfa", line 10, in <module>
    sys.exit(mfa_cli())
  File "/opt/conda/envs/aligner/lib/python3.10/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
  File "/opt/conda/envs/aligner/lib/python3.10/site-packages/rich_click/rich_command.py", line 126, in main
    rv = self.invoke(ctx)
  File "/opt/conda/envs/aligner/lib/python3.10/site-packages/click/core.py", line 1688, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/opt/conda/envs/aligner/lib/python3.10/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/opt/conda/envs/aligner/lib/python3.10/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
  File "/opt/conda/envs/aligner/lib/python3.10/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
  File "/opt/conda/envs/aligner/lib/python3.10/site-packages/montreal_forced_aligner/command_line/validate.py", line 137, in validate_corpus_cli
    validator.validate()
  File "/opt/conda/envs/aligner/lib/python3.10/site-packages/montreal_forced_aligner/validation/corpus_validator.py", line 512, in validate
    self.train()
  File "/opt/conda/envs/aligner/lib/python3.10/site-packages/montreal_forced_aligner/acoustic_modeling/trainer.py", line 546, in train
    trainer.train()
  File "/opt/conda/envs/aligner/lib/python3.10/site-packages/montreal_forced_aligner/acoustic_modeling/base.py", line 389, in train
    self.initialize_training()
  File "/opt/conda/envs/aligner/lib/python3.10/site-packages/montreal_forced_aligner/acoustic_modeling/base.py", line 217, in initialize_training
    self._trainer_initialization()
  File "/opt/conda/envs/aligner/lib/python3.10/site-packages/montreal_forced_aligner/acoustic_modeling/monophone.py", line 331, in 
_trainer_initialization
    self.mono_align_equal()
  File "/opt/conda/envs/aligner/lib/python3.10/site-packages/montreal_forced_aligner/acoustic_modeling/monophone.py", line 263, in mono_align_equal
    for result in run_kaldi_function(
  File "/opt/conda/envs/aligner/lib/python3.10/site-packages/montreal_forced_aligner/utils.py", line 735, in run_kaldi_function
    raise v
  File "/opt/conda/envs/aligner/lib/python3.10/site-packages/montreal_forced_aligner/utils.py", line 540, in run
    self.function.run()
  File "/opt/conda/envs/aligner/lib/python3.10/site-packages/montreal_forced_aligner/abc.py", line 106, in run
    raise MultiprocessingError(self.job_name, error_text)
montreal_forced_aligner.exceptions.MultiprocessingError: MultiprocessingError:

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

  File "/opt/conda/envs/aligner/lib/python3.10/site-packages/montreal_forced_aligner/abc.py", line 102, in run
    self._run()

  File "/opt/conda/envs/aligner/lib/python3.10/site-packages/montreal_forced_aligner/acoustic_modeling/monophone.py", line 137, in _run
    f"Overall avg like per frame (Gaussian only) = {tot_like/tot_t} over {tot_t} frames."

ZeroDivisionError: float division by zero

Desktop (please complete the following information):

  • OS: [e.g. Windows, OSX, Linux]
  • Version [e.g. MacOSX 10.15, Ubuntu 20.04, Windows 10, etc]
  • Any other details about the setup (Cloud, Docker, etc)

Additional context
Add any other context about the problem here.

@mmcauliffe
Copy link
Member

This means that initialization for every file failed, which indicates something wrong with the rest of your corpus.

What does the rest of validate output about the corpus structure? Also what is your corpus structure like, what dictionary are you using? (basically just fill in the 1-3 questions in the ticket template)

@hanspaa2017108
Copy link

This means that initialization for every file failed, which indicates something wrong with the rest of your corpus.

What does the rest of validate output about the corpus structure? Also what is your corpus structure like, what dictionary are you using? (basically just fill in the 1-3 questions in the ticket template)

Hi, @mmcauliffe I encountered same error as well. I'm using German Dictionary, corpus structure goes like this >
C:\Users\Administrator\mfa_data\my_corpus\german_files
german_files

audio_1.wav
audio_1.txt
audio_2.wav
audio_2.txt

this .txt contains transcription of the .wav files that i got from Gemini and labelmakr
I get same error, any troubleshoot ??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants