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(site): explain WebSocket offline model configuration
zhifu gao3167116542ee
diff --git a/web-pages/product-site/content/legacy-manifest.json b/web-pages/product-site/content/legacy-manifest.jsonindex f35c31d1e..9d03c9583 100644--- a/web-pages/product-site/content/legacy-manifest.json+++ b/web-pages/product-site/content/legacy-manifest.json@@ -140,6 +140,8 @@"voice/index.html": "1a6bae9e1637fea91f2f97506f5847ebd0ce429136444afa61f0a75da0beea0b","vs-whisper.html": "7d73ff1f771e4c17117108b172c2ce1952e98738787bb7101f061bf51aa8f03c","blog/hotwords-package-boundaries.html": "be0aaad687d18fc9387fb35ed10f44272bd47e161ae3e489cb68ca4c860d4307",- "en/blog/hotwords-package-boundaries.html": "4eae4e3f485e5fd8c7ab1b64d6e2fb28e0e529d821b02e87f040a0a73bbd3085"+ "en/blog/hotwords-package-boundaries.html": "4eae4e3f485e5fd8c7ab1b64d6e2fb28e0e529d821b02e87f040a0a73bbd3085",+ "blog/websocket-offline-model-options.html": "9be8d17aaf2b99829442c0294568e00b49b9328b1480eba1d3d525cb65d7c1b1",+ "en/blog/websocket-offline-model-options.html": "bfd261068359bc529ae15e7830d518d26ecf4887d59312aad0f2e88b88805139"}}diff --git a/web-pages/product-site/data/blog.json b/web-pages/product-site/data/blog.jsonindex e9899ea89..8ae38ebd9 100644--- a/web-pages/product-site/data/blog.json+++ b/web-pages/product-site/data/blog.json@@ -9,6 +9,19 @@],"lead_image": "/img/funclip-v2-1-0-interface.jpg","articles": [+ {+ "slug": "websocket-offline-model-options",+ "category": "explanations",+ "reviewed": true,+ "zh": {+ "title": "换了模型却没生效?核对 WebSocket 启动配置",+ "summary": "区分离线和流式模型,用不加载权重的源码检查确认参数路由,再规划真实录音验收。"+ },+ "en": {+ "title": "Changed the model, but not the result? Check the WebSocket configuration",+ "summary": "Separate offline and streaming models, inspect argument routing without loading weights, then plan acceptance on real recordings."+ }+ },{"slug": "hotwords-package-boundaries","category": "explanations",diff --git a/web-pages/product-site/legacy/blog/websocket-offline-model-options.html b/web-pages/product-site/legacy/blog/websocket-offline-model-options.htmlnew file mode 100644index 000000000..62cd92f54--- /dev/null+++ b/web-pages/product-site/legacy/blog/websocket-offline-model-options.html@@ -0,0 +1,98 @@+<!DOCTYPE html>++<html lang="zh"><head><meta charset="utf-8"/><meta content="width=device-width,initial-scale=1" name="viewport"/>+<title>换了模型却没生效?核对 WebSocket 启动配置 | FunASR</title><meta content="区分离线和流式模型,用不加载权重的源码检查确认参数路由,再规划真实录音验收。" name="description"/>+<link href="/logo.png" rel="icon"/><meta content="换了模型却没生效?核对 WebSocket 启动配置" property="og:title"/><meta content="区分离线和流式模型,用不加载权重的源码检查确认参数路由,再规划真实录音验收。" property="og:description"/>+<meta content="article" property="og:type"/><meta content="https://www.funasr.com/blog/websocket-offline-model-options.html" property="og:url"/><meta content="https://www.funasr.com/logo.png" property="og:image"/>+<link href="https://www.funasr.com/blog/websocket-offline-model-options.html" rel="canonical"/><link href="https://www.funasr.com/en/blog/websocket-offline-model-options.html" hreflang="en" rel="alternate"/><link href="https://www.funasr.com/blog/websocket-offline-model-options.html" hreflang="zh" rel="alternate"/><link href="https://www.funasr.com/en/blog/websocket-offline-model-options.html" hreflang="x-default" rel="alternate"/>+<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet"/>+<script type="application/ld+json">{"@context":"https://schema.org","@type":"BlogPosting","headline":"换了模型却没生效?核对 WebSocket 启动配置","description":"区分离线和流式模型,用不加载权重的源码检查确认参数路由,再规划真实录音验收。","datePublished":"2026-11-14","dateModified":"2026-11-14","author":{"@type":"Organization","name":"FunASR / Tongyi Lab"},"publisher":{"@type":"Organization","name":"FunASR","logo":{"@type":"ImageObject","url":"https://www.funasr.com/logo.png"}},"mainEntityOfPage":{"@type":"WebPage","@id":"https://www.funasr.com/blog/websocket-offline-model-options.html"},"image":"https://www.funasr.com/logo.png"}</script>+<style>:root{--primary:#2563eb;--primary-dark:#1d4ed8;--bg:#fff;--surface:#f8fafc;--border:#e2e8f0;--text:#0f172a;--text-soft:#475569;--text-muted:#94a3b8;--radius:12px}+*{margin:0;padding:0;box-sizing:border-box}+body{font-family:'Inter',-apple-system,sans-serif;color:var(--text);line-height:1.7}+a{color:var(--primary);text-decoration:none}a:hover{text-decoration:underline}+.container{max-width:800px;margin:0 auto;padding:0 24px}+.nav{position:fixed;top:0;left:0;right:0;z-index:100;background:rgba(255,255,255,0.9);backdrop-filter:blur(12px);border-bottom:1px solid var(--border);padding:14px 0}+.nav .container{max-width:1120px;display:flex;align-items:center;gap:24px}+.nav-logo{font-size:1.2rem;font-weight:800;color:var(--text)}.nav-logo span{color:var(--primary)}+.nav-links{display:flex;gap:20px;margin-left:auto;flex-wrap:wrap}+.nav-links a{font-size:0.85rem;font-weight:500;color:var(--text-soft)}+.nav-btn{padding:7px 16px;background:var(--primary);color:#fff;border-radius:7px;font-size:0.83rem;font-weight:600}+article{padding:120px 0 80px}+h1{font-size:2rem;font-weight:800;line-height:1.3;margin-bottom:14px}+h2{font-size:1.3rem;font-weight:700;margin:36px 0 14px;padding-top:16px;border-top:1px solid var(--border)}+h3{font-size:1.05rem;font-weight:700;margin:22px 0 10px}+p{margin-bottom:14px;color:var(--text-soft)}+ul,ol{margin:0 0 14px 22px;color:var(--text-soft)}li{margin-bottom:6px}+table{width:100%;border-collapse:collapse;margin:16px 0;font-size:0.86rem}+th,td{padding:10px 12px;text-align:left;border-bottom:1px solid var(--border)}+th{font-weight:600;background:var(--surface);font-size:0.78rem;color:var(--text-muted)}+pre{background:#1e293b;color:#e2e8f0;padding:18px;border-radius:10px;overflow-x:auto;font-size:0.82rem;line-height:1.7;margin:14px 0}+code{font-family:ui-monospace,Menlo,monospace}+p code,li code{background:var(--surface);padding:2px 6px;border-radius:5px;font-size:0.85em;color:var(--primary-dark)}+.post-meta{color:var(--text-muted);font-size:0.85rem;margin-bottom:24px}+.cta{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:24px;margin:28px 0;text-align:center}+.cta a.btn{display:inline-block;padding:10px 24px;background:var(--primary);color:#fff;border-radius:8px;font-weight:600}+.post-list{list-style:none;margin:0;padding:0}+.post-list li{margin:0 0 8px}+.post-card{display:block;border:1px solid var(--border);border-radius:var(--radius);padding:20px 22px;margin-bottom:14px}+.post-card:hover{border-color:var(--primary);text-decoration:none}+.post-card h2{border:none;padding:0;margin:0 0 6px;font-size:1.15rem;color:var(--text)}+.post-card p{margin:0;color:var(--text-soft);font-size:0.9rem}+.post-card .date{color:var(--text-muted);font-size:0.8rem}+footer{background:#0f172a;color:#94a3b8;padding:28px 0;text-align:center;font-size:0.8rem}+footer a{color:#94a3b8}+@media(max-width:900px){.nav-links{display:none}.nav .container{gap:16px}.nav-logo{margin-right:auto}h1{font-size:1.75rem}table{table-layout:fixed;font-size:0.78rem}th,td{padding:8px 4px;overflow-wrap:anywhere}p code,li code{overflow-wrap:anywhere;word-break:break-word}}+article p a,article li a{color:#006a57;text-decoration:underline;text-underline-offset:.15em}+</style></head><body>+<nav class="nav"><div class="container"><a class="nav-logo" href="/">Fun<span>ASR</span></a><div class="nav-links"><a href="/#capabilities">核心能力</a><a href="/#usage">如何使用</a><a href="/#benchmark">性能</a><a href="/#demo">演示</a><a href="https://modelscope.github.io/FunASR/zh/" target="_blank">文档</a><a href="/quickstart.html">快速上手</a><a href="/models.html">模型</a><a href="/ecosystem.html">生态</a><a href="/blog/">技术博客</a><a href="/vs-whisper.html">对比 Whisper</a><a href="/donors.html">功德榜</a></div><a href="https://www.funasr.com/en/blog/websocket-offline-model-options.html" style="font-size:0.83rem;font-weight:600;color:var(--text-soft)">EN</a><a class="nav-btn" href="/go/github" target="_blank">GitHub ★</a></div></nav>+<article><div class="container"><h1>换了模型却没生效?核对 WebSocket 启动配置</h1>+<p class="post-meta">FunASR Blog · 2026-11-14</p>+<p class="lead" data-editorial="opening">在实时转写服务里,流式结果和句尾离线结果可能来自不同模型。FunASR 的 Python WebSocket 服务分别提供这两组配置;排查模型替换时,先确认自己修改的是哪一组,以及运行的脚本是否真正把参数传下去了。</p>+<p data-editorial="example">一个典型故障是:启动命令写了新的 <code>--asr_model</code>,服务也正常启动,但离线构造器仍使用固定的模型名和版本。参数被命令行解析器接受,不代表它被模型构造器使用。下面用一个不加载模型的检查,先把这两个环节对上。</p>+<p data-editorial="boundary">本文对应 Python WebSocket 服务的源码修复,不是所有运行时的统一配置协议。文中的源码检查不发送音频、不启动服务、不下载权重;既有 GPU 验证使用合成模型与音频,证明参数路由,不证明真实语音准确率或部署性能。</p>+<h2>1. 区分离线模型和流式模型</h2>+<table><thead><tr><th>你要修改的部分</th><th>对应参数</th></tr></thead><tbody>+<tr><td>离线识别,包括两遍识别的离线阶段</td><td><code>--asr_model</code> 与 <code>--asr_model_revision</code></td></tr>+<tr><td>流式识别</td><td><code>--asr_model_online</code> 与 <code>--asr_model_online_revision</code></td></tr>+<tr><td>语音活动检测和标点</td><td>各自的 <code>--vad_model</code>、<code>--punc_model</code> 及版本参数</td></tr>+</tbody></table>+<p>替换离线模型不会自动替换流式模型、VAD 或标点模型。两遍识别出现“中间结果与最终结果不同”,本身也不是模型加载错误的证据;需要结合各阶段输出与实际构造参数判断。</p>+<h2>2. 检查正在使用的脚本,而不只看 pip 版本</h2>+<p><a href="https://github.com/modelscope/FunASR/pull/3887">原始修复 #3887</a>指出了硬编码问题;<a href="https://github.com/modelscope/FunASR/pull/3888">保留作者历史的集成 #3888</a>已合并。修复后的离线构造器使用 <code>model=args.asr_model</code> 和 <code>model_revision=args.asr_model_revision</code>,默认配置仍是 <code>paraformer-zh</code> 与 <code>v2.0.4</code>。</p>+<p>可对照<a href="https://github.com/modelscope/FunASR/blob/9fbcf4d89937318758290c9125d746b8962094db/runtime/python/websocket/funasr_wss_server.py">固定提交中的服务源码</a>。如果你运行的是复制到其他目录的脚本,升级根包 <code>funasr</code> 并不会替换那份文件。记录实际脚本路径、源码提交、Python 环境和权重文件 SHA256,才能判断升级是否进入了真正的服务入口。</p>+<h2>3. 运行一个只读源码检查</h2>+<p>将下面的检查脚本放在独立文件中,以实际服务脚本路径作为唯一参数运行。它只用 Python 标准库读取并解析源码,不导入服务模块;直接导入服务脚本可能触发模型初始化,不能当作轻量检查。</p>+<pre><code data-language="python">import ast+import hashlib+import json+from pathlib import Path+import sys++path = Path(sys.argv[1])+raw = path.read_bytes()+tree = ast.parse(raw, filename=str(path))+calls = [node.value for node in tree.body+ if isinstance(node, ast.Assign)+ and any(isinstance(target, ast.Name) and target.id == "model_asr"+ for target in node.targets)]+assert len(calls) == 1 and isinstance(calls[0], ast.Call)+options = {item.arg: ast.unparse(item.value) for item in calls[0].keywords}+print(json.dumps({+ "sha256": hashlib.sha256(raw).hexdigest(),+ "offline_model": options.get("model"),+ "offline_revision": options.get("model_revision"),+}, indent=2))</code></pre>+<pre><code data-language="shell">python audit_model_options.py /path/to/FunASR/runtime/python/websocket/funasr_wss_server.py</code></pre>+<p>对于上面引用的修复源码,两个输出应为 <code>args.asr_model</code> 和 <code>args.asr_model_revision</code>。若输出仍是字符串常量,说明这份脚本没有使用对应参数。若自定义脚本改变了顶层结构,检查会失败,需要人工检查构造路径;这个小脚本不是任意 Python 程序的通用分析器,也没有验证当前服务进程加载了该文件。</p>+<h2>4. 参数路由正确之后,还要验证什么?</h2>+<p>在隔离环境中使用已获授权的本地权重,分别检查默认配置、自定义模型路径和自定义版本。对于本地目录,版本字符串不能代替文件哈希;对于远端模型标识,也要记录实际解析到的权重版本。模型、配置和前端必须相容,不能只因路径可读就判断可部署。不要在共享服务上直接替换依赖或权重。</p>+<p>这次修复已有默认与两组模型路径、两组版本的五种真实 CUDA 路由验证,使用真实 AutoModel 和本地小型合成权重,共十条输出。它覆盖的是“指定参数到达指定模型”,不是预训练模型的识别质量、并发容量、完整 WebSocket 网络链路或生产服务升级。</p>+<p>下一层验收应使用你有权处理的录音,分别保留流式和最终结果,检查漏字、专名、断句与时间戳,再评估延迟和并发。私有录音、转录和绝对路径不要贴到公开 issue;可以先提供去敏配置和可公开的最小复现。</p>+<h2>把配置问题与识别问题分开</h2>+<p>如果源码路由正确,但术语仍不理想,再核对热词链路和模型能力;如果句尾内容丢失,则继续检查音频边界与 VAD。每次只改变一项配置,保留输入与逐条结果,能让下一步排查有明确依据。</p>+<p data-editorial="next-step">下一步可参考<a href="/blog/meeting-transcript-acceptance.html">会议转写验收清单</a>,为自己的录音建立配置、文本和时间戳对照记录。</p>+</div></article>+<footer><div class="container">FunASR · 通义实验室开源语音识别 · <a href="/go/github">GitHub</a></div></footer>+</body></html>+diff --git a/web-pages/product-site/legacy/en/blog/websocket-offline-model-options.html b/web-pages/product-site/legacy/en/blog/websocket-offline-model-options.htmlnew file mode 100644index 000000000..dff74231b--- /dev/null+++ b/web-pages/product-site/legacy/en/blog/websocket-offline-model-options.html@@ -0,0 +1,98 @@+<!DOCTYPE html>++<html lang="en"><head><meta charset="utf-8"/><meta content="width=device-width,initial-scale=1" name="viewport"/>+<title>Changed the model, but not the result? Check the WebSocket configuration | FunASR</title><meta content="Separate offline and streaming models, inspect argument routing without loading weights, then plan acceptance on real recordings." name="description"/>+<link href="/logo.png" rel="icon"/><meta content="Changed the model, but not the result? Check the WebSocket configuration" property="og:title"/><meta content="Separate offline and streaming models, inspect argument routing without loading weights, then plan acceptance on real recordings." property="og:description"/>+<meta content="article" property="og:type"/><meta content="https://www.funasr.com/en/blog/websocket-offline-model-options.html" property="og:url"/><meta content="https://www.funasr.com/logo.png" property="og:image"/>+<link href="https://www.funasr.com/en/blog/websocket-offline-model-options.html" rel="canonical"/><link href="https://www.funasr.com/en/blog/websocket-offline-model-options.html" hreflang="en" rel="alternate"/><link href="https://www.funasr.com/blog/websocket-offline-model-options.html" hreflang="zh" rel="alternate"/><link href="https://www.funasr.com/en/blog/websocket-offline-model-options.html" hreflang="x-default" rel="alternate"/>+<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet"/>+<script type="application/ld+json">{"@context":"https://schema.org","@type":"BlogPosting","headline":"Changed the model, but not the result? Check the WebSocket configuration","description":"Separate offline and streaming models, inspect argument routing without loading weights, then plan acceptance on real recordings.","datePublished":"2026-11-14","dateModified":"2026-11-14","author":{"@type":"Organization","name":"FunASR / Tongyi Lab"},"publisher":{"@type":"Organization","name":"FunASR","logo":{"@type":"ImageObject","url":"https://www.funasr.com/logo.png"}},"mainEntityOfPage":{"@type":"WebPage","@id":"https://www.funasr.com/en/blog/websocket-offline-model-options.html"},"image":"https://www.funasr.com/logo.png"}</script>+<style>:root{--primary:#2563eb;--primary-dark:#1d4ed8;--bg:#fff;--surface:#f8fafc;--border:#e2e8f0;--text:#0f172a;--text-soft:#475569;--text-muted:#94a3b8;--radius:12px}+*{margin:0;padding:0;box-sizing:border-box}+body{font-family:'Inter',-apple-system,sans-serif;color:var(--text);line-height:1.7}+a{color:var(--primary);text-decoration:none}a:hover{text-decoration:underline}+.container{max-width:800px;margin:0 auto;padding:0 24px}+.nav{position:fixed;top:0;left:0;right:0;z-index:100;background:rgba(255,255,255,0.9);backdrop-filter:blur(12px);border-bottom:1px solid var(--border);padding:14px 0}+.nav .container{max-width:1120px;display:flex;align-items:center;gap:24px}+.nav-logo{font-size:1.2rem;font-weight:800;color:var(--text)}.nav-logo span{color:var(--primary)}+.nav-links{display:flex;gap:20px;margin-left:auto;flex-wrap:wrap}+.nav-links a{font-size:0.85rem;font-weight:500;color:var(--text-soft)}+.nav-btn{padding:7px 16px;background:var(--primary);color:#fff;border-radius:7px;font-size:0.83rem;font-weight:600}+article{padding:120px 0 80px}+h1{font-size:2rem;font-weight:800;line-height:1.3;margin-bottom:14px}+h2{font-size:1.3rem;font-weight:700;margin:36px 0 14px;padding-top:16px;border-top:1px solid var(--border)}+h3{font-size:1.05rem;font-weight:700;margin:22px 0 10px}+p{margin-bottom:14px;color:var(--text-soft)}+ul,ol{margin:0 0 14px 22px;color:var(--text-soft)}li{margin-bottom:6px}+table{width:100%;border-collapse:collapse;margin:16px 0;font-size:0.86rem}+th,td{padding:10px 12px;text-align:left;border-bottom:1px solid var(--border)}+th{font-weight:600;background:var(--surface);font-size:0.78rem;color:var(--text-muted)}+pre{background:#1e293b;color:#e2e8f0;padding:18px;border-radius:10px;overflow-x:auto;font-size:0.82rem;line-height:1.7;margin:14px 0}+code{font-family:ui-monospace,Menlo,monospace}+p code,li code{background:var(--surface);padding:2px 6px;border-radius:5px;font-size:0.85em;color:var(--primary-dark)}+.post-meta{color:var(--text-muted);font-size:0.85rem;margin-bottom:24px}+.cta{background:var(--surface);border:1px solid var(--border);border-radius:var(--radius);padding:24px;margin:28px 0;text-align:center}+.cta a.btn{display:inline-block;padding:10px 24px;background:var(--primary);color:#fff;border-radius:8px;font-weight:600}+.post-list{list-style:none;margin:0;padding:0}+.post-list li{margin:0 0 8px}+.post-card{display:block;border:1px solid var(--border);border-radius:var(--radius);padding:20px 22px;margin-bottom:14px}+.post-card:hover{border-color:var(--primary);text-decoration:none}+.post-card h2{border:none;padding:0;margin:0 0 6px;font-size:1.15rem;color:var(--text)}+.post-card p{margin:0;color:var(--text-soft);font-size:0.9rem}+.post-card .date{color:var(--text-muted);font-size:0.8rem}+footer{background:#0f172a;color:#94a3b8;padding:28px 0;text-align:center;font-size:0.8rem}+footer a{color:#94a3b8}+@media(max-width:900px){.nav-links{display:none}.nav .container{gap:16px}.nav-logo{margin-right:auto}h1{font-size:1.75rem}table{table-layout:fixed;font-size:0.78rem}th,td{padding:8px 4px;overflow-wrap:anywhere}p code,li code{overflow-wrap:anywhere;word-break:break-word}}+article p a,article li a{color:#006a57;text-decoration:underline;text-underline-offset:.15em}+</style></head><body>+<nav class="nav"><div class="container"><a class="nav-logo" href="/">Fun<span>ASR</span></a><div class="nav-links"><a href="/en/#capabilities">Capabilities</a><a href="/en/#usage">How to Use</a><a href="/en/#benchmark">Benchmark</a><a href="/en/#demo">Demo</a><a href="https://modelscope.github.io/FunASR/" target="_blank">Docs</a><a href="/en/quickstart.html">Quickstart</a><a href="/en/models.html">Models</a><a href="/en/ecosystem.html">Ecosystem</a><a href="/en/blog/">Blog</a><a href="/en/vs-whisper.html">vs Whisper</a><a href="/en/donors.html">Donors</a></div><a href="https://www.funasr.com/blog/websocket-offline-model-options.html" style="font-size:0.83rem;font-weight:600;color:var(--text-soft)">中文</a><a class="nav-btn" href="/go/github" target="_blank">GitHub ★</a></div></nav>+<article><div class="container"><h1>Changed the model, but not the result? Check the WebSocket configuration</h1>+<p class="post-meta">FunASR Blog · 2026-11-14</p>+<p class="lead" data-editorial="opening">Streaming text and the final offline result can come from different models. FunASR's Python WebSocket server exposes separate settings for them. When replacing a model, first identify which stage you are changing and whether the running script actually forwards the options.</p>+<p data-editorial="example">A service can accept a new <code>--asr_model</code> argument and start normally while its offline constructor still uses a fixed model name and revision. Parsing a command-line option is not the same as using it. A small source inspection can connect those two steps without loading a model.</p>+<p data-editorial="boundary">This article concerns a source fix in the Python WebSocket server, not a shared configuration protocol for every runtime. The source check sends no audio, starts no service and downloads no weights. Existing GPU verification uses synthetic models and audio to check routing, not pretrained recognition quality or deployment performance.</p>+<h2>1. Separate offline and streaming settings</h2>+<table><thead><tr><th>Stage to change</th><th>Options to inspect</th></tr></thead><tbody>+<tr><td>Offline recognition, including the offline stage of two-pass recognition</td><td><code>--asr_model</code> and <code>--asr_model_revision</code></td></tr>+<tr><td>Streaming recognition</td><td><code>--asr_model_online</code> and <code>--asr_model_online_revision</code></td></tr>+<tr><td>Voice activity detection and punctuation</td><td>Their own <code>--vad_model</code>, <code>--punc_model</code> and revision options</td></tr>+</tbody></table>+<p>Replacing the offline model does not replace the streaming, VAD or punctuation model. Different intermediate and final text is not, by itself, evidence of a loading bug. Compare the outputs of each stage with the actual constructor arguments.</p>+<h2>2. Inspect the script you run, not just the pip version</h2>+<p><a href="https://github.com/modelscope/FunASR/pull/3887">Original fix #3887</a> identified the hard-coded constructor; <a href="https://github.com/modelscope/FunASR/pull/3888">integration #3888 preserving its author history</a> has merged. The fixed offline constructor uses <code>model=args.asr_model</code> and <code>model_revision=args.asr_model_revision</code>. The default remains <code>paraformer-zh</code> with <code>v2.0.4</code>.</p>+<p>Compare against the <a href="https://github.com/modelscope/FunASR/blob/9fbcf4d89937318758290c9125d746b8962094db/runtime/python/websocket/funasr_wss_server.py">server at the pinned source commit</a>. Upgrading the root <code>funasr</code> package does not replace a script copied into another directory. Record the actual script path, source commit, Python environment and weight-file SHA256 values before deciding that your service has been upgraded.</p>+<h2>3. Run a read-only source check</h2>+<p>Put this check in a separate file and pass the actual server script path as its only argument. It reads and parses source with the Python standard library without importing the server. Importing the server itself can initialize models and is not a lightweight inspection.</p>+<pre><code data-language="python">import ast+import hashlib+import json+from pathlib import Path+import sys++path = Path(sys.argv[1])+raw = path.read_bytes()+tree = ast.parse(raw, filename=str(path))+calls = [node.value for node in tree.body+ if isinstance(node, ast.Assign)+ and any(isinstance(target, ast.Name) and target.id == "model_asr"+ for target in node.targets)]+assert len(calls) == 1 and isinstance(calls[0], ast.Call)+options = {item.arg: ast.unparse(item.value) for item in calls[0].keywords}+print(json.dumps({+ "sha256": hashlib.sha256(raw).hexdigest(),+ "offline_model": options.get("model"),+ "offline_revision": options.get("model_revision"),+}, indent=2))</code></pre>+<pre><code data-language="shell">python audit_model_options.py /path/to/FunASR/runtime/python/websocket/funasr_wss_server.py</code></pre>+<p>For the fixed source linked above, the two option outputs are <code>args.asr_model</code> and <code>args.asr_model_revision</code>. String constants instead indicate that this script does not use those options. A customized script with a different top-level structure may fail the check and needs manual inspection. This is not a general analyzer for arbitrary Python programs, nor proof that a running process loaded this file.</p>+<h2>4. What remains after the routing check?</h2>+<p>In an isolated environment with authorized local weights, check the default configuration, custom model paths and custom revisions separately. For a local directory, a revision string is not a substitute for file hashes. For a remote model identifier, record the revision actually resolved. Model weights, configuration and frontend must be compatible; a readable path alone does not prove deployability. Do not replace dependencies or weights directly in a shared service.</p>+<p>The fix has five real CUDA routing cases covering the default, two model paths and two revisions. They use real AutoModel construction with small local synthetic weights and ten outputs in total. This verifies that the requested settings reach the intended model. It is not a pretrained accuracy evaluation, concurrency-capacity test, complete WebSocket network test or production upgrade.</p>+<p>Next, use recordings you are authorized to process. Keep streaming and final outputs separately and inspect omissions, terminology, segmentation and timestamps before evaluating latency and concurrency. Do not publish private recordings, transcripts or absolute paths in issues. Start with redacted configuration and a shareable minimal reproduction.</p>+<h2>Separate configuration bugs from recognition problems</h2>+<p>If source routing is correct but terminology is still poor, inspect the hotword path and the model's capabilities. If endings are missing, inspect audio boundaries and VAD. Change one setting at a time and retain inputs and per-recording outputs so the next diagnostic step has evidence.</p>+<p data-editorial="next-step">Use the <a href="/en/blog/meeting-transcript-acceptance.html">meeting-transcript acceptance checklist</a> to compare configuration, text and timestamps on your own recordings.</p>+</div></article>+<footer><div class="container">FunASR · Open-source speech recognition by Tongyi Lab · <a href="/go/github">GitHub</a></div></footer>+</body></html>+diff --git a/web-pages/product-site/tests/test_websocket_model_article.py b/web-pages/product-site/tests/test_websocket_model_article.pynew file mode 100644index 000000000..7ea06595c--- /dev/null+++ b/web-pages/product-site/tests/test_websocket_model_article.py@@ -0,0 +1,74 @@+"""The model-selection article must match source and run without loading models."""+import contextlib+import hashlib+import io+import json+from pathlib import Path+import sys++from bs4 import BeautifulSoup+import pytest++SITE = Path(__file__).resolve().parents[1]+ROOT = SITE.parents[1]+sys.path.insert(0, str(SITE))+from build import build++SLUG = 'websocket-offline-model-options'+SOURCE = 'https://github.com/modelscope/FunASR/blob/9fbcf4d89937318758290c9125d746b8962094db/runtime/python/websocket/funasr_wss_server.py'++def test_catalogue_contains_model_article_once():+ data = json.loads((SITE/'data/blog.json').read_text())+ rows = [x for x in data['articles'] if x['slug'] == SLUG]+ assert len(rows) == 1+ assert rows[0]['reviewed'] and rows[0]['category'] == 'explanations'+ assert SLUG not in data['selected']+[email protected](scope='module', params=['source', 'built'])+def tree(request, tmp_path_factory):+ if request.param == 'source':+ return SITE/'legacy'+ dest = tmp_path_factory.mktemp('model-options-article')+ build(dest)+ return dest+[email protected](params=['', 'en/'])+def article(request, tree):+ prefix = request.param+ return prefix, BeautifulSoup((tree/prefix/'blog'/(SLUG+'.html')).read_text(), 'html.parser')++def test_metadata_sources_and_scope(article):+ prefix, soup = article+ meta = json.loads(soup.select_one('script[type="application/ld+json"]').get_text())+ assert meta['datePublished'] == meta['dateModified'] == '2026-11-14'+ assert meta['headline'] == soup.select_one('article h1').get_text()+ assert soup.select_one('link[rel="canonical"]')['href'] == f'https://www.funasr.com/{prefix}blog/{SLUG}.html'+ links = {a['href'] for a in soup.select('article a[href]')}+ assert SOURCE in links+ assert 'https://github.com/modelscope/FunASR/pull/3888' in links+ assert soup.select_one('[data-editorial="boundary"]')+ assert len(soup.select('[data-editorial="next-step"] a')) == 1+ text = soup.select_one('article').get_text(' ', strip=True)+ for term in ['--asr_model', '--asr_model_revision', '--asr_model_online', 'SHA256', 'v2.0.4']:+ assert term in text++def test_source_audit_example_executes_without_server_import(article, monkeypatch):+ _, soup = article+ code = soup.select_one('code[data-language="python"]').get_text()+ server = ROOT/'runtime/python/websocket/funasr_wss_server.py'+ monkeypatch.setattr(sys, 'argv', ['audit_model_options.py', str(server)])+ with contextlib.redirect_stdout(io.StringIO()) as out:+ exec(compile(code, 'article-source-audit', 'exec'), {})+ result = json.loads(out.getvalue())+ assert result['sha256'] == hashlib.sha256(server.read_bytes()).hexdigest()+ assert result['offline_model'] == 'args.asr_model'+ assert result['offline_revision'] == 'args.asr_model_revision'+[email protected]('prefix', ['', 'en/'])+def test_archive_and_explanations_discover_article(prefix, tmp_path):+ build(tmp_path)+ for category in ['archive', 'explanations']:+ soup = BeautifulSoup((tmp_path/prefix/'blog'/category/'index.html').read_text(), 'html.parser')+ cards = soup.select(f'a[href="/{prefix}blog/{SLUG}.html"]')+ assert len(cards) == 1+ assert cards[0].select_one('time[datetime="2026-11-14"]')