diff --git a/egs/librispeech/ASR/zipformer/ctc_decode.py b/egs/librispeech/ASR/zipformer/ctc_decode.py index 156989b780..fe9347b95a 100755 --- a/egs/librispeech/ASR/zipformer/ctc_decode.py +++ b/egs/librispeech/ASR/zipformer/ctc_decode.py @@ -130,9 +130,7 @@ find_checkpoints, load_checkpoint, ) - from icefall.context_graph import ContextGraph, ContextState - from icefall.decode import ( ctc_greedy_search, ctc_prefix_beam_search, @@ -147,11 +145,9 @@ rescore_with_n_best_list, rescore_with_whole_lattice, ) - -from icefall.ngram_lm import NgramLm, NgramLmStateCost from icefall.lexicon import Lexicon from icefall.lm_wrapper import LmScorer - +from icefall.ngram_lm import NgramLm, NgramLmStateCost from icefall.utils import ( AttributeDict, get_texts, diff --git a/icefall/decode.py b/icefall/decode.py index 5f90ee168c..5d836bd480 100644 --- a/icefall/decode.py +++ b/icefall/decode.py @@ -24,8 +24,8 @@ import torch from icefall.context_graph import ContextGraph, ContextState -from icefall.ngram_lm import NgramLm, NgramLmStateCost from icefall.lm_wrapper import LmScorer +from icefall.ngram_lm import NgramLm, NgramLmStateCost from icefall.utils import add_eos, add_sos, get_texts DEFAULT_LM_SCALE = [