MontrealCorpusTools / Montreal-Forced-Aligner

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

[BUG] TypeError: Session.get() missing 1 required positional argument: 'ident' #772

Closed Nanayeb34 closed 4 months ago

Nanayeb34 commented 4 months ago

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? [ ] Have you tried rerunning the command with the --clean flag?

Describe the issue Running the aligner on my dataset returns a positional argument error

Traceback (most recent call last):
  File "/home/sam/anaconda3/envs/aligner/lib/python3.11/site-packages/montreal_forced_aligner/command_line/mfa.py", line 107, in history_save_handler
    raise self.exception
  File "/home/sam/anaconda3/envs/aligner/bin/mfa", line 10, in <module>
    sys.exit(mfa_cli())
             ^^^^^^^^^
  File "/home/sam/anaconda3/envs/aligner/lib/python3.11/site-packages/click/core.py", line 1157, in __call__
    return self.main(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sam/anaconda3/envs/aligner/lib/python3.11/site-packages/rich_click/rich_command.py", line 126, in main
    rv = self.invoke(ctx)
         ^^^^^^^^^^^^^^^^
  File "/home/sam/anaconda3/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/sam/anaconda3/envs/aligner/lib/python3.11/site-packages/click/core.py", line 1434, in invoke
    return ctx.invoke(self.callback, **ctx.params)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sam/anaconda3/envs/aligner/lib/python3.11/site-packages/click/core.py", line 783, in invoke
    return __callback(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sam/anaconda3/envs/aligner/lib/python3.11/site-packages/click/decorators.py", line 33, in new_func
    return f(get_current_context(), *args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/sam/anaconda3/envs/aligner/lib/python3.11/site-packages/montreal_forced_aligner/command_line/align.py", line 122, in align_corpus_cli
    aligner.align()
  File "/home/sam/anaconda3/envs/aligner/lib/python3.11/site-packages/montreal_forced_aligner/alignment/pretrained.py", line 333, in align
    self.setup()
  File "/home/sam/anaconda3/envs/aligner/lib/python3.11/site-packages/montreal_forced_aligner/alignment/pretrained.py", line 207, in setup
    self.load_corpus()
  File "/home/sam/anaconda3/envs/aligner/lib/python3.11/site-packages/montreal_forced_aligner/corpus/acoustic_corpus.py", line 1116, in load_corpus
    self.load_lexicon_compilers()
  File "/home/sam/anaconda3/envs/aligner/lib/python3.11/site-packages/montreal_forced_aligner/dictionary/multispeaker.py", line 1447, in load_lexicon_compilers
    dictionaries = session.get(Dictionary)
                   ^^^^^^^^^^^^^^^^^^^^^^^
TypeError: Session.get() missing 1 required positional argument: 'ident'

For Reproducing your issue Please fill out the following:

  1. Corpus structure
    • English
    • 1 speaker with 279 files
    • I am using txt files
  2. Dictionary
    • US_arpa
  3. Acoustic model
    • US_arpa

Log file

- command: /home/sam/anaconda3/envs/aligner/bin/mfa model download acoustic english_us_arpa
  date: 2024-03-05 16:19:46.770632
  exception: ''
  execution_time: 18.245046854019165
  exit_code: 0
  version: 3.0.1
- command: /home/sam/anaconda3/envs/aligner/bin/mfa model download dictionary english_us_arpa
  date: 2024-03-05 16:21:38.045616
  exception: ''
  execution_time: 4.093631267547607
  exit_code: 0
  version: 3.0.1
- command: /home/sam/anaconda3/envs/aligner/bin/mfa model inspect acoustic english_us_arpa
  date: 2024-03-05 16:22:09.838583
  exception: ''
  execution_time: 0.7588033676147461
  exit_code: 0
  version: 3.0.1
- command: /home/sam/anaconda3/envs/aligner/bin/mfa validate /home/sam/mfa_data/elsie
    english_us_arpa english_us_arpa
  date: 2024-03-05 16:31:04.708241
  exception: ''
  execution_time: 232.45965695381165
  exit_code: 0
  version: 3.0.1
- command: /home/sam/anaconda3/envs/aligner/bin/mfa align /home/sam/mfa_data/elsie
    english_us_arpa english_us_arpa /home/sam/mfa_data/elsie_aligned
  date: 2024-03-05 16:40:57.301183
  exception: ''
  execution_time: 1.239459753036499
  exit_code: 1
  version: 3.0.1
- command: /home/sam/anaconda3/envs/aligner/bin/mfa align /home/sam/mfa_data/elsie
    english_us_arpa english_us_arpa /home/sam/Documents/MFA/elsie_aligned
  date: 2024-03-05 16:51:06.922438
  exception: ''
  execution_time: 0.8616712093353271
  exit_code: 1
  version: 3.0.1
- command: /home/sam/anaconda3/envs/aligner/bin/mfa align /home/sam/mfa_data/elsie
    english_us_arpa /home/sam/Documents/MFA/elsie_aligned
  date: 2024-03-05 16:51:23.565267
  exception: ''
  execution_time: 0.07278680801391602
  exit_code: 2
  version: 3.0.1
- command: /home/sam/anaconda3/envs/aligner/bin/mfa align /home/sam/mfa_data/elsie
    english_us_arpa english_us_arpa /home/sam/Documents/MFA/elsie_aligned
  date: 2024-03-05 16:51:52.812604
  exception: ''
  execution_time: 1.157400369644165
  exit_code: 1
  version: 3.0.1
- command: /home/sam/anaconda3/envs/aligner/bin/mfa version
  date: 2024-03-05 16:55:32.197860
  exception: ''
  execution_time: 0.05886030197143555
  exit_code: 0
  version: 3.0.1

Desktop (please complete the following information):

Additional context Add any other context about the problem here.