From 688f75295665f8babbfdfc228e4bc554a8ba32b8 Mon Sep 17 00:00:00 2001 From: Caroline Chen Date: Thu, 10 Mar 2022 15:31:57 -0800 Subject: [PATCH] Fix type for lm parameter in decoder (#2273) Summary: Pull Request resolved: https://github.com/pytorch/audio/pull/2273 Reviewed By: mthrok Differential Revision: D34799335 Pulled By: carolineechen fbshipit-source-id: d0eea79448efdbd84758a3f433ab9350b4c94e91 --- torchaudio/prototype/ctc_decoder/ctc_decoder.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/torchaudio/prototype/ctc_decoder/ctc_decoder.py b/torchaudio/prototype/ctc_decoder/ctc_decoder.py index 3c0bf1883d..567dcbe659 100644 --- a/torchaudio/prototype/ctc_decoder/ctc_decoder.py +++ b/torchaudio/prototype/ctc_decoder/ctc_decoder.py @@ -181,7 +181,7 @@ def idxs_to_tokens(self, idxs: torch.LongTensor) -> List: def lexicon_decoder( lexicon: str, tokens: Union[str, List[str]], - lm: str = None, + lm: Optional[str] = None, nbest: int = 1, beam_size: int = 50, beam_size_token: Optional[int] = None,