Commit ceee17c
committed
Fix ef boundary handling in state_align_search
prune_hmms used nf > ef[i] to gate frame advancement, where ef[i]
is the exclusive end frame (start + duration). This allowed a phone
to advance to ef[i] and be scored there, one frame past its window.
phone_transition used hmm_frame(hmm) != nf to decide whether to
fire, which meant only phones advanced by prune_hmms could
transition. Phones stopped at the ef boundary had hmm_frame ==
frame_idx rather than nf, so the check silently suppressed
transitions. In practice this meant the last phone of a word could
not enter the first phone of the following word, causing two-pass
alignment to fail to reach the final state.
Change the prune gate to nf >= ef[i] so a phone's last active frame
is ef[i]-1. Change the transition condition to hmm_frame(hmm) <
frame_idx so any phone active this frame can fire, whether or not it
was advanced by prune.1 parent 850a642 commit ceee17c
1 file changed
Lines changed: 17 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
94 | 94 | | |
95 | 95 | | |
96 | 96 | | |
97 | | - | |
98 | | - | |
99 | | - | |
100 | | - | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
101 | 103 | | |
102 | 104 | | |
103 | 105 | | |
| |||
114 | 116 | | |
115 | 117 | | |
116 | 118 | | |
117 | | - | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
118 | 126 | | |
119 | 127 | | |
120 | 128 | | |
| |||
123 | 131 | | |
124 | 132 | | |
125 | 133 | | |
| 134 | + | |
126 | 135 | | |
127 | 136 | | |
128 | 137 | | |
| 138 | + | |
| 139 | + | |
129 | 140 | | |
130 | 141 | | |
131 | 142 | | |
| |||
461 | 472 | | |
462 | 473 | | |
463 | 474 | | |
464 | | - | |
| 475 | + | |
465 | 476 | | |
466 | 477 | | |
467 | 478 | | |
| |||
0 commit comments