From 968e4a66097d9e14c1d0f3cc0016ec37b682a1b3 Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Mon, 13 Sep 2021 20:55:26 +0800 Subject: [PATCH] Fix an error. Nbest.fsa should always have token IDs as labels and word IDs as aux_labels. --- icefall/decode2.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/icefall/decode2.py b/icefall/decode2.py index 428125959..e49d0871a 100644 --- a/icefall/decode2.py +++ b/icefall/decode2.py @@ -202,7 +202,8 @@ class Nbest(object): path_lattice, use_double_scores=use_double_scores ) - one_best = k2.remove_epsilon(one_best) + one_best = k2.invert(one_best) + # Now one_best has token IDs as labels and word IDs as aux_labels return Nbest(fsa=one_best, shape=self.shape)