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
download configuration.json
游雁831c48a886a5
diff --git a/funasr/download/download_from_hub.py b/funasr/download/download_from_hub.pyindex 9779050dd..57e8c412f 100644--- a/funasr/download/download_from_hub.py+++ b/funasr/download/download_from_hub.py@@ -22,6 +22,7 @@ def download_from_ms(**kwargs):config = os.path.join(model_or_path, "config.yaml")if os.path.exists(config) and os.path.exists(os.path.join(model_or_path, "model.pb")):+config = OmegaConf.load(config)kwargs = OmegaConf.merge(config, kwargs)init_param = os.path.join(model_or_path, "model.pb")@@ -39,8 +40,7 @@ def download_from_ms(**kwargs):kwargs["frontend_conf"]["cmvn_file"] = os.path.join(model_or_path, "am.mvn")if os.path.exists(os.path.join(model_or_path, "jieba_usr_dict")):kwargs["jieba_usr_dict"] = os.path.join(model_or_path, "jieba_usr_dict")- else:# configuration.json- assert os.path.exists(os.path.join(model_or_path, "configuration.json"))+ elif os.path.exists(os.path.join(model_or_path, "configuration.json")):with open(os.path.join(model_or_path, "configuration.json"), 'r', encoding='utf-8') as f:conf_json = json.load(f)cfg = {}diff --git a/funasr/models/bicif_paraformer/model.py b/funasr/models/bicif_paraformer/model.pyindex 49a41b2b7..318f1df9d 100644--- a/funasr/models/bicif_paraformer/model.py+++ b/funasr/models/bicif_paraformer/model.py@@ -1,14 +1,13 @@+#!/usr/bin/env python3+# -*- encoding: utf-8 -*-+# Copyright FunASR (https://github.com/alibaba-damo-academy/FunASR). All Rights Reserved.+# MIT License (https://opensource.org/licenses/MIT)import loggingfrom typing import Dictfrom typing import Listfrom typing import Optionalfrom typing import Tuple-from typing import Union-import tempfile-import codecs-import requests-import reimport copyimport torchimport torch.nn as nn