diff --git a/icefall/utils.py b/icefall/utils.py index da8c3b920..7b6ef1b8c 100644 --- a/icefall/utils.py +++ b/icefall/utils.py @@ -321,6 +321,17 @@ def get_alignments(best_paths: k2.Fsa, kind: str) -> List[List[int]]: Returns a list of lists of int, containing the token sequences we decoded. For `ans[i]`, its length equals to the number of frames after subsampling of the i-th utterance in the batch. + + Example: + When `kind` is `labels`, one possible alignment example is (with + repeats):: + + c c c blk a a blk blk t t t blk blk + + If `kind` is `aux_labels`, the above example changes to:: + + c blk blk blk a blk blk blk t blk blk blk blk + """ assert kind in ("labels", "aux_labels") # arc.shape() has axes [fsa][state][arc], we remove "state"-axis here diff --git a/test/test_ali.py b/test/test_ali.py index 69dd82ab2..b107a6d80 100755 --- a/test/test_ali.py +++ b/test/test_ali.py @@ -82,7 +82,6 @@ def test(): print(aux_labels_alignment) print(labels_alignment_length) print(aux_labels_alignment_length) - # print(cuts) break