Minor fix for transducer_emformer/streaming_feature_extractor.py

This commit is contained in:
yaozengwei 2022-04-22 11:23:23 +08:00
parent e97c9fbdbf
commit ece99a862b

View File

@ -66,7 +66,7 @@ class FeatureExtractionStream(object):
self.context_size = context_size
self.decoding_method = decoding_method
if decoding_method == "greedy_search":
self.hyp: List[int] = None
self.hyp: Optional[List[int]] = None
self.decoder_out: Optional[torch.Tensor] = None
elif decoding_method == "modified_beam_search":
self.hyps = HypothesisList()