Skip to content

Commit 3a5fa06

Browse files
authored
chore: release FunASR 1.3.27 (#3403)
1 parent e0fbedf commit 3a5fa06

8 files changed

Lines changed: 73 additions & 5 deletions

File tree

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,7 @@ asset is published.
321321

322322
## What's new
323323

324+
- 2026/07/24: **v1.3.27 on PyPI** — the OpenAI-compatible server now reports detected SenseVoice language metadata in `verbose_json` and reuses the cached Fun-ASR-Nano `AutoModel` after vLLM fallback. When vLLM/VAD setup and its fallback both fail, half-initialized engine state is cleared so a later request can retry. Install with `python -m pip install -U "funasr==1.3.27"`. [Release ->](https://github.com/modelscope/FunASR/releases/tag/v1.3.27)
324325
- 2026/07/23: **llama.cpp runtime v0.1.9** — adds `funasr-llamacpp-windows-x64-vulkan.zip` for standalone SenseVoiceSmall Vulkan inference on Windows with AMD, Intel, or NVIDIA drivers. Linux Vulkan, Windows CUDA, CPU/AVX2, Linux arm64, and macOS arm64 assets remain available. [Release ->](https://github.com/modelscope/FunASR/releases/tag/runtime-llamacpp-v0.1.9)
325326
- 2026/07/23: **v1.3.26 on PyPI**`funasr-server --model fun-asr-nano --hub ms` now honors the requested ModelScope hub for the default Fun-ASR-Nano model in both the vLLM path and the AutoModel fallback, avoiding unintended Hugging Face downloads when users choose ModelScope. Install with `python -m pip install -U "funasr==1.3.26"`. [Release ->](https://github.com/modelscope/FunASR/releases/tag/v1.3.26)
326327
- 2026/07/23: **v1.3.25 on PyPI** — realtime WebSocket users can now use deterministic final-text hotword corrections with `POSTPROCESS_HOTWORDS:wrong=>right` or `--postprocess-hotword-file`, keeping fixed-name cleanup separate from model-level `HOTWORDS:` decoding bias. The source-tree realtime entrypoint also works without preinstalling the package. Install with `python -m pip install -U "funasr==1.3.25"`. [Release ->](https://github.com/modelscope/FunASR/releases/tag/v1.3.25)

README_ja.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ Whisper は単一モデルですが、**FunASR はツールキット**です—
9999

100100
## 最新情報
101101

102+
- 2026/07/24:**v1.3.27 が PyPI に公開** — OpenAI 互換サーバーが `verbose_json` で SenseVoice の検出言語を返し、vLLM fallback 後はキャッシュ済み Fun-ASR-Nano `AutoModel` を再利用します。vLLM/VAD 初期化と fallback の両方が失敗した場合は、半初期化状態を残さず、後続リクエストで再試行できます。インストール:`python -m pip install -U "funasr==1.3.27"`[Release →](https://github.com/modelscope/FunASR/releases/tag/v1.3.27)
102103
- 2026/07/23:**v1.3.26 が PyPI に公開**`funasr-server --model fun-asr-nano --hub ms` は ModelScope hub 指定を vLLM 経路と AutoModel fallback の両方で尊重します。インストール:`python -m pip install -U "funasr==1.3.26"`[Release →](https://github.com/modelscope/FunASR/releases/tag/v1.3.26)
103104
- 2026/07/23:**llama.cpp runtime v0.1.9** — Windows Vulkan 向け `funasr-llamacpp-windows-x64-vulkan.zip` を追加。現在の AMD、Intel、NVIDIA Vulkan ドライバーで SenseVoiceSmall を単独実行できます。Linux Vulkan、Windows CUDA、CPU/AVX2、Linux arm64、macOS arm64 も引き続き提供します。[Release →](https://github.com/modelscope/FunASR/releases/tag/runtime-llamacpp-v0.1.9)
104105
- 2026/07/22:**llama.cpp runtime v0.1.8** — Linux Vulkan tarball と Windows CUDA zip を含む CPU/エッジ向け GGUF ランタイム。ダウンロードと手順:[funasr.com/llama-cpp](https://www.funasr.com/llama-cpp.html) · [Release →](https://github.com/modelscope/FunASR/releases/tag/runtime-llamacpp-v0.1.8)

README_ko.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -99,6 +99,7 @@ Whisper는 단일 모델이지만, **FunASR는 툴킷**입니다. 용도에 맞
9999

100100
## 최신 소식
101101

102+
- 2026/07/24: **v1.3.27 PyPI 공개** — OpenAI 호환 서버가 `verbose_json`에 SenseVoice 감지 언어를 반환하고, vLLM fallback 후에는 캐시된 Fun-ASR-Nano `AutoModel`을 재사용합니다. vLLM/VAD 초기화와 fallback이 모두 실패하면 반쯤 초기화된 상태를 남기지 않아 이후 요청에서 다시 시도할 수 있습니다. 설치: `python -m pip install -U "funasr==1.3.27"`. [Release →](https://github.com/modelscope/FunASR/releases/tag/v1.3.27)
102103
- 2026/07/23: **v1.3.26 PyPI 공개**`funasr-server --model fun-asr-nano --hub ms`가 vLLM 경로와 AutoModel fallback 모두에서 ModelScope hub 선택을 존중합니다. 설치: `python -m pip install -U "funasr==1.3.26"`. [Release →](https://github.com/modelscope/FunASR/releases/tag/v1.3.26)
103104
- 2026/07/23: **llama.cpp runtime v0.1.9** — Windows Vulkan용 `funasr-llamacpp-windows-x64-vulkan.zip`을 추가했습니다. 최신 AMD, Intel 또는 NVIDIA Vulkan 드라이버에서 SenseVoiceSmall을 독립 실행할 수 있습니다. Linux Vulkan, Windows CUDA, CPU/AVX2, Linux arm64, macOS arm64 패키지도 계속 제공합니다. [Release →](https://github.com/modelscope/FunASR/releases/tag/runtime-llamacpp-v0.1.9)
104105
- 2026/07/22: **llama.cpp runtime v0.1.8** — Linux Vulkan tarball과 Windows CUDA zip을 포함한 CPU/엣지용 GGUF 런타임입니다. 다운로드와 빠른 시작: [funasr.com/llama-cpp](https://www.funasr.com/llama-cpp.html) · [Release →](https://github.com/modelscope/FunASR/releases/tag/runtime-llamacpp-v0.1.8)

README_zh.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,7 @@ Whisper 是单个模型,**FunASR 是一个工具箱**——按场景挑模型
147147

148148
## 最新动态
149149

150+
- 2026/07/24:**v1.3.27 已发布到 PyPI** — OpenAI 兼容服务现在会在 `verbose_json` 中返回 SenseVoice 检测到的语言,并在 vLLM 降级后复用已缓存的 Fun-ASR-Nano `AutoModel`。当 vLLM/VAD 初始化及其 fallback 均失败时,不会残留半初始化的 engine 状态,后续请求可以重试。安装命令:`python -m pip install -U "funasr==1.3.27"`[发布页 →](https://github.com/modelscope/FunASR/releases/tag/v1.3.27)
150151
- 2026/07/23:**llama.cpp runtime v0.1.9** — 新增独立的 Windows Vulkan 包 `funasr-llamacpp-windows-x64-vulkan.zip`,支持在安装当前 AMD、Intel 或 NVIDIA Vulkan 驱动的 Windows 机器上运行 SenseVoiceSmall;Linux Vulkan、Windows CUDA、CPU/AVX2、Linux arm64 和 macOS arm64 包继续提供。[发布页 →](https://github.com/modelscope/FunASR/releases/tag/runtime-llamacpp-v0.1.9)
151152
- 2026/07/23:**v1.3.26 已发布到 PyPI**`funasr-server --model fun-asr-nano --hub ms` 现在会在默认 Fun-ASR-Nano 的 vLLM 路径和 AutoModel fallback 路径中都尊重 ModelScope hub 选择,避免用户指定 ModelScope 时仍误走 Hugging Face 下载。安装命令:`python -m pip install -U "funasr==1.3.26"`[发布页 →](https://github.com/modelscope/FunASR/releases/tag/v1.3.26)
152153
- 2026/07/23:**v1.3.25 已发布到 PyPI** — 实时 WebSocket 服务新增 `POSTPROCESS_HOTWORDS:错词=>正确词``--postprocess-hotword-file`,可在 final 文本阶段做确定性热词纠正,避免把固定错词修正误用成模型层 `HOTWORDS:` 解码偏置;源码目录下的实时服务入口也可直接运行。安装命令:`python -m pip install -U "funasr==1.3.25"`[发布页 →](https://github.com/modelscope/FunASR/releases/tag/v1.3.25)

funasr/bin/_server_app.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
import time
1111
import logging
1212
import tempfile
13+
from pathlib import Path
1314
from typing import Optional
1415

1516
import numpy as np
@@ -26,6 +27,9 @@
2627
logger = logging.getLogger("funasr.server")
2728

2829

30+
PACKAGE_VERSION = (Path(__file__).resolve().parents[1] / "version.txt").read_text().strip()
31+
32+
2933
_LANGUAGE_TAG_RE = re.compile(r"<\|(zh|en|yue|ja|ko)\|>")
3034

3135

@@ -126,7 +130,7 @@ def create_app(device: str = "cuda", preload_model: str = "auto", model_path: st
126130
if preload_model == "auto":
127131
preload_model = "fun-asr-nano" if device.startswith("cuda") else "sensevoice"
128132

129-
app = FastAPI(title="FunASR Server", version="1.3.6")
133+
app = FastAPI(title="FunASR Server", version=PACKAGE_VERSION)
130134
app.state.device = device
131135
app.state.engine = None
132136
app.state.vad_model = None

funasr/bin/server.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,14 @@
1111

1212
import argparse
1313
import sys
14+
from pathlib import Path
15+
16+
17+
PACKAGE_VERSION = (Path(__file__).resolve().parents[1] / "version.txt").read_text().strip()
18+
19+
20+
def server_version_label():
21+
return f"FunASR Server v{PACKAGE_VERSION}"
1422

1523

1624
def main():
@@ -58,7 +66,7 @@ def main():
5866
app = create_app(device=args.device, preload_model=args.model, model_path=args.model_path, hub=args.hub)
5967

6068
print(f"╔══════════════════════════════════════════════╗")
61-
print(f"║ FunASR Server v1.3.6 ║")
69+
print(f"║ {server_version_label():<44}║")
6270
print(f"║ Device: {args.device:<8} ║")
6371
print(f"║ Model: {args.model:<12} ║")
6472
if args.model_path:

funasr/version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.3.26
1+
1.3.27

tests/test_server_app_openai_segments.py

Lines changed: 54 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,15 @@
99

1010
REPO_ROOT = Path(__file__).resolve().parents[1]
1111
SERVICE_PATH = REPO_ROOT / "funasr" / "bin" / "_server_app.py"
12+
SERVER_CLI_PATH = REPO_ROOT / "funasr" / "bin" / "server.py"
1213

1314

1415
def load_server_app(monkeypatch):
1516
class DummyFastAPI:
1617
def __init__(self, *args, **kwargs):
1718
self.state = types.SimpleNamespace()
1819
self.routes = {}
20+
self.metadata = kwargs
1921

2022
def post(self, path, *args, **kwargs):
2123
def decorator(func):
@@ -53,7 +55,17 @@ def decorator(func):
5355
return module
5456

5557

56-
def install_dummy_funasr(monkeypatch, fail_once_for_models=()):
58+
def load_server_cli():
59+
module_name = "funasr_server_cli_under_test"
60+
sys.modules.pop(module_name, None)
61+
spec = importlib.util.spec_from_file_location(module_name, SERVER_CLI_PATH)
62+
module = importlib.util.module_from_spec(spec)
63+
assert spec.loader is not None
64+
spec.loader.exec_module(module)
65+
return module
66+
67+
68+
def install_dummy_funasr(monkeypatch, fail_once_for_models=(), generated_text="transcript"):
5769
remaining_failures = {model: 1 for model in fail_once_for_models}
5870

5971
class DummyAutoModel:
@@ -72,7 +84,7 @@ def __init__(self, **kwargs):
7284
def generate(self, **kwargs):
7385
if self.kwargs.get("model") == "fsmn-vad":
7486
return [{"value": [[0, 1000]]}]
75-
return [{"text": "transcript"}]
87+
return [{"text": generated_text}]
7688

7789
funasr_stub = types.ModuleType("funasr")
7890
funasr_stub.AutoModel = DummyAutoModel
@@ -174,6 +186,46 @@ def test_resolve_transcription_language_does_not_default_to_chinese(monkeypatch)
174186
assert module.resolve_transcription_language(None, {}) != "zh"
175187

176188

189+
def test_verbose_json_reports_sensevoice_detected_language(monkeypatch):
190+
module = load_server_app(monkeypatch)
191+
install_dummy_funasr(
192+
monkeypatch,
193+
generated_text="<|en|><|NEUTRAL|><|Speech|>hello",
194+
)
195+
monkeypatch.setattr(module.sf, "info", lambda path: types.SimpleNamespace(duration=1.25))
196+
app = module.create_app(device="cpu", preload_model="sensevoice")
197+
transcribe = app.routes[("POST", "/v1/audio/transcriptions")]
198+
199+
response = asyncio.run(
200+
transcribe(
201+
file=DummyUpload(),
202+
model="sensevoice",
203+
language=None,
204+
response_format="verbose_json",
205+
spk=False,
206+
)
207+
)
208+
209+
assert response["language"] == "en"
210+
assert response["text"] == "hello"
211+
assert response["segments"] == [
212+
{"id": 0, "start": 0.0, "end": 1.25, "text": "hello", "words": []}
213+
]
214+
215+
216+
def test_server_versions_follow_package_version(monkeypatch):
217+
expected = (REPO_ROOT / "funasr" / "version.txt").read_text().strip()
218+
module = load_server_app(monkeypatch)
219+
server_module = load_server_cli()
220+
install_dummy_funasr(monkeypatch)
221+
222+
app = module.create_app(device="cpu", preload_model="sensevoice")
223+
224+
assert app.metadata["version"] == expected
225+
assert hasattr(server_module, "server_version_label")
226+
assert server_module.server_version_label() == f"FunASR Server v{expected}"
227+
228+
177229
def test_default_fun_asr_nano_uses_requested_modelscope_hub(monkeypatch):
178230
module = load_server_app(monkeypatch)
179231
DummyAutoModel = install_dummy_funasr(monkeypatch)

0 commit comments

Comments
 (0)