Skip to content

Open-source speech recognition toolkit for training, inference, streaming ASR, VAD, punctuation, speaker diarization pipelines, and OpenAI-compatible/MCP serving.

16.6 KB
Raw Blame
<!DOCTYPE html>
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1">
<title>Why can a long transcript miss the ending? | FunASR</title><meta name="description" content="A transcript returned, but the last sentence is missing. Trace the input, segmentation and result before changing parameters in an offline workflow."><meta name="keywords" content="long audio transcription, VAD segmentation, SenseVoice, FSMN-VAD, FunASR, memory budget, batching, transcript acceptance">
<link rel="icon" href="/logo.png"><meta property="og:title" content="Why can a long transcript miss the ending?"><meta property="og:description" content="A transcript returned, but the last sentence is missing. Trace the input, segmentation and result before changing parameters in an offline workflow.">
<meta property="og:type" content="article"><meta property="og:url" content="https://www.funasr.com/en/blog/funasr-transcribe-long-audio.html"><meta property="og:image" content="https://www.funasr.com/logo.png">
<link rel="canonical" href="https://www.funasr.com/en/blog/funasr-transcribe-long-audio.html"><link rel="alternate" hreflang="en" href="https://www.funasr.com/en/blog/funasr-transcribe-long-audio.html"><link rel="alternate" hreflang="zh" href="https://www.funasr.com/blog/funasr-transcribe-long-audio.html"><link rel="alternate" hreflang="x-default" href="https://www.funasr.com/en/blog/funasr-transcribe-long-audio.html">
<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":"Why can a long transcript miss the ending?","description":"A transcript returned, but the last sentence is missing. Trace the input, segmentation and result before changing parameters in an offline workflow.","datePublished":"2026-06-17","dateModified":"2026-09-09","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/funasr-transcribe-long-audio.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}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 href="/" class="nav-logo">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/funasr-transcribe-long-audio.html" style="font-size:0.83rem;font-weight:600;color:var(--text-soft)">中文</a><a href="https://github.com/modelscope/FunASR" target="_blank" class="nav-btn">GitHub ★</a></div></nav>
<article><div class="container">
<h1>Why can a long transcript miss the ending?</h1>
<p class="post-meta">FunASR Blog · 2026-06-17 · Updated 2026-09-09</p>
<p class="lead" data-editorial="opening">If your team has a transcript but cannot find the final sentence, do not begin by increasing a batch parameter. Trace the recording, the selected speech regions and the returned result first. A nonempty response does not prove complete coverage.</p>
<p data-editorial="example">Consider an interview whose last remark is audible in the original file but absent from the transcript. That observation alone does not identify a model defect: establish whether the loaded audio includes the end, whether segmentation retains it and whether the client saves the full response.</p>
<p data-editorial="boundary">The example below is one offline SenseVoice configuration with an external speech detector, not a fix for every missing tail. Silence, segmentation and inference or client failures need different evidence.</p>

<h2>Three places to look before changing parameters</h2>
<ol><li><strong>The input:</strong> listen to the end of the same decoded file, not another copy with a similar name.</li><li><strong>The boundary:</strong> inspect cuts near the missing sentence. Speech detection chooses regions; it does not verify the words.</li><li><strong>The result:</strong> distinguish an empty record, incomplete response and saved text. Retain errors rather than filling a missing sentence by guesswork.</li></ol>
<h2>Start with one explicit offline configuration</h2>
<section data-long-audio-contract="prerequisites">
<p>Use an already prepared, separate FunASR 1.4.15 environment with PyTorch, working audio-decoding dependencies and access to model weights. Follow the <a href="/en/docs/installation.html">installation and environment guide</a> for platform preparation, then check the <a href="/en/docs/python-api.html">Python SDK guide</a>. The version check below inspects installed package metadata; it is not proof of a complete installation or acoustic inference.</p>
<p>Place a local file you are authorized to process at <code>meeting.wav</code>. Validate the environment with a short recording before moving to longer business recordings; initial loading may download models. The output contains transcript text, which should stay out of public logs. The recipe pins the toolkit version, not every dependency or model revision; record and pin those separately for deployment.</p>
</section>
<pre data-long-audio-contract="recipe"><code>from importlib.metadata import version
from pathlib import Path

