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
docs
游雁74aa12ee4bbe
diff --git a/funasr/bin/asr_inference_launch.py b/funasr/bin/asr_inference_launch.pyindex cdaaefc30..ea0f221f3 100644--- a/funasr/bin/asr_inference_launch.py+++ b/funasr/bin/asr_inference_launch.py@@ -45,7 +45,7 @@ from funasr.utils.types import str2boolfrom funasr.utils.types import str2triple_strfrom funasr.utils.types import str_or_nonefrom funasr.utils.vad_utils import slice_padding_fbank-+from tqdm import tqdmdef inference_asr(maxlenratio: float,@@ -651,7 +651,8 @@ def inference_paraformer_vad_punc(batch_size_token_ms_cum = 0beg_idx = 0- for j, _ in enumerate(range(0, n)):+ beg_asr_total = time.time()+ for j, _ in tqdm(enumerate(range(0, n))):batch_size_token_ms_cum += (sorted_data[j][0][1] - sorted_data[j][0][0])if j < n - 1 and (batch_size_token_ms_cum + sorted_data[j + 1][0][1] - sorted_data[j + 1][0][0]) < batch_size_token_ms and (sorted_data[j + 1][0][1] - sorted_data[j + 1][0][0]) < batch_size_token_threshold_s:continue@@ -661,16 +662,17 @@ def inference_paraformer_vad_punc(beg_idx = end_idxbatch = {"speech": speech_j, "speech_lengths": speech_lengths_j}batch = to_device(batch, device=device)- print("batch: ", speech_j.shape[0])+ # print("batch: ", speech_j.shape[0])beg_asr = time.time()results = speech2text(**batch)end_asr = time.time()- print("time cost asr: ", end_asr - beg_asr)+ # print("time cost asr: ", end_asr - beg_asr)if len(results) < 1:results = [["", [], [], [], [], [], []]]results_sorted.extend(results)-+ end_asr_total = time.time()+ print("total time cost asr: ", end_asr_total-beg_asr_total)restored_data = [0] * nfor j in range(n):index = sorted_data[j][1]diff --git a/funasr/quick_start.md b/funasr/quick_start.mdindex 5731358f8..202c709ec 100644--- a/funasr/quick_start.md+++ b/funasr/quick_start.md@@ -26,7 +26,7 @@ python funasr_wss_server.py --port 10095python funasr_wss_client.py --host "127.0.0.1" --port 10095 --mode 2pass --chunk_size "5,10,5"```-For more examples, please refer to [docs](https://alibaba-damo-academy.github.io/FunASR/en/runtime/websocket_python.html#id2).+For more examples, please refer to [docs](runtime/python/websocket/README.md).### C++ version Examplediff --git a/funasr/quick_start_zh.md b/funasr/quick_start_zh.mdindex 9da3cdcb5..a8d20a22f 100644--- a/funasr/quick_start_zh.md+++ b/funasr/quick_start_zh.md@@ -26,7 +26,7 @@ python funasr_wss_server.py --port 10095python funasr_wss_client.py --host "127.0.0.1" --port 10095 --mode 2pass --chunk_size "5,10,5"#python funasr_wss_client.py --host "127.0.0.1" --port 10095 --mode 2pass --chunk_size "8,8,4" --audio_in "./data/wav.scp"```-更多例子可以参考([点击此处](runtime/websocket_python.html#id2))+更多例子可以参考([点击此处](runtime/python/websocket/README.md))<a name="cpp版本示例"></a>#### c++版本示例diff --git a/funasr/version.txt b/funasr/version.txtindex c00621855..879be8a98 100644--- a/funasr/version.txt+++ b/funasr/version.txt@@ -1 +1 @@-0.7.6+0.7.7diff --git a/setup.py b/setup.pyindex 84f2140cc..ac2a76c29 100644--- a/setup.py+++ b/setup.py@@ -39,6 +39,7 @@ requirements = {"edit-distance","textgrid","protobuf",+ "tqdm",],# train: The modules invoked when training only."train": [