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
<!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>