Kaldi Alignment Not Working (with Gentle Forced Aligner)

538 views
Skip to first unread message

Roman Scott

unread,
Jul 2, 2018, 11:57:21 AM7/2/18
to kaldi-help
Hello,

I am using this program called Gentle, which is a forced aligner which depends on Kaldi (https://github.com/lowerquality/gentle). I am running the latest version on a Mac. Gentle runs in two passes, and the first pass it does the alignment just fine, but often times in the second pass (the realignment phase), it gets to about half-way and then it stops processing. This seems to happen when, in the first pass, there are a lot of unaligned words (as the second pass is used to align unaligned words). Gentle is built on Python, but uses a C++ file to interface with the Kaldi program (k3.cc). There are no errors, but when it is aligning, k3 CPU usage is 100% in the background, but then it will drop to 0%. I think it might be a problem with the multipass.realign() function: (https://github.com/lowerquality/gentle/blob/master/gentle/multipass.py), standard_kaldi.py: (https://github.com/lowerquality/gentle/blob/master/gentle/standard_kaldi.py), or the k3.cc file itself: (https://github.com/lowerquality/gentle/blob/master/ext/k3.cc).

I think the issue is probably in the k3 file. The lines of code that handle the second pass (realignment phase) are 184-214. Could it be a problem in those lines that could cause Kaldi to fail?

Daniel Povey

unread,
Jul 2, 2018, 2:27:47 PM7/2/18
to kaldi-help
If it just hangs like that, you should at least try to figure out
where it is in the code, e.g. get a stack trace somehow. There is
nothing in Kaldi itself that would just hang. I'm not a big expert
on python debugging and how to get stack traces from it, though.
> --
> Go to http://kaldi-asr.org/forums.html find out how to join
> ---
> You received this message because you are subscribed to the Google Groups
> "kaldi-help" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to kaldi-help+...@googlegroups.com.
> To post to this group, send email to kaldi...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/kaldi-help/134ab1c9-937e-48fa-95eb-042690561c18%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

Roman Scott

unread,
Jul 2, 2018, 4:28:59 PM7/2/18
to kaldi-help
Dan,

I have tried debugging the Python program, but I have been unable to identify any cause that would be causing the k3 program to stop processing. Is there anything that could be wrong with the k3 C++ file itself? Is anyone here familiar with Python as well?

Daniel Galvez

unread,
Jul 2, 2018, 4:59:51 PM7/2/18
to kaldi-help
Probably no one here can help you diagnose this problem remotely. I'd maybe try out running the mac-equivalent of linux's strace (ftruss or somethng?) to find out what the program seems to be stalling on. If that is too hard to figure out, you could add some printf statements to the C++ code to try to isolate the lines which stall (if that really is the problem). By the way, to be clear, I'm not going to be able to help you out with this personally.

To unsubscribe from this group and stop receiving emails from it, send an email to kaldi-help+unsubscribe@googlegroups.com.

To post to this group, send email to kaldi...@googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Roman Scott

unread,
Jul 2, 2018, 5:31:10 PM7/2/18
to kaldi-help
I just wanted to ensure that there was no problem with the way the C++ code was written (the k3.cc file). I also do believe there might be someone here who might have experience with Gentle, as it is heavily tied with Kaldi.
Reply all
Reply to author
Forward
0 new messages