Skip to content

Commit 3c35440

Browse files
committed
docs(llama.cpp): fix default GGUF quickstart
Signed-off-by: 游雁 <zhifu.gzf@alibaba-inc.com>
1 parent e327ade commit 3c35440

3 files changed

Lines changed: 33 additions & 2 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -248,7 +248,7 @@ Run **SenseVoice / Paraformer / Fun-ASR-Nano** as a **single self-contained bina
248248
```bash
249249
# 1) Grab a prebuilt binary from Releases (Linux / macOS / Windows), then:
250250
bash download-funasr-model.sh sensevoice ./gguf # or: paraformer | nano
251-
llama-funasr-sensevoice -m ./gguf/SenseVoiceSmall-f16.gguf --vad ./gguf/fsmn-vad.gguf -a audio.wav
251+
llama-funasr-sensevoice -m ./gguf/sensevoice-small-q8.gguf --vad ./gguf/fsmn-vad.gguf -a audio.wav
252252
# → 欢迎大家来体验达摩院推出的语音识别模型
253253
```
254254

README_zh.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,18 @@ curl http://localhost:8000/v1/audio/transcriptions \
274274
docker pull registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-online-cpu-0.1.12
275275
```
276276

277-
> **CPU / 边缘部署(无需 GPU、无需 Python):****llama.cpp / GGUF** 跑 Fun-ASR-Nano / SenseVoice / Paraformer —— 单个自包含二进制,对标 whisper.cpp。详见 [runtime/llama.cpp/](./runtime/llama.cpp/)
277+
### CPU / 边缘部署 - llama.cpp / GGUF(无需 GPU、无需 Python)
278+
279+
在 CPU 和边缘设备上用单个自包含二进制运行 **SenseVoice / Paraformer / Fun-ASR-Nano**,无需 Python 运行环境,并内置 FSMN-VAD。
280+
281+
```bash
282+
# 1) 从 Releases 下载 Linux / macOS / Windows 预编译包,然后执行:
283+
bash download-funasr-model.sh sensevoice ./gguf # 也可使用 paraformer 或 nano
284+
llama-funasr-sensevoice -m ./gguf/sensevoice-small-q8.gguf --vad ./gguf/fsmn-vad.gguf -a audio.wav
285+
# -> 欢迎大家来体验达摩院推出的语音识别模型
286+
```
287+
288+
**预编译二进制:** [Releases](../../releases) · **下载与快速开始:** [funasr.com/llama-cpp](https://www.funasr.com/llama-cpp.html) · **GGUF 模型:** [Hugging Face](https://huggingface.co/FunAudioLLM) · **文档与评测:** [runtime/llama.cpp/](./runtime/llama.cpp/)
278289

279290
[OpenAI API 示例 →](./examples/openai_api/README_zh.md) · [Gradio Demo →](./examples/openai_api/GRADIO_zh.md) · [客户端配方 →](./examples/openai_api/CLIENTS.md) · [JavaScript/TypeScript 配方 →](./examples/openai_api/JAVASCRIPT_zh.md) · [Kubernetes 模板 →](./examples/openai_api/kubernetes/README_zh.md) · [工作流配方 →](./examples/openai_api/WORKFLOWS_zh.md) · [Postman 集合 →](./examples/openai_api/POSTMAN_zh.md) · [OpenAPI 规范 →](./examples/openai_api/OPENAPI_zh.md) · [安全指南 →](./examples/openai_api/SECURITY_zh.md) · [部署选型 →](./docs/deployment_matrix_zh.md) · [部署文档 →](./runtime/readme_cn.md) · [Agent 集成 →](https://modelscope.github.io/FunASR/agent.html)
280291

runtime/llama.cpp/tests/test_download_funasr_model.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
set -euo pipefail
33

44
ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
5+
REPO_ROOT=$(cd "$ROOT/../.." && pwd)
56
SCRIPT="$ROOT/download-funasr-model.sh"
67
TMP=$(mktemp -d)
78
trap 'rm -rf "$TMP"' EXIT
@@ -106,4 +107,23 @@ if HF_SKIP_CREATE=1 bash "$SCRIPT" sensevoice "$TMP/out" >"$TMP/stdout" 2>"$TMP/
106107
fi
107108
grep -F "no GGUF files found in $TMP/out" "$TMP/stderr" >/dev/null
108109

110+
assert_readme_quickstart() {
111+
local readme=$1
112+
if ! grep -F "bash download-funasr-model.sh sensevoice ./gguf" "$readme" >/dev/null; then
113+
printf 'missing default SenseVoice download command in %s\n' "$readme" >&2
114+
exit 1
115+
fi
116+
if ! grep -F "llama-funasr-sensevoice -m ./gguf/sensevoice-small-q8.gguf --vad ./gguf/fsmn-vad.gguf -a audio.wav" "$readme" >/dev/null; then
117+
printf 'README command does not run the default sensevoice-small-q8.gguf in %s\n' "$readme" >&2
118+
exit 1
119+
fi
120+
if grep -F "SenseVoiceSmall-f16.gguf" "$readme" >/dev/null; then
121+
printf 'stale SenseVoice filename in %s\n' "$readme" >&2
122+
exit 1
123+
fi
124+
}
125+
126+
assert_readme_quickstart "$REPO_ROOT/README.md"
127+
assert_readme_quickstart "$REPO_ROOT/README_zh.md"
128+
109129
echo "download-funasr-model contract tests passed"

0 commit comments

Comments
 (0)