Making sense of show-alignments using shot-transitions

242 views
Skip to first unread message

Kaldi_new_uSER

unread,
Nov 23, 2017, 4:56:25 AM11/23/17
to kaldi-help
While running Librispeech training script, I am looking at 0.mdl and the alignment files created initially.

Then I do 
show-alignments data/lang_nosp/phones.txt exp/mono/0.mdl ark,t:align.1.ali > 1

For the first line in output I see
103-1240-0015  [ 4 1 16 15 18 17 ] [ 1118 1117 1120 1119 1122 1121 ] ...  

In order to understand which transitions are [ 4 1 16 15 18 17 ] referring to, I run following command

show-transitions data/lang_nosp/phones.txt exp/mono/0.mdl > 2

Inside 2 I find following information 

Transition-state 1: phone = SIL hmm-state = 0 pdf = 0
 Transition-id = 1 p = 0.25 [self-loop]
 Transition-id = 2 p = 0.25 [0 -> 1]
 Transition-id = 3 p = 0.25 [0 -> 2]
 Transition-id = 4 p = 0.25 [0 -> 3]
Transition-state 2: phone = SIL hmm-state = 1 pdf = 1
 Transition-id = 5 p = 0.25 [self-loop]
 Transition-id = 6 p = 0.25 [1 -> 2]
 Transition-id = 7 p = 0.25 [1 -> 3]
 Transition-id = 8 p = 0.25 [1 -> 4]
Transition-state 3: phone = SIL hmm-state = 2 pdf = 2
 Transition-id = 9 p = 0.25 [2 -> 1]
 Transition-id = 10 p = 0.25 [self-loop]
 Transition-id = 11 p = 0.25 [2 -> 3]
 Transition-id = 12 p = 0.25 [2 -> 4]
Transition-state 4: phone = SIL hmm-state = 3 pdf = 3
 Transition-id = 13 p = 0.25 [3 -> 1]
 Transition-id = 14 p = 0.25 [3 -> 2]
 Transition-id = 15 p = 0.25 [self-loop]
 Transition-id = 16 p = 0.25 [3 -> 4]
Transition-state 5: phone = SIL hmm-state = 4 pdf = 4
 Transition-id = 17 p = 0.75 [self-loop]
 Transition-id = 18 p = 0.25 [4 -> 5]

That means, [ 4 1 16 15 18 17 ] translates to following transitions within HMM states of SIL

[0 -> 3] [0 -> 0] [3 -> 4] [3 -> 4] [4 -> 5] [4 -> 4]

I am confused by these transitions. If first transition is 0 -> 3 then next transition must start at 3, rather than 0! Please help me understand.  

Daniel Povey

unread,
Nov 23, 2017, 12:57:07 PM11/23/17
to kaldi-help
It had to do with 'reordering', and the option 'reorder=true'.  You can use these as search terms, there is documentation about it.
We should never have designed it this way, we should have used an arc-based formalism that would be more compatible with FSTs, and not the standard state-based one.  But it would require a redesign of too many things to fix this now.

Dan


--
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+unsubscribe@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/0d219440-d0a8-4a76-a791-8c3f4cb69a9a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Kaldi_new_uSER

unread,
Nov 23, 2017, 8:03:58 PM11/23/17
to kaldi-help
Thanks, I got it.

So the actual transitions are

[0 -> 0] [0 -> 3] [3 -> 3] [3 -> 4] [4 -> 4] [4 -> 5]
To unsubscribe from this group and stop receiving emails from it, send an email to kaldi-help+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages