Commit 3b75b74f authored by moto's avatar moto Committed by Facebook GitHub Bot
Browse files

Update CTCDecoder static build deprecation message (#3089)

Summary:
1. Fix spacing.
2. Move it to after successful import
3. Add link to the announcement issue

Pull Request resolved: https://github.com/pytorch/audio/pull/3089

Reviewed By: nateanl, xiaohui-zhang

Differential Revision: D43514075

Pulled By: mthrok

fbshipit-source-id: 3b2a24c65c63dab8c12c9c6aa1942a8354b2c0f1
parent b0155938
......@@ -39,10 +39,6 @@ if torchaudio._internal.module_utils.is_module_available("flashlight"):
except Exception:
_KenLM = None
else:
warnings.warn(
"The built-in flashlight integration is deprecated, and will be removed in future release."
"Please install flashlight-text. https://pypi.org/project/flashlight-text/"
)
torchaudio._extension._load_lib("libflashlight-text")
from torchaudio.lib.flashlight_lib_text_decoder import (
CriterionType as _CriterionType,
......@@ -63,6 +59,12 @@ else:
load_words as _load_words,
)
warnings.warn(
"The built-in flashlight integration is deprecated, and will be removed in future release. "
"Please install flashlight-text. https://pypi.org/project/flashlight-text/ "
"For the detail of CTC decoder migration, please see https://github.com/pytorch/audio/issues/3088."
)
__all__ = [
"CTCHypothesis",
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment