Open-source speech recognition toolkit for training, inference, streaming ASR, VAD, punctuation, speaker diarization pipelines, and OpenAI-compatible/MCP serving.
Python asraudiochineseemotion-recognitionfunasrmcp-servermultilingual-asropenai-compatible-apiparaformerpunctuationpytorchreal-time-asrspeaker-diarizationspeech-recognitionspeech-to-textstreaming-asrtranscriptionvllmvoice-activity-detectionwhisper-alternative
fix(utils): remove distutils boolean parser
Ting Zhang2230a8221718
diff --git a/funasr/utils/type_utils.py b/funasr/utils/type_utils.pyindex 0731e46f8..d1d4bae05 100644--- a/funasr/utils/type_utils.py+++ b/funasr/utils/type_utils.py@@ -1,4 +1,3 @@-from distutils.util import strtoboolfrom typing import Optionalfrom typing import Tuplefrom typing import Union@@ -15,7 +14,12 @@ def str2bool(value: str) -> bool:Args:value: TODO."""- return bool(strtobool(value))+ normalized = value.lower()+ if normalized in ("y", "yes", "t", "true", "on", "1"):+ return True+ if normalized in ("n", "no", "f", "false", "off", "0"):+ return False+ raise ValueError(f"invalid truth value {value!r}")def remove_parenthesis(value: str):