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
bugfix
游雁90bc3ad02eee
diff --git a/examples/industrial_data_pretraining/paraformer/finetune.sh b/examples/industrial_data_pretraining/paraformer/finetune.shindex 25d9e1a98..fe511ff25 100644--- a/examples/industrial_data_pretraining/paraformer/finetune.sh+++ b/examples/industrial_data_pretraining/paraformer/finetune.sh@@ -10,7 +10,7 @@ gpu_num=$(echo $CUDA_VISIBLE_DEVICES | awk -F "," '{print NF}')## option 1, download model automaticallymodel_name_or_model_dir="iic/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch"-+model_name_or_model_dir="iic/speech_paraformer-large_asr_nat-zh-cn-16k-common-vocab8404-pytorch"## option 2, download model by git#local_path_root=${workspace}/modelscope_modelsdiff --git a/funasr/models/sense_voice/model.py b/funasr/models/sense_voice/model.pyindex f8c11778f..242664bee 100644--- a/funasr/models/sense_voice/model.py+++ b/funasr/models/sense_voice/model.py@@ -96,9 +96,9 @@ class SenseVoice(nn.Module):options = whisper.DecodingOptions(**DecodingOptions)result = whisper.decode(self.model, speech, options)-+ text = f"{result.text}\n"results = []- result_i = {"key": key[0], "text": result.text}+ result_i = {"key": key[0], "text": text}results.append(result_i)diff --git a/funasr/tokenizer/char_tokenizer.py b/funasr/tokenizer/char_tokenizer.pyindex 2efc0b056..92c6e677b 100644--- a/funasr/tokenizer/char_tokenizer.py+++ b/funasr/tokenizer/char_tokenizer.py@@ -93,7 +93,8 @@ def load_seg_dict(seg_dict_file):return seg_dictdef seg_tokenize(txt, seg_dict):- pattern = re.compile(r'^[\u4E00-\u9FA50-9]+$')+ # pattern = re.compile(r'^[\u4E00-\u9FA50-9]+$')+ pattern = re.compile(r"([\u4E00-\u9FA5A-Za-z0-9])")out_txt = ""for word in txt:word = word.lower()