mirror of
https://github.com/k2-fsa/icefall.git
synced 2025-08-11 11:02:29 +00:00
Update egs/himia/wuw/ctc_tdnn/graph.py
Co-authored-by: Fangjun Kuang <csukuangfj@gmail.com>
This commit is contained in:
parent
f17b0e8035
commit
0fb43289f4
@ -40,8 +40,7 @@ def ctc_trivial_decoding_graph(wakeup_word_tokens: List[int]) -> str:
|
|||||||
for non_wake_word_token in range(keyword_ilabel_start):
|
for non_wake_word_token in range(keyword_ilabel_start):
|
||||||
fst_graph += f"0 0 {non_wake_word_token} 0\n"
|
fst_graph += f"0 0 {non_wake_word_token} 0\n"
|
||||||
cur_state = 1
|
cur_state = 1
|
||||||
for token_idx in range(len(wakeup_word_tokens) - 1):
|
for token in wakeup_word_tokens[:-1]:
|
||||||
token = wakeup_word_tokens[token_idx]
|
|
||||||
fst_graph += f"{cur_state - 1} {cur_state} {token} 0\n"
|
fst_graph += f"{cur_state - 1} {cur_state} {token} 0\n"
|
||||||
fst_graph += f"{cur_state} {cur_state} {token} 0\n"
|
fst_graph += f"{cur_state} {cur_state} {token} 0\n"
|
||||||
cur_state += 1
|
cur_state += 1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user