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

montreal_forced_aligner.exceptions.DatabaseError: DatabaseError [BUG] #635

Closed Rookie-Chenfy closed 1 year ago

Rookie-Chenfy commented 1 year ago

General installation (Linux)

conda create -n aligner -c conda-forge montreal-forced-aligner

RUN

mfa train /corpus /mfa_dict.txt /mfa_outputs_tmp -t /mfa_tmp -o */mfa_model.zip --clean -j 32 --config_path /mfa_train_config.yaml

All folders have read and write permissions

mfa_train_config.yaml

beam: 10
retry_beam: 40

features:
  type: "mfcc"
  use_energy: false
  frame_shift: 10

training:
  - monophone:
      num_iterations: 40
      max_gaussians: 1000
      subset: 0
      boost_silence: 1.25

  - triphone:
      num_iterations: 35
      num_leaves: 2000
      max_gaussians: 10000
      cluster_threshold: -1
      subset: 0
      boost_silence: 1.25
      power: 0.25

  - lda:
      num_leaves: 2500
      max_gaussians: 15000
      subset: 0
      num_iterations: 35
      features:
          splice_left_context: 3
          splice_right_context: 3

  - sat:
      num_leaves: 2500
      max_gaussians: 15000
      power: 0.2
      silence_weight: 0.0
      fmllr_update_type: "diag"
      subset: 0
      features:
          lda: true

  - sat:
      num_leaves: 4200
      max_gaussians: 40000
      power: 0.2
      silence_weight: 0.0
      fmllr_update_type: "diag"
      subset: 0
      features:
          lda: true
          fmllr: true

ERROR

INFO     Training model...

 INFO     Completed training in 29752.11203455925 seconds!

 INFO     Saved model to xxx/mfa_outputs_tmp

 INFO     Done! Everything took 51291.616 seconds

 INFO     Stopping the global MFA database server...

 ERROR    pg_ctl stdout: waiting for server to shut down............................................................... failed

 ERROR    pg_ctl stderr: pg_ctl: server does not shut down

          HINT: The "-m fast" option immediately disconnects sessions rather than

          waiting for session-initiated disconnection.

Exception ignored in atexit callback: <function stop_server at 0x7f6ce32d0af0>
Traceback (most recent call last):
  File "anaconda3/envs/aligner/lib/python3.10/site-packages/montreal_forced_aligner/command_line/utils.py", line 470, in stop_server
    raise DatabaseError(
montreal_forced_aligner.exceptions.DatabaseError: DatabaseError:

There was an error encountered starting the global MFA database server, please see /Documents/MFA/pg_log_global.txt for more details and/or look at the logged errors above.

I don't know why the MFA is over just after the model is trained

Rookie-Chenfy commented 1 year ago

The parameter input of the version 2.2.10 is different from the version before 2.0.0

Moon-sung-woo commented 1 year ago

@Rookie-Chenfy Hi. I have same issue! could you explain how to solve it??

This is my line to training

mfa train raw_data lexicon.txt ./TextGrid --punctuation "#@$%^" --sample_frequency 22050 --low_frequency 0 high_frequency 8000

myaxxxxx commented 1 year ago

same error