installed = version("funasr")
if installed != "1.4.15":
    raise RuntimeError(f"Expected FunASR 1.4.15, found {installed}")

audio = Path("meeting.wav")
if not audio.is_file():
    raise FileNotFoundError(audio)

from funasr import AutoModel

model = AutoModel(
    model="iic/SenseVoiceSmall",
    vad_model="fsmn-vad",
    vad_kwargs={"max_single_segment_time": 30000},
    device="cpu",
)
result = model.generate(
    input=str(audio),
    batch_size_s=300,
)
if not result or not isinstance(result[0], dict):
    raise RuntimeError("No result record; inspect audio and model logs")
text = result[0].get("text", "")
if not isinstance(text, str) or not text.strip():
    raise RuntimeError("Empty transcript; inspect audio, silence and VAD output")
print(text)</code></pre>
<p>This explicit CPU path handles VAD regions individually; <code>batch_size_s</code> is not a CPU parallelism control or a speed recommendation. Empty output needs inspection: silence, VAD selection, input problems or inference errors are possible causes. It is not automatically success or a model defect. The example deliberately stops for inspection and supplies no fabricated transcript output.</p>
<h2>Acceptance before admitting long recordings</h2>
<section data-long-audio-contract="acceptance">
<ol>
<li><strong>Verify inputs:</strong> check decodability, actual duration, channels and sample rate. A successful read or nonempty transcript is not completeness evidence.</li>
<li><strong>Cover business difficulties:</strong> include short recordings, long silences, overlapping speakers, sustained speech and a clear spoken tail. Listen around cuts, key entities and the end. A timestamp gap may also be silence.</li>
<li><strong>Record resources and latency:</strong> identify model/dependency versions, hardware, device, audio and concurrency. Separate initialization from file-call timing, state warmup conditions, measure peak RAM and GPU memory, and retain errors and empty results.</li>
<li><strong>Increase load gradually:</strong> raise duration and concurrency to establish admission, timeout, queue and retry policies. One successful request does not validate all durations; a client timeout does not prove that backend inference was cancelled.</li>
</ol>
<p>See the <a href="/en/blog/meeting-transcript-acceptance.html">meeting-transcript acceptance checklist</a> and <a href="/en/docs/benchmark-method.html">reproducible performance guide</a>. The former's MOSS <code>sentence_info</code> audit script has a specific input contract, not an adapter for arbitrary SenseVoice results. Structural checks do not prove text accuracy or complete speech coverage.</p>
</section>
<section data-editorial="appendix"><h2>Appendix: windows, resources and parameter units</h2>
<aside class="limitation-callout" data-long-audio-contract="window">
<p><strong>Separate windows, files and services.</strong> Open-source Whisper's <code>transcribe()</code> loops over roughly 30-second decoding windows internally. That is not a file-duration limit, and this entry point does not require users to split and stitch every window themselves. Low-level <code>decode()</code>, file transcription and hosted APIs have different contracts. See the <a href="https://github.com/openai/whisper/blob/86098128c0b4f24f0e2aa2994de830614b474227/README.md#L115">official file-transcription guide</a> and <a href="https://github.com/openai/whisper/blob/86098128c0b4f24f0e2aa2994de830614b474227/whisper/transcribe.py#L272">pinned window-loop implementation</a>. This article makes no claim about current cloud upload quotas.</p>
<p>With an explicitly configured VAD model, FunASR can organize segmentation and recognition inside one <code>generate()</code> call. One call does not imply unlimited duration, fixed memory, complete recognition or realtime streaming.</p>
</aside>
<h2>The resource path inside a file call</h2>
<section data-long-audio-contract="resources">
<p>This offline path loads the complete audio waveform into CPU memory, then organizes ASR inputs using VAD regions. It is not a bounded-memory stream that reads only the current segment from disk. Segmentation can change the work in one inference batch, but the full waveform, decoding buffers, segment metadata, outputs and concurrent requests still consume resources.</p>
<p>For a 16 kHz, mono, float32 waveform alone, one hour is about 230 MB. This is a data-size estimate, not measured peak process RAM or GPU memory, and excludes decoder copies and model state. It cannot establish support for every file or equal GPU memory for one-hour and one-minute inputs. Validate acceptable durations on the chosen hardware, model, audio format and concurrency.</p>
<p>See <a href="https://github.com/modelscope/FunASR/blob/5be786088ea6ea9db5f1abf18a6c16e550760e10/funasr/auto/auto_model.py#L920">whole-file loading and segment sorting</a> and the <a href="https://github.com/modelscope/FunASR/blob/5be786088ea6ea9db5f1abf18a6c16e550760e10/funasr/utils/load_utils.py#L128">audio-decoding entry point</a>. Source inspection explains the data path; it does not replace peak-memory measurement.</p>
</section>
<h2>Two parameters with different boundaries</h2>
<section data-long-audio-contract="batching">
<ul>
<li><strong><code>max_single_segment_time=30000</code></strong>: An FSMN-VAD endpoint threshold in milliseconds (ms), used in frame-level speech segmentation decisions. It is not a file-duration limit or a guarantee of exactly equal segments or cuts at word and sentence boundaries.</li>
<li><strong><code>batch_size_s=300</code></strong>: A VAD-wrapper batch budget in seconds (s), converted to milliseconds internally. Grouping considers the longest segment duration multiplied by the number of segments. It is not simply the sum of segment durations or a hard memory cap; a longer segment may still be processed alone.</li>
</ul>
<p><strong>CPU exception:</strong> the current wrapper disables that grouping budget for <code>device="cpu"</code> and handles segments individually. Changing <code>batch_size_s</code> in this example is therefore not evidence of CPU batch-throughput optimization. A prepared and validated GPU setup needs new measurements, not inherited memory or speed conclusions. See <a href="https://github.com/modelscope/FunASR/blob/5be786088ea6ea9db5f1abf18a6c16e550760e10/funasr/auto/auto_model.py#L899">budget units</a> and the <a href="https://github.com/modelscope/FunASR/blob/5be786088ea6ea9db5f1abf18a6c16e550760e10/funasr/auto/auto_model.py#L935">CPU branch and grouping rule</a>.</p>
</section>

