Skip to content

Commit b59e12c

Browse files
committed
feat(site): add audio.cpp deployment path
Signed-off-by: LauraGPT <lauragpt@users.noreply.github.com>
1 parent 7eb1da3 commit b59e12c

2 files changed

Lines changed: 103 additions & 1 deletion

File tree

web-pages/product-site/data/deployments.json

Lines changed: 79 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"schema_version": 1,
3-
"verified": "2026-07-26",
3+
"verified": "2026-07-30",
44
"deployments": [
55
{
66
"id": "vllm",
@@ -144,6 +144,84 @@
144144
}
145145
}
146146
},
147+
{
148+
"id": "audio-cpp",
149+
"routes": {"zh": "/deploy/audio-cpp.html", "en": "/en/deploy/audio-cpp.html"},
150+
"maturity": "community-verified",
151+
"selector_rank": 21,
152+
"workloads": ["edge", "batch", "private-api"],
153+
"hardware": ["cpu", "nvidia-gpu", "desktop-edge-gpu"],
154+
"priorities": ["portability", "compatibility"],
155+
"models": ["Fun-ASR-Nano-2512"],
156+
"operating_systems": ["Linux", "macOS", "Windows"],
157+
"interfaces": ["CLI", "OpenAI-compatible HTTP"],
158+
"tested": {"funasr": "Fun-ASR-Nano-2512", "runtime": "audio.cpp@1778b23a", "verified": "2026-07-30"},
159+
"commands": {
160+
"install": [
161+
"git clone https://github.com/0xShug0/audio.cpp.git && cd audio.cpp",
162+
"bash scripts/build_linux.sh --backend cpu --model-set custom --models fun_asr_nano --target audiocpp_cli --target audiocpp_server",
163+
"python3 tools/model_manager_v2.py install fun_asr_nano"
164+
],
165+
"launch": [
166+
"build/linux-cpu-release/bin/audiocpp_cli --task asr --family fun_asr_nano --model models/Fun-ASR-Nano-2512-GGUF/fun-asr-nano-2512-q8_0.gguf --backend cpu --audio speech.wav --text-out transcript.txt",
167+
"printf '%s\\n' '{\"host\":\"127.0.0.1\",\"port\":8080,\"backend\":\"cpu\",\"threads\":4,\"lazy_load\":true,\"models\":[{\"id\":\"fun-asr-nano\",\"family\":\"fun_asr_nano\",\"path\":\"models/Fun-ASR-Nano-2512-GGUF/fun-asr-nano-2512-q8_0.gguf\",\"task\":\"asr\",\"mode\":\"offline\"}]}' > server.json",
168+
"build/linux-cpu-release/bin/audiocpp_server --config server.json"
169+
],
170+
"health": [
171+
"curl -fsS http://127.0.0.1:8080/health",
172+
"curl -fsS http://127.0.0.1:8080/v1/models"
173+
],
174+
"smoke": [
175+
"curl -fsS http://127.0.0.1:8080/v1/audio/transcriptions -F model=fun-asr-nano -F language=auto -F file=@speech.wav"
176+
]
177+
},
178+
"evidence": [
179+
{"label": "audio.cpp Fun-ASR-Nano guide", "url": "https://github.com/0xShug0/audio.cpp/blob/1778b23a5f6a4951c788e4bb0e7baa04f20012a2/docs/models/fun_asr_nano.md"},
180+
{"label": "merged implementation", "url": "https://github.com/0xShug0/audio.cpp/pull/155"},
181+
{"label": "pinned GGUF package", "url": "https://huggingface.co/FunAudioLLM/Fun-ASR-Nano-2512-GGUF/tree/ce72677f84900f0dc57f498ace253bfb3c9155b6"}
182+
],
183+
"benchmarks": [
184+
{
185+
"model": "Fun-ASR-Nano-2512 Q8_0 GGUF",
186+
"runtime": "audio.cpp native Fun-ASR-Nano runtime",
187+
"hardware": "NVIDIA H100 CUDA; exact driver and toolchain versions are not recorded in the cited guide",
188+
"workload": "Single offline transcription through the OpenAI-compatible server",
189+
"audio": "One 14.07-second reference WAV",
190+
"settings": "Standalone Q8_0 GGUF; CUDA backend; concurrency one; other runtime settings are not recorded",
191+
"timing_scope": "End-to-end server validation; the cited guide does not state warmup, file I/O, or process-start boundaries",
192+
"result": "Approximately 0.0725 RTF; transcript matched the official safetensors path",
193+
"qualification": "Single-sample parity smoke, not a capacity benchmark. Reproduce on target hardware with production audio and concurrency.",
194+
"source": "https://github.com/0xShug0/audio.cpp/blob/1778b23a5f6a4951c788e4bb0e7baa04f20012a2/docs/models/fun_asr_nano.md",
195+
"verified": "2026-07-29"
196+
}
197+
],
198+
"translations": {
199+
"zh": {
200+
"name": "audio.cpp 原生 Fun-ASR-Nano",
201+
"summary": "用原生 C++ / GGML 在 CPU 或 CUDA 上运行 Fun-ASR-Nano Q8_0,并提供 CLI 与兼容 OpenAI 的本地转写服务。",
202+
"fit": ["不希望安装 Python 推理环境", "桌面、边缘与离线批量转写", "需要兼容 OpenAI 的本地音频接口"],
203+
"not_fit": ["需要实时流式结果或时间戳", "需要 Fun-ASR-Nano 之外的 FunASR 模型", "尚未在目标硬件完成容量与准确率复测的公网服务"],
204+
"selection_reason": "原生 GGML、Q8_0 模型和统一 CLI/HTTP 接口适合低依赖的离线 Fun-ASR-Nano 部署。",
205+
"primary_limitation": "当前只输出离线转写文本,不暴露 streaming 或 timestamps;其他模型家族仍应选择对应 FunASR 运行时。",
206+
"status_label": "社区验证",
207+
"operations": ["固定 audio.cpp 提交与 GGUF revision", "先用已知 WAV 核对 transcript 再接业务流量", "分别记录冷启动、预热 RTF、内存与并发队列"],
208+
"security": ["服务默认绑定 127.0.0.1 或可信内网", "在反向代理限制上传大小、MIME、认证与并发", "只加载经过 SHA-256 校验的 GGUF 和配置"],
209+
"troubleshooting": ["先用 CPU + Q8_0 路径排除 CUDA 环境问题", "构建 backend 必须与运行参数一致", "输入异常时先核对 WAV、单声道和 16 kHz 转换路径"]
210+
},
211+
"en": {
212+
"name": "audio.cpp native Fun-ASR-Nano",
213+
"summary": "Run Fun-ASR-Nano Q8_0 with native C++ and GGML on CPU or CUDA, using a CLI or local OpenAI-compatible transcription service.",
214+
"fit": ["No Python inference environment", "Desktop, edge, and offline batch transcription", "A local OpenAI-compatible audio endpoint is required"],
215+
"not_fit": ["Realtime streaming results or timestamps", "FunASR model families other than Fun-ASR-Nano", "Internet-facing service before capacity and accuracy tests on target hardware"],
216+
"selection_reason": "Native GGML, Q8_0 weights, and shared CLI/HTTP surfaces fit low-dependency offline Fun-ASR-Nano deployment.",
217+
"primary_limitation": "The current path returns offline transcript text only and exposes neither streaming nor timestamps; use the corresponding FunASR runtime for other model families.",
218+
"status_label": "Community verified",
219+
"operations": ["Pin the audio.cpp commit and GGUF revision", "Verify a known WAV transcript before business traffic", "Measure cold start, warm RTF, memory, and concurrent queueing separately"],
220+
"security": ["Bind the service to 127.0.0.1 or a trusted private network", "Enforce upload size, MIME, authentication, and concurrency at the proxy", "Load only GGUF and configuration files verified with SHA-256"],
221+
"troubleshooting": ["Start with CPU and Q8_0 to isolate CUDA setup", "Match the compiled backend to the runtime argument", "For input failures, verify WAV decoding, mono conversion, and 16 kHz resampling"]
222+
}
223+
}
224+
},
147225
{
148226
"id": "openai-api",
149227
"routes": {"zh": "/deploy/openai-api.html", "en": "/en/deploy/openai-api.html"},

web-pages/product-site/tests/test_registry.py

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
EXPECTED_IDS = {
1818
'vllm',
1919
'llama-cpp',
20+
'audio-cpp',
2021
'openai-api',
2122
'realtime',
2223
'containers',
@@ -42,6 +43,29 @@ def test_language_pairs_have_identical_fields(valid_registry):
4243
assert all(set(zh) == set(en) for zh, en in deployment_pairs(valid_registry))
4344

4445

46+
def test_audio_cpp_contract_tracks_merged_offline_runtime(valid_registry):
47+
entry = next(item for item in valid_registry['deployments'] if item['id'] == 'audio-cpp')
48+
llama_cpp = next(item for item in valid_registry['deployments'] if item['id'] == 'llama-cpp')
49+
50+
assert entry['maturity'] == 'community-verified'
51+
assert entry['selector_rank'] > llama_cpp['selector_rank']
52+
assert entry['tested'] == {
53+
'funasr': 'Fun-ASR-Nano-2512',
54+
'runtime': 'audio.cpp@1778b23a',
55+
'verified': '2026-07-30',
56+
}
57+
assert entry['models'] == ['Fun-ASR-Nano-2512']
58+
assert any('model_manager_v2.py install fun_asr_nano' in command for command in entry['commands']['install'])
59+
build_command = next(command for command in entry['commands']['install'] if '--model-set custom' in command)
60+
assert build_command.startswith('bash scripts/build_linux.sh ')
61+
assert any('/v1/audio/transcriptions' in command for command in entry['commands']['smoke'])
62+
assert any('/health' in command for command in entry['commands']['health'])
63+
assert any('1778b23a5f6a4951c788e4bb0e7baa04f20012a2' in item['url'] for item in entry['evidence'])
64+
assert any('ce72677f84900f0dc57f498ace253bfb3c9155b6' in item['url'] for item in entry['evidence'])
65+
assert 'streaming' in entry['translations']['en']['primary_limitation'].lower()
66+
assert 'timestamp' in entry['translations']['en']['primary_limitation'].lower()
67+
68+
4569
def test_production_entry_requires_evidence(valid_registry):
4670
data = copy.deepcopy(valid_registry)
4771
entry = next(item for item in data['deployments'] if item['maturity'] == 'production-verified')

0 commit comments

Comments
 (0)