Merge pull request #3630 from modelscope/codex/publish-moss-github-pages-20260903

docs: publish MOSS discovery on GitHub Pages
This commit is contained in:
zhifu gao
2026-09-03 00:43:20 +08:00
committed by GitHub
8 changed files with 959 additions and 0 deletions
+3
View File
@@ -7,6 +7,9 @@ on:
- 'funasr/**/*.py'
- 'scripts/gen_api_docs.py'
- 'training.html'
- 'docs/moss_transcribe_diarize*.md'
- 'model_zoo/**'
- 'gh-pages-output/**'
- '.github/workflows/update-api-docs.yml'
jobs:
+359
View File
@@ -0,0 +1,359 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="FunASR: Industrial-grade speech recognition toolkit. 170x realtime on GPU, 50+ languages, speaker diarization, emotion detection, OpenAI-compatible API, vLLM acceleration, and agent integration.">
<meta property="og:title" content="FunASR - Open-source speech understanding toolkit">
<meta property="og:description" content="170x realtime, 50+ languages, speaker diarization, vLLM acceleration, and an OpenAI-compatible local speech API.">
<meta property="og:type" content="website">
<meta property="og:url" content="https://modelscope.github.io/FunASR/">
<link rel="canonical" href="https://modelscope.github.io/FunASR/">
<link rel="alternate" hreflang="en" href="https://modelscope.github.io/FunASR/">
<link rel="alternate" hreflang="zh" href="https://modelscope.github.io/FunASR/zh/">
<link rel="alternate" hreflang="ja" href="https://modelscope.github.io/FunASR/ja/">
<link rel="alternate" hreflang="ko" href="https://modelscope.github.io/FunASR/ko/">
<link rel="alternate" hreflang="x-default" href="https://modelscope.github.io/FunASR/">
<meta property="og:site_name" content="FunASR">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="FunASR - Open-source speech understanding toolkit">
<meta name="twitter:description" content="170x realtime, 50+ languages, speaker diarization, vLLM acceleration, and an OpenAI-compatible local speech API.">
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"SoftwareSourceCode","name":"FunASR","description":"FunASR is an open-source speech recognition and speech understanding toolkit with ASR, VAD, punctuation, speaker diarization, emotion detection, vLLM acceleration, and OpenAI-compatible API examples.","url":"https://modelscope.github.io/FunASR/","codeRepository":"https://github.com/modelscope/FunASR","programmingLanguage":"Python","license":"https://github.com/modelscope/FunASR/blob/main/LICENSE","applicationCategory":"Speech recognition toolkit","operatingSystem":["Linux","macOS","Windows"]}
</script>
<title>FunASR - End-to-End Speech Recognition Toolkit</title>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet">
<link rel="stylesheet" href="style.css">
</head>
<body>
<nav class="nav">
<div class="container">
<a href="index.html" class="nav-logo">FunASR</a>
<div class="nav-links">
<a href="index.html" class="active">Home</a>
<a href="tutorial.html">Tutorial</a>
<a href="training.html">Training</a>
<a href="model-registration.html">Develop</a>
<a href="api.html">API</a>
<a href="vllm.html">vLLM</a>
<a href="agent.html">Agent</a>
<a href="benchmark.html">Benchmark</a>
<a href="donors.html">Donors</a>
</div>
<div class="lang-dropdown"><button class="lang-btn">English</button><div class="lang-menu"><a href="index.html" class="current">English</a><a href="zh/index.html">中文</a><a href="ja/index.html">日本語</a><a href="ko/index.html">한국어</a></div></div>
<a href="https://github.com/modelscope/FunASR" class="nav-github">GitHub</a>
</div>
</nav>
<div class="hero">
<div class="container hero-content">
<div class="hero-copy">
<p class="eyebrow">Open-source speech understanding toolkit</p>
<h1>FunASR</h1>
<p>Production-ready ASR, VAD, punctuation, speaker diarization, emotion detection, and audio event recognition with one unified Python interface.</p>
<div class="hero-badges">
<a href="https://pypi.org/project/funasr/"><img src="https://img.shields.io/pypi/v/funasr?style=flat-square&color=2563eb" alt="PyPI"></a>
<a href="https://github.com/modelscope/FunASR/stargazers"><img src="https://img.shields.io/github/stars/modelscope/FunASR?style=flat-square&color=b45309" alt="Stars"></a>
<a href="https://github.com/modelscope/FunASR/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-059669?style=flat-square" alt="License"></a>
</div>
<div class="hero-actions">
<a href="tutorial.html" class="btn btn-white">Get started</a>
<a href="training.html" class="btn btn-outline-white">Training guide</a>
<a href="api.html" class="btn btn-outline-white">API reference</a>
</div>
</div>
<div class="hero-panel" aria-label="FunASR recognition preview">
<div class="terminal-bar">
<span class="terminal-dots"><span></span><span></span><span></span></span>
<span>funasr-pipeline.py</span>
</div>
<pre>from funasr import AutoModel
model = AutoModel(
model="paraformer-zh",
vad_model="fsmn-vad",
punc_model="ct-punc",
spk_model="cam++",
)
res = model.generate(input="meeting.wav")
print(res[0]["sentence_info"])</pre>
<div class="hero-metrics">
<div><strong>50+</strong><span>languages</span></div>
<div><strong>170x</strong><span>realtime</span></div>
<div><strong>1 API</strong><span>pipeline</span></div>
</div>
</div>
</div>
</div>
<section class="alt">
<div class="container">
<h2 class="section-title">What's New</h2>
<p class="section-subtitle">The public docs now track the latest README and main-branch capabilities.</p>
<div class="grid-3">
<div class="card"><h3>llama.cpp / GGUF Runtime</h3><p>runtime-llamacpp-v0.1.8 adds a Linux Vulkan package for SenseVoiceSmall GGUF. Run the self-contained binary with <code>--backend vulkan</code> on supported GPUs.</p><p><a href="deployment-matrix.html#runtime-llamacpp-v0.1.8">Choose the GGUF runtime</a></p></div>
<div class="card"><h3>MOSS-Transcribe-Diarize</h3><p>Use the third-party OpenMOSS model for offline multi-speaker meetings: one request returns text, timestamps, and anonymous speaker labels without an external VAD pipeline.</p><p><a href="moss-transcribe-diarize.html">Choose the MOSS deployment path</a></p></div>
<div class="card"><h3>vLLM Inference Engine</h3><p>2-3x faster LLM decoding for Fun-ASR-Nano, with tensor parallel batch inference and real-time WebSocket service.</p><p><a href="vllm.html">Read the vLLM guide</a></p></div>
<div class="card"><h3>Agent Infrastructure</h3><p><code>funasr-server</code> exposes OpenAI-compatible transcription APIs; MCP and voice-input examples connect local ASR to AI tools.</p><p><a href="agent.html">Set up Agent integration</a></p></div>
<div class="card"><h3>Benchmark Report</h3><p>Long-form benchmark results cover SenseVoice, Paraformer, Fun-ASR-Nano, GLM-ASR, and Whisper variants on GPU and CPU.</p><p><a href="benchmark.html">View benchmark</a></p></div>
</div>
</div>
</section>
<section class="alt">
<div class="container">
<h2 class="section-title">Private Speech API in Minutes</h2>
<p class="section-subtitle">Run an OpenAI-compatible transcription endpoint locally, then plug it into agents, apps, and batch pipelines without sending audio to a cloud ASR provider.</p>
<div class="grid-2">
<div class="card">
<h3>Start the server</h3>
<p>Use SenseVoice for a fast first test, or switch models after the endpoint is running.</p>
<pre>pip install funasr fastapi uvicorn python-multipart
funasr-server --model sensevoice --device cuda</pre>
</div>
<div class="card">
<h3>Verify with curl</h3>
<p>Download a public sample and call the same route used by OpenAI-compatible clients.</p>
<pre>curl -L https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/BAC009S0764W0121.wav -o sample.wav
curl http://localhost:8000/v1/audio/transcriptions \
-F [email protected] \
-F model=sensevoice \
-F response_format=verbose_json</pre>
</div>
</div>
<div class="section-cta">
<a href="https://colab.research.google.com/github/modelscope/FunASR/blob/main/examples/colab/funasr_quickstart.ipynb" class="btn btn-primary">Open in Colab</a>
<a href="https://github.com/modelscope/FunASR/tree/main/examples/openai_api" class="btn btn-primary">OpenAI API example</a>
<a href="https://github.com/modelscope/FunASR/blob/main/examples/openai_api/WORKFLOWS.md" class="btn btn-primary">Workflow recipes</a>
<a href="https://github.com/modelscope/FunASR/blob/main/examples/openai_api/GRADIO.md" class="btn btn-primary">Gradio demo</a>
<a href="https://github.com/modelscope/FunASR/blob/main/examples/openai_api/SECURITY.md" class="btn btn-primary">Security guide</a>
<a href="agent.html" class="btn btn-primary">Agent integration</a>
</div>
</div>
</section>
<section class="docs-band">
<div class="container">
<h2 class="section-title">Documentation</h2>
<p class="section-subtitle">Start with examples, tune on your own data, extend the registry, or jump into source-linked API docs.</p>
<div class="doc-grid">
<a class="doc-card" href="model-selection.html">
<span class="doc-kicker">Choose</span>
<h3>Model Selection</h3>
<p>Pick SenseVoice, Paraformer, Fun-ASR-Nano, streaming runtime, or OpenAI API aliases for your workload.</p>
</a>
<a class="doc-card" href="deployment-matrix.html">
<span class="doc-kicker">Deploy</span>
<h3>Deployment Matrix</h3>
<p>Choose between Python API, OpenAI API, Docker Compose, Kubernetes, WebSocket runtime, vLLM, MCP, batch, subtitles, and Triton.</p>
</a>
<a class="doc-card" href="migration.html">
<span class="doc-kicker">Compare</span>
<h3>Migration Guide</h3>
<p>Evaluate FunASR against Whisper or cloud ASR with feature mapping, representative benchmarks, and rollout checks.</p>
</a>
<a class="doc-card" href="use-cases.html">
<span class="doc-kicker">Choose</span>
<h3>Use Cases</h3>
<p>Find the fastest path for private APIs, agents, streaming, vLLM, subtitles, batch jobs, and benchmarks.</p>
</a>
<a class="doc-card" href="tutorial.html">
<span class="doc-kicker">Learn</span>
<h3>Tutorial</h3>
<p>Install FunASR, choose a model, and run common ASR, VAD, diarization, and export flows.</p>
</a>
<a class="doc-card" href="training.html">
<span class="doc-kicker">Tune</span>
<h3>Training</h3>
<p>Prepare JSONL data, fine-tune Paraformer, SenseVoice, and Fun-ASR-Nano, then monitor runs.</p>
</a>
<a class="doc-card" href="model-registration.html">
<span class="doc-kicker">Extend</span>
<h3>Developer Guide</h3>
<p>Understand the registry, add a model, package remote code, and avoid integration pitfalls.</p>
</a>
<a class="doc-card" href="vllm.html">
<span class="doc-kicker">Accelerate</span>
<h3>vLLM Inference</h3>
<p>Run LLM-based ASR with vLLM, tensor parallel batch decoding, streaming SDK, and WebSocket service.</p>
</a>
<a class="doc-card" href="agent.html">
<span class="doc-kicker">Integrate</span>
<h3>Agent & API</h3>
<p>Expose FunASR as an OpenAI-compatible endpoint, low-code workflow node, MCP tool, voice input, or subtitle generator.</p>
</a>
<a class="doc-card" href="benchmark.html">
<span class="doc-kicker">Measure</span>
<h3>Benchmark</h3>
<p>Compare FunASR and Whisper on long-form audio, including GPU and CPU speed/CER numbers.</p>
</a>
<a class="doc-card" href="api.html">
<span class="doc-kicker">Reference</span>
<h3>API</h3>
<p>Browse generated classes, methods, source previews, and GitHub line links.</p>
</a>
</div>
</div>
</section>
<section>
<div class="container">
<h2 class="section-title">Capabilities</h2>
<p class="section-subtitle">Everything needed for speech understanding, from raw audio segmentation to speaker-aware transcripts.</p>
<div class="grid-3">
<div class="card">
<div class="card-icon">ASR</div>
<h3>Speech Recognition</h3>
<p>Streaming and offline ASR with VAD segmentation. Process long-form audio with a single API call.</p>
</div>
<div class="card">
<div class="card-icon">50+</div>
<h3>Multilingual Models</h3>
<p>Fun-ASR-Nano covers 31 languages and Qwen3-ASR covers 52 languages with language detection.</p>
</div>
<div class="card">
<div class="card-icon">SPK</div>
<h3>Speaker Diarization</h3>
<p>Identify who spoke when, then attach speaker labels to sentence-level ASR output.</p>
</div>
<div class="card">
<div class="card-icon">SFX</div>
<h3>Emotion & Events</h3>
<p>SenseVoice detects emotion and audio events including background music, applause, laughter, and crying.</p>
</div>
<div class="card">
<div class="card-icon">RTF</div>
<h3>Low Latency</h3>
<p>Non-autoregressive models support fast batch and realtime workloads across common deployment targets.</p>
</div>
<div class="card">
<div class="card-icon">OPS</div>
<h3>Train & Deploy</h3>
<p>Fine-tune with DeepSpeed, export to ONNX, and deploy through Docker runtime or the Python SDK.</p>
</div>
</div>
</div>
</section>
<section class="alt">
<div class="container">
<h2 class="section-title">Models</h2>
<p class="section-subtitle">Pre-trained industrial models ready for recognition, segmentation, and speech understanding workflows.</p>
<div class="grid-2">
<div class="card">
<h3>Fun-ASR-Nano</h3>
<p>End-to-end ASR trained on tens of millions of hours. 31 languages, dialects, accents, lyrics, timestamps, and hotwords.</p>
<div class="card-tags">
<span class="tag">800M</span>
<span class="tag">31 Languages</span>
<span class="tag">Timestamps</span>
<span class="tag">Speaker Diarization</span>
<span class="tag">Hotwords</span>
</div>
</div>
<div class="card">
<h3>Paraformer</h3>
<p>Non-autoregressive Chinese and English ASR with streaming and offline variants for production systems.</p>
<div class="card-tags">
<span class="tag">Streaming</span>
<span class="tag">Offline</span>
<span class="tag">Hotwords</span>
<span class="tag">ONNX</span>
</div>
</div>
<div class="card">
<h3>SenseVoice</h3>
<p>Multi-task speech understanding for ASR, language ID, emotion, and audio events across five languages.</p>
<div class="card-tags">
<span class="tag">Emotion</span>
<span class="tag">Audio Events</span>
<span class="tag">Speaker Diarization</span>
<span class="tag">70ms/10s</span>
</div>
</div>
<div class="card">
<h3>Qwen3-ASR</h3>
<p>LLM-based ASR with 52 languages, contextual understanding, and automatic language detection.</p>
<div class="card-tags">
<span class="tag">52 Languages</span>
<span class="tag">0.6B / 1.7B</span>
<span class="tag">Context-aware</span>
</div>
</div>
</div>
</div>
</section>
<section>
<div class="container narrow">
<h2 class="section-title">Quick Start</h2>
<p class="section-subtitle">Install locally, or run the <a href="https://github.com/modelscope/FunASR/tree/main/examples/colab">Colab quickstart</a> first to transcribe a sample in your browser.</p>
<pre>pip install funasr
# Or latest: pip install git+https://github.com/modelscope/FunASR.git</pre>
<pre>from funasr import AutoModel
model = AutoModel(
model="paraformer-zh",
vad_model="fsmn-vad",
punc_model="ct-punc",
spk_model="cam++",
)
res = model.generate(input="meeting.wav", batch_size_s=300)
for sent in res[0]["sentence_info"]:
print(f"[Speaker {sent['spk']}] {sent['text']}")</pre>
<div class="section-cta">
<a href="https://colab.research.google.com/github/modelscope/FunASR/blob/main/examples/colab/funasr_quickstart.ipynb" class="btn btn-primary">Open in Colab</a>
<a href="tutorial.html" class="btn btn-primary">Full tutorial</a>
</div>
</div>
</section>
<section class="alt">
<div class="container">
<h2 class="section-title">Ecosystem</h2>
<p class="section-subtitle">Related projects around ASR, speech understanding, video clipping, and voice generation.</p>
<div class="grid-2">
<div class="card">
<h3><a class="card-title-link" href="https://github.com/QwenAudio/Fun-ASR">Fun-ASR-Nano</a></h3>
<p>The latest ASR large model with multilingual recognition, timestamps, speaker diarization, and hotwords.</p>
</div>
<div class="card">
<h3><a class="card-title-link" href="https://github.com/QwenAudio/SenseVoice">SenseVoice</a></h3>
<p>Multi-task speech understanding for ASR, emotion detection, and audio event recognition.</p>
</div>
<div class="card">
<h3><a class="card-title-link" href="https://github.com/modelscope/FunClip">FunClip</a></h3>
<p>AI video clipping powered by FunASR and LLM-assisted editing workflows.</p>
</div>
<div class="card">
<h3><a class="card-title-link" href="https://github.com/QwenAudio/CosyVoice">CosyVoice</a></h3>
<p>Natural speech generation with multi-language, timbre, and emotion control.</p>
</div>
</div>
</div>
</section>
<footer>
<p>FunASR &middot; Tongyi Lab, Alibaba Group</p>
<p>
<a href="https://github.com/modelscope/FunASR">GitHub</a> &middot;
<a href="training.html">Training</a> &middot;
<a href="use-cases.html">Use Cases</a> &middot;
<a href="deployment-matrix.html">Deployment</a> &middot;
<a href="api.html">API</a> &middot;
<a href="vllm.html">vLLM</a> &middot;
<a href="agent.html">Agent</a> &middot;
<a href="benchmark.html">Benchmark</a> &middot;
<a href="https://github.com/modelscope/FunASR/blob/main/MODEL_LICENSE">License</a> &middot;
<a href="https://pypi.org/project/funasr/">PyPI</a> &middot;
<a href="https://github.com/modelscope/FunASR/issues">Issues</a>
</p>
</footer>
</body>
</html>
+77
View File
@@ -0,0 +1,77 @@
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta name="description" content="Choose the right FunASR model: SenseVoice, Paraformer, Fun-ASR-Nano, streaming runtime, OpenAI API aliases, and deployment paths.">
<meta property="og:title" content="FunASR Model Selection Guide">
<meta property="og:description" content="A practical guide for choosing FunASR models, API aliases, runtimes, and benchmark paths before deployment.">
<meta property="og:type" content="website">
<meta property="og:url" content="https://modelscope.github.io/FunASR/model-selection.html">
<link rel="canonical" href="https://modelscope.github.io/FunASR/model-selection.html">
<meta property="og:site_name" content="FunASR">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="FunASR Model Selection Guide">
<meta name="twitter:description" content="Choose the right FunASR model: SenseVoice, Paraformer, Fun-ASR-Nano, streaming runtime, OpenAI API aliases, and deployment paths.">
<title>FunASR Model Selection Guide</title>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
<link rel="stylesheet" href="style.css">
</head><body>
<nav class="nav"><div class="container">
<a href="index.html" class="nav-logo">FunASR</a>
<div class="nav-links"><a href="index.html">Home</a><a href="tutorial.html">Tutorial</a><a href="training.html">Training</a><a href="model-registration.html">Develop</a><a href="api.html">API</a><a href="vllm.html">vLLM</a><a href="agent.html">Agent</a><a href="benchmark.html">Benchmark</a>
<a href="donors.html">Donors</a></div>
<div class="lang-dropdown"><button class="lang-btn">English</button><div class="lang-menu"><a href="model-selection.html" class="current">English</a><a href="zh/model-selection.html">中文</a><a href="ja/model-selection.html">日本語</a><a href="ko/model-selection.html">한국어</a></div></div>
<a href="https://github.com/modelscope/FunASR" class="nav-github">GitHub</a>
</div></nav>
<div class="content"><div class="container narrow">
<h1>Model Selection Guide</h1>
<p>Choose a first model, compare FunASR with Whisper or cloud ASR, and decide which model alias to expose through the OpenAI-compatible API.</p>
<div class="toc-grid"><a href="#default">Fast default</a><a href="#decision">Decision table</a><a href="#aliases">API aliases</a><a href="#runtime">Runtime path</a><a href="#benchmark">Benchmark</a></div>
<section id="default"><h2>Fast default path</h2>
<p>If you are unsure, start with <strong>SenseVoice-Small</strong>. It is the strongest first choice for demos, private APIs, multilingual transcription, speaker-aware meeting transcripts, and agent voice input.</p>
<pre><code>from funasr import AutoModel
model = AutoModel(
model="iic/SenseVoiceSmall",
vad_model="fsmn-vad",
spk_model="cam++",
device="cuda", # use "cpu" for a portable smoke test
)
result = model.generate(input="meeting.wav")</code></pre>
</section>
<section id="decision"><h2>Decision table</h2>
<table><tr><th>Need</th><th>Start with</th><th>Why</th><th>Next doc</th></tr>
<tr><td>Fast multilingual private transcription</td><td>SenseVoice-Small</td><td>Strong default with ASR, emotion tags, audio event tags, and CPU viability.</td><td><a href="tutorial.html">Tutorial</a></td></tr>
<tr><td>Mandarin production ASR</td><td>Paraformer-Large</td><td>Mature Chinese ASR path with VAD and punctuation.</td><td><a href="tutorial.html">Tutorial</a></td></tr>
<tr><td>English-only route in the API example</td><td><code>paraformer-en</code></td><td>Compact English route for OpenAI-style compatibility checks.</td><td><a href="agent.html#server">OpenAI API</a></td></tr>
<tr><td>LLM-based ASR or 31-language experiments</td><td>Fun-ASR-Nano</td><td>LLM-based path; use vLLM when decoder throughput matters.</td><td><a href="vllm.html">vLLM guide</a></td></tr>
<tr><td>Offline multi-speaker meeting transcription and anonymous diarization</td><td>OpenMOSS-Team/MOSS-Transcribe-Diarize</td><td>One model jointly emits long-form text, timestamps, and anonymous speaker labels; do not add an external VAD or diarization pipeline.</td><td><a href="moss-transcribe-diarize.html">MOSS guide</a></td></tr>
<tr><td>Live captions or call-center streams</td><td>Runtime WebSocket service</td><td>Designed for long-lived streaming sessions and partial results.</td><td><a href="tutorial.html#streaming">Realtime examples</a></td></tr>
<tr><td>Migration from Whisper/cloud ASR</td><td>SenseVoice-Small first</td><td>Gives a strong baseline before deeper model-specific tuning.</td><td><a href="migration.html">Migration guide</a></td></tr></table>
</section>
<section id="aliases"><h2>OpenAI-compatible API aliases</h2>
<p>The <code>examples/openai_api</code> server exposes short aliases so application teams do not need to know model repository IDs.</p>
<table><tr><th>Alias</th><th>Underlying path</th><th>Use when</th></tr>
<tr><td><code>sensevoice</code></td><td><code>iic/SenseVoiceSmall</code></td><td>You want the default private speech API with multilingual ASR, event tags, and good CPU/GPU behavior.</td></tr>
<tr><td><code>paraformer</code></td><td><code>paraformer-zh</code></td><td>You want a Mandarin-oriented production route with VAD and punctuation.</td></tr>
<tr><td><code>paraformer-en</code></td><td><code>paraformer-en</code></td><td>You want a compact English route in OpenAI-style clients.</td></tr>
<tr><td><code>fun-asr-nano</code></td><td><code>FunAudioLLM/Fun-ASR-Nano-2512</code></td><td>You are evaluating LLM-based ASR, 31-language coverage, or vLLM acceleration.</td></tr></table>
<pre><code>curl http://localhost:8000/v1/models
python examples/openai_api/smoke_test.py --base-url http://localhost:8000 --model sensevoice</code></pre>
</section>
<section id="runtime"><h2>Runtime path by workload</h2>
<table><tr><th>Workload</th><th>Runtime path</th><th>Notes</th></tr>
<tr><td>Notebook or one-off evaluation</td><td>Python <code>AutoModel</code></td><td>Shortest path for install, model download, and output-shape checks.</td></tr>
<tr><td>Internal HTTP service</td><td>OpenAI-compatible API</td><td>Reuse OpenAI-style clients, Dify, n8n, LangChain, AutoGen, and HTTP nodes.</td></tr>
<tr><td>Repeatable local container demo</td><td>Docker Compose API</td><td>CPU-first smoke test; adapt the image before using CUDA.</td></tr>
<tr><td>Internal cluster service</td><td>Kubernetes API template</td><td>Private ClusterIP, persistent model cache, health probes, and port-forward smoke test.</td></tr>
<tr><td>Live audio</td><td>Runtime WebSocket service</td><td>Validate chunking, VAD, endpointing, reconnects, and client backpressure with real audio.</td></tr>
<tr><td>LLM-based ASR throughput</td><td>vLLM path for Fun-ASR-Nano</td><td>vLLM accelerates autoregressive decoding; it does not apply to non-autoregressive Paraformer.</td></tr>
<tr><td>Offline MOSS service</td><td>FunASR HTTP, vLLM, or SGLang Omni</td><td>Keep the native speaker-segment contract; MOSS is an OpenMOSS third-party offline model, not the realtime WebSocket route.</td></tr></table>
<p>See the <a href="deployment-matrix.html">deployment matrix</a> when you are choosing between these paths.</p>
</section>
<section id="benchmark"><h2>Benchmark before committing</h2>
<ul><li>Use 20-50 representative audio files that cover short clips, long meetings, silence, noise, overlapping speakers, domain vocabulary, and target languages.</li><li>Record model name, model revision, FunASR version, device, CPU/GPU type, CUDA/PyTorch version, runtime path, batch size, and whether warmup/model download time is excluded.</li><li>Track quality with your normal WER/CER or human review process, not only transcript readability.</li><li>Track latency, throughput, memory, failures, and upload size limits together.</li><li>Keep at least one public sample for smoke tests and at least one private realistic sample for deployment validation.</li></ul>
<p>For migration work, use the <a href="https://github.com/modelscope/FunASR/tree/main/examples/migration">migration benchmark example</a> and the <a href="migration.html">migration guide</a>.</p>
</section>
</div></div>
<footer><p>FunASR &middot; Tongyi Lab, Alibaba Group</p><p><a href="index.html">Home</a> &middot; <a href="model-selection.html">Model Selection</a> &middot; <a href="migration.html">Migration</a> &middot; <a href="use-cases.html">Use Cases</a> &middot; <a href="deployment-matrix.html">Deployment</a> &middot; <a href="agent.html">Agent</a> &middot; <a href="benchmark.html">Benchmark</a> &middot; <a href="https://github.com/modelscope/FunASR">GitHub</a></p></footer>
</body></html>
@@ -0,0 +1,27 @@
<!DOCTYPE html>
<html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta name="description" content="Deploy the third-party OpenMOSS MOSS-Transcribe-Diarize model through FunASR, vLLM, SGLang Omni, LocalAI, Docker, Kubernetes, and FunClip.">
<meta property="og:title" content="MOSS-Transcribe-Diarize deployment guide">
<meta property="og:description" content="Long-form transcription, timestamps, and anonymous speaker labels through the FunASR ecosystem.">
<meta property="og:type" content="website"><meta property="og:url" content="https://modelscope.github.io/FunASR/moss-transcribe-diarize.html">
<link rel="canonical" href="https://modelscope.github.io/FunASR/moss-transcribe-diarize.html"><meta property="og:site_name" content="FunASR">
<title>MOSS-Transcribe-Diarize deployment guide</title>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
<link rel="stylesheet" href="style.css"></head><body>
<nav class="nav"><div class="container"><a href="index.html" class="nav-logo">FunASR</a><div class="nav-links"><a href="index.html">Home</a><a href="deployment-matrix.html" class="active">Deployment</a><a href="api.html">API</a><a href="agent.html">Agent</a></div><div class="lang-dropdown"><button class="lang-btn">English</button><div class="lang-menu"><a href="moss-transcribe-diarize.html" class="current">English</a><a href="zh/moss-transcribe-diarize.html">中文</a></div></div><a href="https://github.com/modelscope/FunASR" class="nav-github">GitHub</a></div></nav>
<div class="content"><div class="container narrow">
<h1>MOSS-Transcribe-Diarize</h1>
<p>FunASR integrates the third-party Apache-2.0 model <a href="https://huggingface.co/OpenMOSS-Team/MOSS-Transcribe-Diarize"><code>OpenMOSS-Team/MOSS-Transcribe-Diarize</code></a> published by OpenMOSS. It jointly generates long-form transcription, timestamps, and anonymous labels such as <code>S01</code> and <code>S02</code>, without an external VAD or speaker pipeline.</p>
<div class="toc-grid"><a href="#contract">Contract</a><a href="#server">FunASR server</a><a href="#runtimes">Runtime matrix</a><a href="#evidence">Evidence</a><a href="#boundaries">Boundaries</a></div>
<section id="contract"><h2>Output contract</h2><table><tr><th>Field</th><th>Meaning</th></tr><tr><td><code>text</code></td><td>Readable transcript without MOSS control tags.</td></tr><tr><td><code>timestamp</code></td><td>Segment-level start and end times in milliseconds.</td></tr><tr><td><code>sentence_info</code></td><td>Normalized segments with <code>start</code>, <code>end</code>, <code>text</code>, and anonymous <code>spk</code>.</td></tr><tr><td><code>raw_text</code></td><td>Exact tagged model generation retained for auditing.</td></tr></table></section>
<section id="server"><h2>FunASR OpenAI-compatible service</h2><pre><code>python -m pip install "transformers&gt;=5.6,&lt;6" fastapi uvicorn python-multipart
funasr-server --model moss-transcribe-diarize --device cuda:0 --port 8000
curl -fsS http://127.0.0.1:8000/v1/audio/transcriptions \
-F [email protected] \
-F model=moss-transcribe-diarize \
-F response_format=verbose_json</code></pre><p>The response preserves native anonymous speaker segments. A generic <code>spk=true</code> field does not start a second diarization model for MOSS.</p></section>
<section id="runtimes"><h2>Deployment paths</h2><table><tr><th>Path</th><th>Use when</th><th>Contract</th></tr><tr><td>FunASR server</td><td>You need a self-hosted HF GPU endpoint, Docker Compose, or Kubernetes.</td><td><code>verbose_json</code> with speaker segments.</td></tr><tr><td>vLLM</td><td>You operate its scheduler and need the native audio endpoint.</td><td><code>diarized_json</code>; FunASR can normalize it through <code>AutoModel</code>.</td></tr><tr><td>SGLang Omni</td><td>You use its native MOSS pipeline.</td><td><code>verbose_json</code>; FunASR validates speaker prefixes before normalization.</td></tr><tr><td>LocalAI / moss-transcribe.cpp</td><td>You need a third-party GGUF CPU or desktop-edge path.</td><td>Independent C++ implementation; validate its output separately.</td></tr><tr><td>FunClip</td><td>You need speaker-aware SRT and clips.</td><td>Consumes the normalized <code>sentence_info</code> contract.</td></tr></table><p><a href="https://www.funasr.com/en/deploy/moss-transcribe-diarize.html">Open the production deployment hub for complete pinned commands →</a></p></section>
<section id="evidence"><h2>Verified service smoke</h2><p>On one H100 80GB with Transformers <code>5.16.0.dev0</code>, Torch <code>2.11.0+cu130</code>, and model revision <code>e8681d68</code>, the real FunASR HTTP endpoint processed the bundled 6.0-second sample and returned HTTP 200, <code>duration=6.0</code>, and one non-empty monotonic segment labelled <code>S01</code>. This proves the service contract only, not accuracy, throughput, concurrency, or capacity.</p></section>
<section id="boundaries"><h2>Production boundaries</h2><ul><li>MOSS is owned and published by OpenMOSS; FunASR owns this adapter and deployment contract.</li><li>Pin and audit the model revision because the HF path uses <code>trust_remote_code</code>.</li><li>MOSS is an offline long-form model and is not exposed by the realtime WebSocket service.</li><li>Speaker labels are anonymous clustering labels, not known-person identity or voiceprint verification.</li><li>Do not externally VAD-split a meeting when global speaker continuity matters.</li></ul><p><a href="https://github.com/modelscope/FunASR/blob/main/docs/moss_transcribe_diarize.md">Repository guide</a> · <a href="https://github.com/OpenMOSS/MOSS-Transcribe-Diarize">OpenMOSS upstream</a> · <a href="https://www.funasr.com/en/blog/funclip-v2-2-0-moss-speaker-clipping.html">FunClip integration</a></p></section>
</div></div><footer><p>FunASR &middot; Tongyi Lab, Alibaba Group</p><p><a href="index.html">Home</a> &middot; <a href="deployment-matrix.html">Deployment</a> &middot; <a href="https://github.com/modelscope/FunASR">GitHub</a></p></footer></body></html>
+359
View File
@@ -0,0 +1,359 @@
<!DOCTYPE html>
<html lang="zh-CN">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="FunASR 是工业级开源语音识别工具包,支持 GPU 170x 实时、50+ 语言、说话人分离、情感检测、OpenAI 兼容 API、vLLM 加速和 Agent 集成。">
<meta property="og:title" content="FunASR - 开源语音理解工具包">
<meta property="og:description" content="GPU 170x 实时、50+ 语言、说话人分离、vLLM 加速和本地 OpenAI 兼容语音 API。">
<meta property="og:type" content="website">
<meta property="og:url" content="https://modelscope.github.io/FunASR/zh/">
<link rel="canonical" href="https://modelscope.github.io/FunASR/zh/">
<link rel="alternate" hreflang="en" href="https://modelscope.github.io/FunASR/">
<link rel="alternate" hreflang="zh" href="https://modelscope.github.io/FunASR/zh/">
<link rel="alternate" hreflang="ja" href="https://modelscope.github.io/FunASR/ja/">
<link rel="alternate" hreflang="ko" href="https://modelscope.github.io/FunASR/ko/">
<link rel="alternate" hreflang="x-default" href="https://modelscope.github.io/FunASR/">
<meta property="og:site_name" content="FunASR">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="FunASR - 开源语音理解工具包">
<meta name="twitter:description" content="GPU 170x 实时、50+ 语言、说话人分离、vLLM 加速和本地 OpenAI 兼容语音 API。">
<script type="application/ld+json">
{"@context":"https://schema.org","@type":"SoftwareSourceCode","name":"FunASR","description":"FunASR 是开源语音识别与语音理解工具包,支持 ASR、VAD、标点恢复、说话人分离、情感检测、vLLM 加速和 OpenAI 兼容 API 示例。","url":"https://modelscope.github.io/FunASR/zh/","codeRepository":"https://github.com/modelscope/FunASR","programmingLanguage":"Python","license":"https://github.com/modelscope/FunASR/blob/main/LICENSE","applicationCategory":"Speech recognition toolkit","operatingSystem":["Linux","macOS","Windows"]}
</script>
<title>FunASR - 端到端语音识别工具包</title>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet">
<link rel="stylesheet" href="../style.css">
</head>
<body>
<nav class="nav">
<div class="container">
<a href="index.html" class="nav-logo">FunASR</a>
<div class="nav-links">
<a href="index.html" class="active">首页</a>
<a href="tutorial.html">教程</a>
<a href="training.html">训练</a>
<a href="model-registration.html">开发</a>
<a href="../api.html">API</a>
<a href="vllm.html">vLLM</a>
<a href="agent.html">Agent</a>
<a href="benchmark.html">Benchmark</a>
<a href="../donors.html">功德榜</a>
</div>
<div class="lang-dropdown"><button class="lang-btn">中文</button><div class="lang-menu"><a href="../index.html">English</a><a href="index.html" class="current">中文</a><a href="../ja/index.html">日本語</a><a href="../ko/index.html">한국어</a></div></div>
<a href="https://github.com/modelscope/FunASR" class="nav-github">GitHub</a>
</div>
</nav>
<div class="hero">
<div class="container hero-content">
<div class="hero-copy">
<p class="eyebrow">开源语音理解工具包</p>
<h1>FunASR</h1>
<p>生产级语音识别、语音检测、标点恢复、说话人分离、情感检测、音频事件识别——统一的 Python 接口。</p>
<div class="hero-badges">
<a href="https://pypi.org/project/funasr/"><img src="https://img.shields.io/pypi/v/funasr?style=flat-square&color=2563eb" alt="PyPI"></a>
<a href="https://github.com/modelscope/FunASR/stargazers"><img src="https://img.shields.io/github/stars/modelscope/FunASR?style=flat-square&color=b45309" alt="Stars"></a>
<a href="https://github.com/modelscope/FunASR/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-059669?style=flat-square" alt="License"></a>
</div>
<div class="hero-actions">
<a href="tutorial.html" class="btn btn-white">快速开始</a>
<a href="training.html" class="btn btn-outline-white">训练指南</a>
<a href="../api.html" class="btn btn-outline-white">API 文档</a>
</div>
</div>
<div class="hero-panel" aria-label="FunASR 识别预览">
<div class="terminal-bar">
<span class="terminal-dots"><span></span><span></span><span></span></span>
<span>funasr-pipeline.py</span>
</div>
<pre>from funasr import AutoModel
model = AutoModel(
model="paraformer-zh",
vad_model="fsmn-vad",
punc_model="ct-punc",
spk_model="cam++",
)
res = model.generate(input="meeting.wav")
print(res[0]["sentence_info"])</pre>
<div class="hero-metrics">
<div><strong>50+</strong><span>语言</span></div>
<div><strong>170x</strong><span>实时</span></div>
<div><strong>1个API</strong><span>全流程</span></div>
</div>
</div>
</div>
</div>
<section class="alt">
<div class="container">
<h2 class="section-title">最新动态</h2>
<p class="section-subtitle">网站文档已对齐 README 和 main 分支最新能力。</p>
<div class="grid-3">
<div class="card"><h3>llama.cpp / GGUF 运行时</h3><p>runtime-llamacpp-v0.1.8 新增 SenseVoiceSmall GGUF 的 Linux Vulkan 包。支持 Vulkan 的 GPU 可用自包含二进制和 <code>--backend vulkan</code> 运行。</p><p><a href="deployment-matrix.html#runtime-llamacpp-v0.1.8">选择 GGUF 运行时</a></p></div>
<div class="card"><h3>MOSS-Transcribe-Diarize</h3><p>使用 OpenMOSS 的第三方离线模型处理多人会议:一次请求返回文本、时间戳和匿名说话人标签,不需要外挂 VAD 流水线。</p><p><a href="moss-transcribe-diarize.html">选择 MOSS 部署路径</a></p></div>
<div class="card"><h3>vLLM 推理引擎</h3><p>Fun-ASR-Nano LLM 解码加速 2-3 倍,支持 tensor parallel 批量推理和实时 WebSocket 服务。</p><p><a href="vllm.html">阅读 vLLM 文档</a></p></div>
<div class="card"><h3>Agent 基础设施</h3><p><code>funasr-server</code> 提供 OpenAI 兼容转写 API;MCP 和语音输入示例可把本地 ASR 接入 AI 工具。</p><p><a href="agent.html">配置 Agent 集成</a></p></div>
<div class="card"><h3>性能评测</h3><p>长音频评测覆盖 SenseVoice、Paraformer、Fun-ASR-Nano、GLM-ASR 和 Whisper 变体,包含 GPU/CPU 结果。</p><p><a href="benchmark.html">查看评测</a></p></div>
</div>
</div>
</section>
<section class="alt">
<div class="container">
<h2 class="section-title">几分钟部署私有语音 API</h2>
<p class="section-subtitle">在本地启动 OpenAI 兼容的转写接口,将语音能力接入 Agent、应用和批处理流水线,无需把音频发送到云端 ASR 服务。</p>
<div class="grid-2">
<div class="card">
<h3>启动服务</h3>
<p>先用 SenseVoice 快速验证,服务启动后也可以切换到其他模型。</p>
<pre>pip install funasr fastapi uvicorn python-multipart
funasr-server --model sensevoice --device cuda</pre>
</div>
<div class="card">
<h3>用 curl 验证</h3>
<p>下载公开测试音频,调用与 OpenAI 兼容客户端一致的接口路径。</p>
<pre>curl -L https://isv-data.oss-cn-hangzhou.aliyuncs.com/ics/MaaS/ASR/test_audio/BAC009S0764W0121.wav -o sample.wav
curl http://localhost:8000/v1/audio/transcriptions \
-F [email protected] \
-F model=sensevoice \
-F response_format=verbose_json</pre>
</div>
</div>
<div class="section-cta">
<a href="https://colab.research.google.com/github/modelscope/FunASR/blob/main/examples/colab/funasr_quickstart.ipynb" class="btn btn-primary">打开 Colab</a>
<a href="https://github.com/modelscope/FunASR/blob/main/examples/openai_api/README_zh.md" class="btn btn-primary">OpenAI API 示例</a>
<a href="https://github.com/modelscope/FunASR/blob/main/examples/openai_api/WORKFLOWS_zh.md" class="btn btn-primary">工作流配方</a>
<a href="https://github.com/modelscope/FunASR/blob/main/examples/openai_api/GRADIO_zh.md" class="btn btn-primary">Gradio 演示</a>
<a href="https://github.com/modelscope/FunASR/blob/main/examples/openai_api/SECURITY_zh.md" class="btn btn-primary">安全指南</a>
<a href="agent.html" class="btn btn-primary">Agent 集成</a>
</div>
</div>
</section>
<section class="docs-band">
<div class="container">
<h2 class="section-title">文档中心</h2>
<p class="section-subtitle">从示例开始,在自己的数据上微调,扩展模型注册表,或查阅带源码链接的 API 文档。</p>
<div class="doc-grid">
<a class="doc-card" href="model-selection.html">
<span class="doc-kicker">选型</span>
<h3>模型选择</h3>
<p>为你的场景选择 SenseVoice、Paraformer、Fun-ASR-Nano、流式服务或 OpenAI API alias。</p>
</a>
<a class="doc-card" href="deployment-matrix.html">
<span class="doc-kicker">部署</span>
<h3>部署选型</h3>
<p>对比 Python API、OpenAI API、Docker Compose、Kubernetes、WebSocket、vLLM、MCP、批处理、字幕和 Triton。</p>
</a>
<a class="doc-card" href="migration.html">
<span class="doc-kicker">对比</span>
<h3>迁移指南</h3>
<p>用功能映射、代表性评测和上线检查,评估是否从 Whisper 或云端 ASR 切到 FunASR。</p>
</a>
<a class="doc-card" href="use-cases.html">
<span class="doc-kicker">选型</span>
<h3>场景速览</h3>
<p>快速找到私有 API、Agent、流式、vLLM、字幕、批处理和评测的最佳入口。</p>
</a>
<a class="doc-card" href="tutorial.html">
<span class="doc-kicker">学习</span>
<h3>使用教程</h3>
<p>安装 FunASR,选择模型,运行语音识别、VAD、说话人分离和导出流程。</p>
</a>
<a class="doc-card" href="training.html">
<span class="doc-kicker">微调</span>
<h3>模型训练</h3>
<p>准备 JSONL 数据,微调 Paraformer、SenseVoice、Fun-ASR-Nano,监控训练过程。</p>
</a>
<a class="doc-card" href="model-registration.html">
<span class="doc-kicker">扩展</span>
<h3>开发指南</h3>
<p>理解注册表机制,添加新模型,打包独立仓库代码,避免集成陷阱。</p>
</a>
<a class="doc-card" href="vllm.html">
<span class="doc-kicker">加速</span>
<h3>vLLM 推理</h3>
<p>使用 vLLM 加速 LLM-based ASR,支持多卡批量解码、流式 SDK 和 WebSocket 服务。</p>
</a>
<a class="doc-card" href="agent.html">
<span class="doc-kicker">集成</span>
<h3>Agent 与 API</h3>
<p>将 FunASR 暴露为 OpenAI 兼容接口、低代码工作流节点、MCP 工具、语音输入法或字幕生成器。</p>
</a>
<a class="doc-card" href="benchmark.html">
<span class="doc-kicker">评测</span>
<h3>性能评测</h3>
<p>对比 FunASR 与 Whisper 在长音频上的 GPU/CPU 速度和 CER。</p>
</a>
<a class="doc-card" href="../api.html">
<span class="doc-kicker">参考</span>
<h3>API</h3>
<p>浏览自动生成的类、方法文档,查看源码预览和 GitHub 行号链接。</p>
</a>
</div>
</div>
</section>
<section>
<div class="container">
<h2 class="section-title">核心能力</h2>
<p class="section-subtitle">语音理解所需的一切——从音频分段到带说话人标注的转写结果。</p>
<div class="grid-3">
<div class="card">
<div class="card-icon">ASR</div>
<h3>语音识别</h3>
<p>支持流式和离线 ASR,内置 VAD 分段。单次 API 调用即可处理数小时的长音频。</p>
</div>
<div class="card">
<div class="card-icon">50+</div>
<h3>多语言模型</h3>
<p>Fun-ASR-Nano 覆盖 31 种语言含中文方言,Qwen3-ASR 覆盖 52 种语言并自动检测语种。</p>
</div>
<div class="card">
<div class="card-icon">SPK</div>
<h3>说话人分离</h3>
<p>识别"谁在什么时候说了什么",将说话人标签附加到句子级 ASR 输出。</p>
</div>
<div class="card">
<div class="card-icon">SFX</div>
<h3>情感与音频事件</h3>
<p>SenseVoice 可检测语音情感和音频事件——背景音乐、掌声、笑声、哭声。</p>
</div>
<div class="card">
<div class="card-icon">RTF</div>
<h3>低延迟</h3>
<p>非自回归模型支持高效批处理和实时场景,可部署在各种硬件上。</p>
</div>
<div class="card">
<div class="card-icon">OPS</div>
<h3>训练与部署</h3>
<p>支持 DeepSpeed 微调、ONNX 导出、Docker 运行时和 Python SDK 部署。</p>
</div>
</div>
</div>
</section>
<section class="alt">
<div class="container">
<h2 class="section-title">模型</h2>
<p class="section-subtitle">预训练工业级模型,用于语音识别、音频分段和语音理解流水线。</p>
<div class="grid-2">
<div class="card">
<h3>Fun-ASR-Nano</h3>
<p>基于数千万小时数据训练的端到端 ASR。支持 31 种语言、方言、歌词、时间戳和热词。</p>
<div class="card-tags">
<span class="tag">8亿参数</span>
<span class="tag">31种语言</span>
<span class="tag">时间戳</span>
<span class="tag">说话人分离</span>
<span class="tag">热词</span>
</div>
</div>
<div class="card">
<h3>Paraformer</h3>
<p>非自回归中英文语音识别,提供流式和离线版本,适用于生产系统。</p>
<div class="card-tags">
<span class="tag">流式</span>
<span class="tag">离线</span>
<span class="tag">热词</span>
<span class="tag">ONNX</span>
</div>
</div>
<div class="card">
<h3>SenseVoice</h3>
<p>多任务语音理解:语音识别、语种识别、情感检测、音频事件检测,支持 5 种语言。</p>
<div class="card-tags">
<span class="tag">情感</span>
<span class="tag">音频事件</span>
<span class="tag">说话人分离</span>
<span class="tag">70ms/10s</span>
</div>
</div>
<div class="card">
<h3>Qwen3-ASR</h3>
<p>基于大语言模型的语音识别,支持 52 种语言,具备上下文理解和自动语种检测能力。</p>
<div class="card-tags">
<span class="tag">52种语言</span>
<span class="tag">0.6B / 1.7B</span>
<span class="tag">上下文感知</span>
</div>
</div>
</div>
</div>
</section>
<section>
<div class="container narrow">
<h2 class="section-title">快速开始</h2>
<p class="section-subtitle">可以本地安装,也可以先运行 <a href="https://github.com/modelscope/FunASR/blob/main/examples/colab/README_zh.md">Colab 快速体验</a>,在浏览器里转写样例音频。</p>
<pre>pip install funasr
# 或安装最新版:pip install git+https://github.com/modelscope/FunASR.git</pre>
<pre>from funasr import AutoModel
model = AutoModel(
model="paraformer-zh",
vad_model="fsmn-vad",
punc_model="ct-punc",
spk_model="cam++",
)
res = model.generate(input="meeting.wav", batch_size_s=300)
for sent in res[0]["sentence_info"]:
print(f"[说话人 {sent['spk']}] {sent['text']}")</pre>
<div class="section-cta">
<a href="https://colab.research.google.com/github/modelscope/FunASR/blob/main/examples/colab/funasr_quickstart.ipynb" class="btn btn-primary">打开 Colab</a>
<a href="tutorial.html" class="btn btn-primary">完整教程</a>
</div>
</div>
</section>
<section class="alt">
<div class="container">
<h2 class="section-title">生态系统</h2>
<p class="section-subtitle">围绕语音识别、语音理解、视频剪辑、语音合成的相关项目。</p>
<div class="grid-2">
<div class="card">
<h3><a class="card-title-link" href="https://github.com/QwenAudio/Fun-ASR">Fun-ASR-Nano</a></h3>
<p>最新的语音识别大模型,支持多语言识别、时间戳、说话人分离和热词定制。</p>
</div>
<div class="card">
<h3><a class="card-title-link" href="https://github.com/QwenAudio/SenseVoice">SenseVoice</a></h3>
<p>多任务语音理解:语音识别、情感检测、音频事件识别。</p>
</div>
<div class="card">
<h3><a class="card-title-link" href="https://github.com/modelscope/FunClip">FunClip</a></h3>
<p>基于 FunASR 的 AI 视频剪辑,支持大模型辅助的智能编辑流程。</p>
</div>
<div class="card">
<h3><a class="card-title-link" href="https://github.com/QwenAudio/CosyVoice">CosyVoice</a></h3>
<p>自然语音生成,支持多语言、音色和情感控制。</p>
</div>
</div>
</div>
</section>
<footer>
<p>FunASR &middot; 通义实验室,阿里巴巴集团</p>
<p>
<a href="https://github.com/modelscope/FunASR">GitHub</a> &middot;
<a href="training.html">训练</a> &middot;
<a href="use-cases.html">场景速览</a> &middot;
<a href="deployment-matrix.html">部署选型</a> &middot;
<a href="../api.html">API</a> &middot;
<a href="vllm.html">vLLM</a> &middot;
<a href="agent.html">Agent</a> &middot;
<a href="benchmark.html">Benchmark</a> &middot;
<a href="https://github.com/modelscope/FunASR/blob/main/MODEL_LICENSE">许可证</a> &middot;
<a href="https://pypi.org/project/funasr/">PyPI</a> &middot;
<a href="https://github.com/modelscope/FunASR/issues">问题反馈</a>
</p>
</footer>
</body>
</html>
+76
View File
@@ -0,0 +1,76 @@
<!DOCTYPE html>
<html lang="zh-CN"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta name="description" content="FunASR 模型选择指南:SenseVoice、Paraformer、Fun-ASR-Nano、streaming runtime、OpenAI API alias 和部署路径。">
<meta property="og:title" content="FunASR 模型选择指南">
<meta property="og:description" content="在部署前选择合适的 FunASR 模型、API alias、运行时和 benchmark 路径。">
<meta property="og:type" content="website">
<meta property="og:url" content="https://modelscope.github.io/FunASR/zh/model-selection.html">
<link rel="canonical" href="https://modelscope.github.io/FunASR/zh/model-selection.html">
<meta property="og:site_name" content="FunASR">
<meta name="twitter:card" content="summary">
<meta name="twitter:title" content="FunASR 模型选择指南">
<meta name="twitter:description" content="FunASR 模型选择指南:SenseVoice、Paraformer、Fun-ASR-Nano、streaming runtime、OpenAI API alias 和部署路径。">
<title>FunASR 模型选择指南</title>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet">
<link rel="stylesheet" href="../style.css">
</head><body>
<nav class="nav"><div class="container">
<a href="index.html" class="nav-logo">FunASR</a>
<div class="nav-links"><a href="index.html">首页</a><a href="tutorial.html">教程</a><a href="training.html">训练</a><a href="model-registration.html">开发</a><a href="api.html">API</a><a href="vllm.html">vLLM</a><a href="agent.html">Agent</a><a href="benchmark.html">评测</a><a href="../donors.html">功德榜</a></div>
<div class="lang-dropdown"><button class="lang-btn">中文</button><div class="lang-menu"><a href="../model-selection.html">English</a><a href="model-selection.html" class="current">中文</a><a href="../ja/model-selection.html">日本語</a><a href="../ko/model-selection.html">한국어</a></div></div>
<a href="https://github.com/modelscope/FunASR" class="nav-github">GitHub</a>
</div></nav>
<div class="content"><div class="container narrow">
<h1>模型选择指南</h1>
<p>第一次选择模型、评估是否从 Whisper 或云端 ASR 迁移,或者准备通过 OpenAI 兼容 API 暴露模型别名时,可以先看这份指南。</p>
<div class="toc-grid"><a href="#default">默认路径</a><a href="#decision">决策表</a><a href="#aliases">API alias</a><a href="#runtime">运行路径</a><a href="#benchmark">上线前评测</a></div>
<section id="default"><h2>默认快速路径</h2>
<p>如果还不确定,先从 <strong>SenseVoice-Small</strong> 开始。它适合 demo、私有 API、多语种转写、带说话人信息的会议转写和 Agent 语音输入。</p>
<pre><code>from funasr import AutoModel
model = AutoModel(
model="iic/SenseVoiceSmall",
vad_model="fsmn-vad",
spk_model="cam++",
device="cuda", # 便携 smoke test 可改为 "cpu"
)
result = model.generate(input="meeting.wav")</code></pre>
</section>
<section id="decision"><h2>决策表</h2>
<table><tr><th>需求</th><th>优先尝试</th><th>原因</th><th>下一步文档</th></tr>
<tr><td>快速多语种私有转写</td><td>SenseVoice-Small</td><td>兼顾 ASR、情感标签、音频事件标签和 CPU 可用性。</td><td><a href="tutorial.html">教程</a></td></tr>
<tr><td>中文生产 ASR</td><td>Paraformer-Large</td><td>成熟中文 ASR 路径,可组合 VAD 和标点。</td><td><a href="tutorial.html">教程</a></td></tr>
<tr><td>API 示例中的英文路由</td><td><code>paraformer-en</code></td><td>适合在 OpenAI 风格客户端里验证较轻量英文路径。</td><td><a href="agent.html#server">OpenAI API</a></td></tr>
<tr><td>LLM-based ASR 或 31 语种实验</td><td>Fun-ASR-Nano</td><td>LLM-based 模型路径;解码吞吐敏感时配合 vLLM。</td><td><a href="vllm.html">vLLM 指南</a></td></tr>
<tr><td>离线多人会议转写与匿名说话人聚类</td><td>OpenMOSS-Team/MOSS-Transcribe-Diarize</td><td>一个模型联合输出长音频文本、时间戳与匿名说话人标签;不需要外挂 VAD 或说话人流水线。</td><td><a href="moss-transcribe-diarize.html">MOSS 指南</a></td></tr>
<tr><td>实时字幕或客服流式音频</td><td>Runtime WebSocket 服务</td><td>面向长连接流式会话和中间结果。</td><td><a href="tutorial.html#streaming">实时示例</a></td></tr>
<tr><td>从 Whisper/云端 ASR 迁移</td><td>先用 SenseVoice-Small</td><td>先建立强基线,再做模型专项调优。</td><td><a href="migration.html">迁移指南</a></td></tr></table>
</section>
<section id="aliases"><h2>OpenAI 兼容 API 别名</h2>
<p><code>examples/openai_api</code> 服务提供短别名,应用团队不需要了解具体模型仓库 ID。</p>
<table><tr><th>Alias</th><th>底层路径</th><th>适合场景</th></tr>
<tr><td><code>sensevoice</code></td><td><code>iic/SenseVoiceSmall</code></td><td>默认私有语音 API,多语种 ASR、事件标签和 CPU/GPU 行为较均衡。</td></tr>
<tr><td><code>paraformer</code></td><td><code>paraformer-zh</code></td><td>中文生产流量优先尝试。</td></tr>
<tr><td><code>paraformer-en</code></td><td><code>paraformer-en</code></td><td>OpenAI 风格客户端里的英文轻量路由。</td></tr>
<tr><td><code>fun-asr-nano</code></td><td><code>FunAudioLLM/Fun-ASR-Nano-2512</code></td><td>评估 LLM-based ASR、31 语种覆盖或 vLLM 加速。</td></tr></table>
<pre><code>curl http://localhost:8000/v1/models
python examples/openai_api/smoke_test.py --base-url http://localhost:8000 --model sensevoice</code></pre>
</section>
<section id="runtime"><h2>按工作负载选择运行路径</h2>
<table><tr><th>工作负载</th><th>运行路径</th><th>说明</th></tr>
<tr><td>Notebook 或一次性评估</td><td>Python <code>AutoModel</code></td><td>验证安装、模型下载和输出结构的最短路径。</td></tr>
<tr><td>内部 HTTP 服务</td><td>OpenAI 兼容 API</td><td>复用 OpenAI 风格客户端、Dify、n8n、LangChain、AutoGen 和 HTTP 节点。</td></tr>
<tr><td>可复现本地容器 demo</td><td>Docker Compose API</td><td>CPU-first smoke test;使用 CUDA 前先适配镜像。</td></tr>
<tr><td>集群内私有服务</td><td>Kubernetes API 模板</td><td>私有 ClusterIP、持久化模型缓存、健康检查和 port-forward smoke test。</td></tr>
<tr><td>实时音频</td><td>Runtime WebSocket 服务</td><td>用真实音频验证分块、VAD、断句、重连和客户端背压。</td></tr>
<tr><td>LLM-based ASR 吞吐</td><td>Fun-ASR-Nano 的 vLLM 路径</td><td>vLLM 加速自回归解码;不适用于非自回归 Paraformer。</td></tr>
<tr><td>离线 MOSS 服务</td><td>FunASR HTTP、vLLM 或 SGLang Omni</td><td>保持原生说话人分段契约;MOSS 是 OpenMOSS 第三方离线模型,不走实时 WebSocket 路径。</td></tr></table>
<p>选择部署方式时可以参考 <a href="deployment-matrix.html">部署选型表</a>。</p>
</section>
<section id="benchmark"><h2>上线前先 benchmark</h2>
<ul><li>准备 20-50 条音频,覆盖短音频、长会议、静音、噪声、多人重叠、领域词汇和目标语言。</li><li>记录模型名、模型版本、FunASR 版本、设备、CPU/GPU 型号、CUDA/PyTorch 版本、运行路径、batch size,以及是否排除 warmup/模型下载时间。</li><li>使用已有 WER/CER 流程或人工审阅,不要只看转写文本是否“读起来还行”。</li><li>同时记录延迟、吞吐、内存、失败样例和上传大小限制。</li><li>保留至少一个公开样例用于 smoke test,也保留至少一个真实私有样本用于部署验证。</li></ul>
<p>迁移场景可以使用 <a href="https://github.com/modelscope/FunASR/tree/main/examples/migration">迁移评测示例</a> 和 <a href="migration.html">迁移指南</a>。</p>
</section>
</div></div>
<footer><p>FunASR &middot; 通义实验室,阿里巴巴集团</p><p><a href="index.html">首页</a> &middot; <a href="model-selection.html">模型选择</a> &middot; <a href="migration.html">迁移</a> &middot; <a href="use-cases.html">场景</a> &middot; <a href="deployment-matrix.html">部署</a> &middot; <a href="agent.html">Agent</a> &middot; <a href="benchmark.html">评测</a> &middot; <a href="https://github.com/modelscope/FunASR">GitHub</a></p></footer>
</body></html>
@@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="zh-CN"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1.0">
<meta name="description" content="通过 FunASR、vLLM、SGLang Omni、LocalAI、Docker、Kubernetes 与 FunClip 部署 OpenMOSS 的 MOSS-Transcribe-Diarize 第三方模型。">
<meta property="og:title" content="MOSS-Transcribe-Diarize 部署指南"><meta property="og:description" content="长音频转写、时间戳与匿名说话人标签的 FunASR 生态部署。">
<meta property="og:type" content="website"><meta property="og:url" content="https://modelscope.github.io/FunASR/zh/moss-transcribe-diarize.html">
<link rel="canonical" href="https://modelscope.github.io/FunASR/zh/moss-transcribe-diarize.html"><meta property="og:site_name" content="FunASR"><title>MOSS-Transcribe-Diarize 部署指南</title>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap" rel="stylesheet"><link rel="stylesheet" href="../style.css"></head><body>
<nav class="nav"><div class="container"><a href="index.html" class="nav-logo">FunASR</a><div class="nav-links"><a href="index.html">首页</a><a href="deployment-matrix.html" class="active">部署</a><a href="../api.html">API</a><a href="agent.html">Agent</a></div><div class="lang-dropdown"><button class="lang-btn">中文</button><div class="lang-menu"><a href="../moss-transcribe-diarize.html">English</a><a href="moss-transcribe-diarize.html" class="current">中文</a></div></div><a href="https://github.com/modelscope/FunASR" class="nav-github">GitHub</a></div></nav>
<div class="content"><div class="container narrow"><h1>MOSS-Transcribe-Diarize</h1><p>FunASR 接入 OpenMOSS 发布的 Apache-2.0 第三方模型 <a href="https://huggingface.co/OpenMOSS-Team/MOSS-Transcribe-Diarize"><code>OpenMOSS-Team/MOSS-Transcribe-Diarize</code></a>。它一次生成长音频转写、时间戳和 <code>S01</code>、<code>S02</code> 等匿名说话人标签,不需要外挂 VAD 或说话人流水线。</p>
<div class="toc-grid"><a href="#contract">输出契约</a><a href="#server">FunASR 服务</a><a href="#runtimes">运行矩阵</a><a href="#evidence">验证证据</a><a href="#boundaries">边界</a></div>
<section id="contract"><h2>输出契约</h2><table><tr><th>字段</th><th>含义</th></tr><tr><td><code>text</code></td><td>移除 MOSS 控制标记后的可读转写。</td></tr><tr><td><code>timestamp</code></td><td>毫秒级 segment 起止时间。</td></tr><tr><td><code>sentence_info</code></td><td>包含 <code>start</code>、<code>end</code>、<code>text</code> 与匿名 <code>spk</code> 的统一分段。</td></tr><tr><td><code>raw_text</code></td><td>保留供审计的原始带标记生成。</td></tr></table></section>
<section id="server"><h2>FunASR OpenAI 兼容服务</h2><pre><code>python -m pip install "transformers&gt;=5.6,&lt;6" fastapi uvicorn python-multipart
funasr-server --model moss-transcribe-diarize --device cuda:0 --port 8000
curl -fsS http://127.0.0.1:8000/v1/audio/transcriptions \
-F [email protected] \
-F model=moss-transcribe-diarize \
-F response_format=verbose_json</code></pre><p>响应保留模型原生匿名 speaker segments。即使通用客户端传入 <code>spk=true</code>,服务也不会为 MOSS 启动第二套说话人模型。</p></section>
<section id="runtimes"><h2>部署路径</h2><table><tr><th>路径</th><th>适合场景</th><th>契约</th></tr><tr><td>FunASR 服务</td><td>自托管 HF GPU 接口、Docker Compose 或 Kubernetes。</td><td><code>verbose_json</code> 返回 speaker segments。</td></tr><tr><td>vLLM</td><td>已有 vLLM 调度和原生音频接口。</td><td><code>diarized_json</code>,可由 FunASR <code>AutoModel</code> 统一。</td></tr><tr><td>SGLang Omni</td><td>使用其原生 MOSS pipeline。</td><td><code>verbose_json</code>,FunASR 校验说话人前缀后统一。</td></tr><tr><td>LocalAI / moss-transcribe.cpp</td><td>第三方 GGUF CPU 或桌面边缘路径。</td><td>独立 C++ 实现,必须单独验证输出。</td></tr><tr><td>FunClip</td><td>生成带说话人的 SRT 与片段。</td><td>消费统一 <code>sentence_info</code>。</td></tr></table><p><a href="https://www.funasr.com/deploy/moss-transcribe-diarize.html">在生产部署中心查看完整固定版本命令 →</a></p></section>
<section id="evidence"><h2>真实服务 smoke</h2><p>在一张 H100 80GB、Transformers <code>5.16.0.dev0</code>、Torch <code>2.11.0+cu130</code> 和模型 revision <code>e8681d68</code> 上,真实 FunASR HTTP 接口处理仓库 6.0 秒样例后返回 HTTP 200、<code>duration=6.0</code> 和一个非空、时间单调、标记为 <code>S01</code> 的 segment。这只证明服务契约,不代表准确率、吞吐、并发或容量。</p></section>
<section id="boundaries"><h2>生产边界</h2><ul><li>MOSS 由 OpenMOSS 发布和维护;FunASR 负责适配器与部署契约。</li><li>HF 路径使用 <code>trust_remote_code</code>,必须固定并审计模型 revision。</li><li>MOSS 是离线长音频模型,不接入实时 WebSocket 服务。</li><li>说话人标签是匿名聚类标签,不是已知人物身份或声纹认证。</li><li>需要全局说话人连续性时,不要在外部用 VAD 切碎会议音频。</li></ul><p><a href="https://github.com/modelscope/FunASR/blob/main/docs/moss_transcribe_diarize_zh.md">仓库指南</a> · <a href="https://github.com/OpenMOSS/MOSS-Transcribe-Diarize">OpenMOSS 上游</a> · <a href="https://www.funasr.com/blog/funclip-v2-2-0-moss-speaker-clipping.html">FunClip 集成</a></p></section>
</div></div><footer><p>FunASR &middot; 通义实验室,阿里巴巴集团</p><p><a href="index.html">首页</a> &middot; <a href="deployment-matrix.html">部署选型</a> &middot; <a href="https://github.com/modelscope/FunASR">GitHub</a></p></footer></body></html>
+36
View File
@@ -0,0 +1,36 @@
from pathlib import Path
ROOT = Path(__file__).resolve().parents[1]
def test_github_pages_moss_source_is_versioned_and_discoverable():
pages = [
ROOT / "gh-pages-output" / "moss-transcribe-diarize.html",
ROOT / "gh-pages-output" / "zh" / "moss-transcribe-diarize.html",
ROOT / "gh-pages-output" / "model-selection.html",
ROOT / "gh-pages-output" / "zh" / "model-selection.html",
ROOT / "gh-pages-output" / "index.html",
ROOT / "gh-pages-output" / "zh" / "index.html",
]
for page in pages:
assert page.is_file(), page
english = (ROOT / "gh-pages-output" / "moss-transcribe-diarize.html").read_text()
chinese = (ROOT / "gh-pages-output" / "zh" / "moss-transcribe-diarize.html").read_text()
for page in (english, chinese):
assert "OpenMOSS-Team/MOSS-Transcribe-Diarize" in page
assert "OpenMOSS" in page
assert "third-party" in page or "第三方" in page
assert "funasr.com" in page
assert "vLLM" in page
assert "SGLang" in page
for page in pages[2:]:
content = page.read_text()
assert "moss-transcribe-diarize.html" in content
assert "MOSS-Transcribe-Diarize" in content
workflow = (ROOT / ".github/workflows/update-api-docs.yml").read_text()
assert "docs/moss_transcribe_diarize*.md" in workflow
assert "model_zoo/**" in workflow
assert "gh-pages-output/**" in workflow