MontrealCorpusTools / Montreal-Forced-Aligner

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

why results of "mfa align" is texts not phonemes? #740

Closed Xwmiss closed 7 months ago

Xwmiss commented 8 months ago

Thanks for your work first!

When I am using mfa to get results from japanese, I find that results in TextGrid is texts, like below: image

While I need is the align results is for the phonemes in the dictionary, like below: image

Could you tell me how to fix this?

Thank you again.

Xwmiss commented 8 months ago

and in the part2 is only the "spn" image

Daisyqk commented 8 months ago

Have you solved it? I come across the same problem.

Xwmiss commented 8 months ago

Have you solved it? I come across the same problem.

I fix it by run g2p first to get the new dictionary, and then use this new dictionary to align all datas.

mmcauliffe commented 7 months ago

If you're using a model before 3.0, you'll have to run tokenization on the corpus first, since Japanese text does not contain spaces typically: https://montreal-forced-aligner.readthedocs.io/en/latest/user_guide/corpus_creation/tokenize.html with https://mfa-models.readthedocs.io/en/latest/tokenizer/Japanese/Japanese%20tokenizer%20v2_2_1.html#Japanese%20tokenizer%20v2_2_1.

If you update to MFA 3.0 and download the latest Japanese models, they use third party tokenizers automatically.

  1. mfa model download acoustic japanese_mfa --ignore_cache
  2. mfa model download dictionary japanese_mfa --ignore_cache
  3. conda install -c conda-forge spacy sudachipy sudachidict-core
  4. Re-run the alignment command