Minor fixes.

This commit is contained in:
Fangjun Kuang 2021-11-24 14:46:23 +08:00
parent c17527433d
commit ad8a290047
2 changed files with 11 additions and 1 deletions

View File

@ -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

View File

@ -82,7 +82,6 @@ def test():
print(aux_labels_alignment)
print(labels_alignment_length)
print(aux_labels_alignment_length)
# print(cuts)
break