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="zh">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<title>SenseVoice 部署指南:五语种识别、情感与音频事件 | FunASR 博客</title>
<meta name="description" content="SenseVoice 部署完整教程:3 行 Python 代码跑通中、粤、英、日、韩语音识别,含语种、情感、音频事件检测、VAD 长音频分段及 GPU/CPU 选择。">
<meta name="keywords" content="SenseVoice, SenseVoice 部署, 语音识别, 多语言语音识别, Whisper 替代, FunASR, 情感识别, 语种识别, ASR 教程, 开源语音识别">
<link rel="icon" href="/logo.png">
<meta property="og:title" content="SenseVoice 部署指南:五语种识别、情感与音频事件 | FunASR 博客">
<meta property="og:description" content="SenseVoice 部署完整教程:3 行 Python 代码跑通中、粤、英、日、韩语音识别,含语种、情感、音频事件检测、VAD 长音频分段及 GPU/CPU 选择。">
<meta property="og:type" content="article">
<meta property="og:url" content="https://www.funasr.com/blog/sensevoice-deployment-guide.html">
<meta property="og:image" content="https://www.funasr.com/logo.png">
<link rel="canonical" href="https://www.funasr.com/blog/sensevoice-deployment-guide.html">
<link rel="alternate" hreflang="en" href="https://www.funasr.com/en/blog/sensevoice-deployment-guide.html">
<link rel="alternate" hreflang="zh" href="https://www.funasr.com/blog/sensevoice-deployment-guide.html">
<link rel="alternate" hreflang="x-default" href="https://www.funasr.com/en/blog/sensevoice-deployment-guide.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":"SenseVoice 部署指南:五语种识别、情感与音频事件 | FunASR 博客","description":"SenseVoice 部署完整教程:3 行 Python 代码跑通中、粤、英、日、韩语音识别,含语种、情感、音频事件检测、VAD 长音频分段及 GPU/CPU 选择。","datePublished":"2026-06-16","dateModified":"2026-08-17","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/sensevoice-deployment-guide.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:700px){
.nav{padding:12px 0}.nav .container{gap:16px}.nav-links{display:none}.nav-btn{white-space:nowrap}
article{padding-top:96px}
}</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="/#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/sensevoice-deployment-guide.html" style="font-size:0.83rem;font-weight:500;color:var(--text-soft)">EN</a><a href="/go/github" target="_blank" class="nav-btn">GitHub ★</a></div></nav>
<article><div class="container">
<h1>SenseVoice 部署指南:五语种识别、情感与音频事件</h1>
<p class="post-meta">FunASR 技术博客 · 2026-06-16 · 部署教程</p>
<p><strong>SenseVoice</strong> 是 FunAudioLLM 团队开源的语音理解模型,支持普通话、粤语、英语、日语和韩语。它不仅做语音识别(ASR),还能在一次前向推理中同时输出<strong>语种识别、情感识别、音频事件检测</strong>。模型采用非自回归结构,适合低延迟和批量场景;实际吞吐和延迟取决于硬件、音频长度及 batch,需要在目标环境实测。</p>
<p>本文用可直接复制运行的代码,带你 3 步把 SenseVoice 跑起来。</p>
<h2>1. 安装</h2>
<p>SenseVoice 通过 <code>funasr</code> 包提供,一行安装:</p>
<pre>pip install -U funasr torch torchaudio</pre>
<h2>2. 三行代码跑通识别</h2>
<p>下面的代码会自动下载 <code>SenseVoiceSmall</code> 模型并完成识别:</p>
<pre>from funasr import AutoModel
from funasr.utils.postprocess_utils import rich_transcription_postprocess
model = AutoModel(model="iic/SenseVoiceSmall", device="cuda:0") # CPU 用 device="cpu"
res = model.generate(input="audio.wav", language="auto", use_itn=True)
print(rich_transcription_postprocess(res[0]["text"]))</pre>
<p>模型 ID:ModelScope 为 <code>iic/SenseVoiceSmall</code>,HuggingFace 为 <code>FunAudioLLM/SenseVoiceSmall</code>。<code>use_itn=True</code> 表示输出带标点和逆文本归一化(数字、日期规整)。</p>
<h2>3. 读懂输出:语种 + 情感 + 音频事件</h2>
<p>SenseVoice 的原始输出带有富文本标签,例如:</p>
<pre><|zh|><|NEUTRAL|><|Speech|><|withitn|>欢迎大家来体验达摩院推出的语音识别模型。</pre>
<ul>
<li><code><|zh|></code>:语种(zh 中文、en 英文、yue 粤语、ja 日语、ko 韩语)</li>
<li><code><|NEUTRAL|></code>:情感(HAPPY / SAD / ANGRY / NEUTRAL 等)</li>
<li><code><|Speech|></code>:音频事件(Speech / BGM / Applause / Laughter 等)</li>
</ul>
<p>用 <code>rich_transcription_postprocess()</code> 可一键得到干净文本;如果你想保留这些标签做下游分析,直接读取 <code>res[0]["text"]</code> 即可。</p>
<h2>4. 长音频:加 VAD 自动分段</h2>
<p>处理几分钟以上的长音频时,搭配 FSMN-VAD 做语音端点检测、自动分段,效果与速度都更好:</p>
<pre>model = AutoModel(
model="iic/SenseVoiceSmall",
vad_model="fsmn-vad",
vad_kwargs={"max_single_segment_time": 30000},
device="cuda:0",
)
res = model.generate(input="long_audio.wav", language="auto", use_itn=True, batch_size_s=60)</pre>
<h2>5. GPU 与 CPU 怎么选</h2>
<table>
<thead><tr><th>场景</th><th>建议</th></tr></thead>
<tbody>
<tr><td>高并发 / 批量转写</td><td>GPU(<code>device="cuda:0"</code>),吞吐最高</td></tr>
<tr><td>轻量 / 边缘 / 离线</td><td>CPU(<code>device="cpu"</code>);SenseVoice 非自回归,CPU 上也很快</td></tr>
<tr><td>生产服务</td><td>FunASR runtime(C++ / Docker 一键部署,多并发)</td></tr>
</tbody>
</table>
<h2>6. 性能一览</h2>
<table>
<thead><tr><th>维度</th><th>SenseVoice-Small</th></tr></thead>
<tbody>
<tr><td>性能验证</td><td>在目标硬件、音频分布和 batch 下实测 RTF 与 p50/p95</td></tr>
<tr><td>支持语言</td><td>中文 / 粤语 / 英文 / 日文 / 韩文</td></tr>
<tr><td>附加能力</td><td>语种识别 · 情感识别 · 音频事件检测</td></tr>
<tr><td>架构</td><td>非自回归(低延迟)</td></tr>
<tr><td>许可证</td><td>开源(可商用)</td></tr>
</tbody>
</table>
<div class="cta">
<h3>开始使用 SenseVoice</h3>
<p>如果这篇指南对你有帮助,欢迎到 GitHub 点个 Star ⭐ 支持开源。</p>
<a href="/go/sensevoice" class="btn">SenseVoice GitHub ★</a>
</div>
<p>延伸阅读:<a href="/vs-whisper.html">FunASR vs Whisper 对比</a> · <a href="/quickstart.html">FunASR 快速上手</a> · <a href="/models.html">全部模型</a></p>
<!--related-posts-->
<h2>相关文章</h2>
<ul class="post-list">
<li><a href="/blog/funasr-vs-whisper-benchmark.html">FunASR vs Whisper 实测对比</a></li>
<li><a href="/blog/fun-asr-nano-guide.html">Fun-ASR-Nano 使用指南</a></li>
<li><a href="/blog/funasr-speaker-diarization.html">说话人分离:谁在何时说话</a></li>
<li><a href="/blog/sensevoice-emotion-language-detection.html">情感与语种检测</a></li>
<li><a href="/blog/funasr-realtime-streaming-asr.html">实时流式语音识别</a></li>
<li><a href="/blog/funasr-transcribe-long-audio.html">转写超长音频(1小时一次搞定)</a></li>
<li><a href="/blog/funasr-cli-transcribe-command-line.html">命令行转写(文本/JSON/SRT)</a></li>
<li><a href="/blog/self-hosted-openai-whisper-api-alternative.html">自托管 OpenAI Whisper API 替代</a></li>
<li><a href="/blog/generate-subtitles-srt-vtt-from-audio-video.html">自动生成字幕(SRT / VTT)</a></li>
<li><a href="/blog/speech-to-text-python-transcribe-audio.html">Python 语音转文字教程</a></li>
<li><a href="/blog/funasr-llama-cpp-whisper-cpp-alternative.html">FunASR 跑进 llama.cpp(whisper.cpp 替代)</a></li>
<li><a href="/blog/funasr-vs-faster-whisper-chinese.html">FunASR vs faster-whisper(中文/粤语)</a></li>
<li><a href="/blog/lightweight-speech-recognition-cpu.html">轻量语音识别(CPU 250MB)</a></li>
<li><a href="/blog/self-hosted-deepgram-assemblyai-alternative.html">自托管替代 Deepgram/AssemblyAI</a></li>
<li><a href="/blog/which-funasr-model.html">选哪个 FunASR 模型</a></li>
<li><a href="/blog/cantonese-speech-recognition.html">粤语语音识别(SenseVoice 原生粤语)</a></li>
<li><a href="/blog/japanese-speech-recognition.html">日语语音识别(SenseVoice 转写+标点+情感)</a></li>
<li><a href="/blog/voice-activity-detection-python.html">Python 语音活动检测(VAD)</a></li>
<li><a href="/blog/self-hosted-google-aws-azure-speech-to-text.html">自托管替代 Google/AWS/Azure 云语音 API</a></li>
<li><a href="/blog/chinese-speech-recognition.html">中文语音识别(普通话)实战</a></li>
<li><a href="/blog/punctuation-restoration-python.html">标点恢复 Python 实战</a></li>
<li><a href="/blog/speech-to-text-timestamps-python.html">语音识别带时间戳(字级)</a></li>
</ul>
</div></article>
<footer><div class="container">© 2024-2026 Tongyi Lab, Alibaba Group · <a href="https://github.com/modelscope/FunASR/blob/main/LICENSE">MIT License</a></div></footer>
</body>
</html>