MontrealCorpusTools / Montreal-Forced-Aligner

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

[BUG] mfa align with --fine_tune flag crashes: 'PhoneInterval' has no attribute 'label' #654

Closed danablend closed 1 year ago

danablend commented 1 year ago

Debugging checklist

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

Describe the issue When attempting to use the --fine_tune flag to improve alignment accuracy, an error occurs during execution. The error message indicates: AttributeError: type object 'PhoneInterval' has no attribute 'label'. However, when the --fine_tune flag is omitted, the program runs without any errors.

Here is the full error output in the console: ERROR There was an error in the run, please see the log. Error in atexit._run_exitfuncs: Traceback (most recent call last): File "/home/daniel/miniconda3/envs/py39/bin/mfa", line 10, in <module> sys.exit(mfa_cli()) File "/home/daniel/miniconda3/envs/py39/lib/python3.9/site-packages/click/core.py", line 1130, in __call__ return self.main(*args, **kwargs) File "/home/daniel/miniconda3/envs/py39/lib/python3.9/site-packages/rich_click/rich_group.py", line 21, in main rv = super().main(*args, standalone_mode=False, **kwargs) File "/home/daniel/miniconda3/envs/py39/lib/python3.9/site-packages/click/core.py", line 1055, in main rv = self.invoke(ctx) File "/home/daniel/miniconda3/envs/py39/lib/python3.9/site-packages/click/core.py", line 1657, in invoke return _process_result(sub_ctx.command.invoke(sub_ctx)) File "/home/daniel/miniconda3/envs/py39/lib/python3.9/site-packages/click/core.py", line 1404, in invoke return ctx.invoke(self.callback, **ctx.params) File "/home/daniel/miniconda3/envs/py39/lib/python3.9/site-packages/click/core.py", line 760, in invoke return __callback(*args, **kwargs) File "/home/daniel/miniconda3/envs/py39/lib/python3.9/site-packages/click/decorators.py", line 26, in new_func return f(get_current_context(), *args, **kwargs) File "/home/daniel/miniconda3/envs/py39/lib/python3.9/site-packages/montreal_forced_aligner/command_line/align.py", line 113, in align_corpus_cli aligner.align() File "/home/daniel/miniconda3/envs/py39/lib/python3.9/site-packages/montreal_forced_aligner/alignment/pretrained.py", line 413, in align super().align() File "/home/daniel/miniconda3/envs/py39/lib/python3.9/site-packages/montreal_forced_aligner/alignment/base.py", line 369, in align self.fine_tune_alignments() File "/home/daniel/miniconda3/envs/py39/lib/python3.9/site-packages/montreal_forced_aligner/alignment/base.py", line 1055, in fine_tune_alignments bulk_update(session, PhoneInterval, update_mappings) File "/home/daniel/miniconda3/envs/py39/lib/python3.9/site-packages/montreal_forced_aligner/db.py", line 115, in bulk_update columns = [getattr(table, x)._copy() for x in column_names if x != id_field] File "/home/daniel/miniconda3/envs/py39/lib/python3.9/site-packages/montreal_forced_aligner/db.py", line 115, in <listcomp> columns = [getattr(table, x)._copy() for x in column_names if x != id_field] AttributeError: type object 'PhoneInterval' has no attribute 'label'

For Reproducing your issue Please fill out the following:

  1. Corpus structure

    • What language is the corpus in? English

    • How many files/speakers? Test input with 1 speaker

    • Are you using lab files or TextGrid files for input? My input files consists of 1 file called "p243_313.wav", and 1 file called "p243_313.txt" containing the transcript of the speech. The sample is from the VCTK dataset. Files are in the same folder, called "test_input_vctk" The p243_313.txt file contains exactly the following text: For that reason cover should not be given.

  2. Dictionary

    • Are you using a dictionary from MFA? If so, which one? Yes, english_mfa.

    • If it's a custom dictionary, what is the phoneset? Not applicable.

  3. Acoustic model

    • If you're using an acoustic model, is it one download through MFA? If so, which one? Yes, the "english_us_arpa" model from MFA

    • If it's a model you've trained, what data was it trained on? Not applicable

Log file

Desktop (please complete the following information):

Additional context The precise command that led to the error is: mfa align samples/test_input_vctk english_mfa english_us_arpa samples/test_output_vctk --clean --fine_tune

zhanglina94 commented 1 year ago

Hello, I have the same problem, have you solved it? Thanks in advance~