Montreal-Forced-Aligner icon indicating copy to clipboard operation
Montreal-Forced-Aligner copied to clipboard

error occur when change the position_dependent_phones to False

Open yuzuda283 opened this issue 2 years ago • 3 comments

the issues is that because of the special scenario , I only have labs with phoneme information and the dictionary i used is phoneme to phoneme format, for example , AH0 AH0\n A A\n B B , when i used the default parameter , everything is cool, but after i turn off the position_dependent_phones to False, error happens, I think if use the phoneme to phoneme format dictionary the position information should be useless, so i want to turn it off. the error is happened when using kaldi function "lattice-align-words", does someone have the idea how to deal with it?

yuzuda283 avatar Feb 24 '22 07:02 yuzuda283

change the "lattice-align-words" to "lattice-align-words-lexicon" make the programme run but results does't good, someone has better solutions?

yuzuda283 avatar Feb 24 '22 07:02 yuzuda283

Hmm, yeah this isn't well tested, but I would recommend leaving the position_dependent_phones, turned on. I haven't found a case to turn it off (and MFA strips the position information at the end, so it should only be Kaldi internal), but if you have a use case, let me know in more detail and I can see about getting it to work better.

mmcauliffe avatar Feb 27 '22 16:02 mmcauliffe

Very thanks for reply. i do some experiment on default setting that open the position , the result is even worse than HTK toolkit. In fact, on older versions of kaldi, position_dependent_phones is turned off by default,in the past people used the command "lattice-align-words-lexicon" to convert lattices

     "words (i.e. aligned with word boundaries).  This is the newest form, that\n"
     "reads in a lexicon in integer format, where each line is (integer id of)\n"
     " word-in word-out phone1 phone2 ... phoneN\n"
     "(note: word-in is word before alignment, word-out is after, e.g. for replacing\n"
     "<eps> with SIL or vice versa)\n"
     "This may be more efficient if you first apply 'lattice-push'.\n"
     "Usage: lattice-align-words-lexicon [options] <lexicon-file> <model> <lattice-rspecifier> <lattice-wspecifier>\n"
     " e.g.: lattice-align-words-lexicon  --partial-word-label=4324 --max-expand 10.0 --test true \\\n"
     "   data/lang/phones/align_lexicon.int final.mdl ark:1.lats ark:aligned.lats\n"
     "See also: lattice-align-words, which is only applicable if your phones have word-position\n"
     "markers, i.e. each phone comes in 5 versions like AA_B, AA_I, AA_W, AA_S, AA.\n";

so what i do is just close the position, create the align-words-lexicon.int which used to be a function in ealier version(2.0.0rb), and change the commond "lattice-align-words" to 'lattice-align-words-lexicon', because in my situation, all the words only have one phoneme, position information is useless, at last 4000 labs generated only 2000 Textgrid, I have tried many kinds of beams,but it still doesn't solve the problem. the problem is "aligned 0 lattices, 3996 had errors" in get_phone_ctm.0.log. Any idea for adjustment?

yuzuda283 avatar Mar 11 '22 03:03 yuzuda283