<h2>Choose models and services separately</h2>
<ul>
<li>This is an offline SenseVoice example with explicitly configured external FSMN-VAD. Check Paraformer configuration and outputs separately. SenseVoice rich-text tags are not verified emotion accuracy.</li>
<li>Third-party <a href="/en/docs/moss-transcribe-diarize.html">MOSS-Transcribe-Diarize</a> has its own whole-recording transcription and native diarization path. It does not require this external VAD or CAM++ recipe. Anonymous speaker labels are not verified real-world identities.</li>
<li>For realtime microphone transcription, select an explicitly supported streaming model and service using the <a href="/en/deploy/">deployment matrix</a>. Smaller offline batches do not create a streaming protocol. See <a href="/en/docs/model-selection.html">model selection</a> for capability differences.</li>
</ul>
<p data-long-audio-contract="evidence">This article explains pinned source behavior, not new long-recording performance or accuracy measurements. The previous page's timing and full-coverage promotion lacked complete reproduction conditions and has been removed. Repository history preserves that text; it is not a current deployment promise.</p>
</section>
<p data-editorial="next-step">Next, use the <a href="/en/blog/meeting-transcript-acceptance.html">meeting-transcript checklist</a> to choose what to listen for at the end of a representative recording. Its downloadable MOSS checker has a different input contract from this SenseVoice recipe.</p>
</div></article>
<footer><div class="container">FunASR · Open-source speech recognition by Tongyi Lab · <a href="https://github.com/modelscope/FunASR">GitHub</a></div></footer>
</body></html>