From 3c35440eb243039e67fadc457ec2decc74610e05 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B8=B8=E9=9B=81?= Date: Wed, 15 Jul 2026 05:21:22 +0000 Subject: [PATCH 1/4] docs(llama.cpp): fix default GGUF quickstart MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 游雁 --- README.md | 2 +- README_zh.md | 13 +++++++++++- .../tests/test_download_funasr_model.sh | 20 +++++++++++++++++++ 3 files changed, 33 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 6968b7944..a71e2f38b 100644 --- a/README.md +++ b/README.md @@ -248,7 +248,7 @@ Run **SenseVoice / Paraformer / Fun-ASR-Nano** as a **single self-contained bina ```bash # 1) Grab a prebuilt binary from Releases (Linux / macOS / Windows), then: bash download-funasr-model.sh sensevoice ./gguf # or: paraformer | nano -llama-funasr-sensevoice -m ./gguf/SenseVoiceSmall-f16.gguf --vad ./gguf/fsmn-vad.gguf -a audio.wav +llama-funasr-sensevoice -m ./gguf/sensevoice-small-q8.gguf --vad ./gguf/fsmn-vad.gguf -a audio.wav # → 欢迎大家来体验达摩院推出的语音识别模型 ``` diff --git a/README_zh.md b/README_zh.md index 88bdb7c5b..c28b45a75 100644 --- a/README_zh.md +++ b/README_zh.md @@ -274,7 +274,18 @@ curl http://localhost:8000/v1/audio/transcriptions \ docker pull registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime-sdk-online-cpu-0.1.12 ``` -> **CPU / 边缘部署(无需 GPU、无需 Python):** 用 **llama.cpp / GGUF** 跑 Fun-ASR-Nano / SenseVoice / Paraformer —— 单个自包含二进制,对标 whisper.cpp。详见 [runtime/llama.cpp/](./runtime/llama.cpp/)。 +### CPU / 边缘部署 - llama.cpp / GGUF(无需 GPU、无需 Python) + +在 CPU 和边缘设备上用单个自包含二进制运行 **SenseVoice / Paraformer / Fun-ASR-Nano**,无需 Python 运行环境,并内置 FSMN-VAD。 + +```bash +# 1) 从 Releases 下载 Linux / macOS / Windows 预编译包,然后执行: +bash download-funasr-model.sh sensevoice ./gguf # 也可使用 paraformer 或 nano +llama-funasr-sensevoice -m ./gguf/sensevoice-small-q8.gguf --vad ./gguf/fsmn-vad.gguf -a audio.wav +# -> 欢迎大家来体验达摩院推出的语音识别模型 +``` + +**预编译二进制:** [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/) [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) diff --git a/runtime/llama.cpp/tests/test_download_funasr_model.sh b/runtime/llama.cpp/tests/test_download_funasr_model.sh index 48bb01b1d..9777ed0d9 100755 --- a/runtime/llama.cpp/tests/test_download_funasr_model.sh +++ b/runtime/llama.cpp/tests/test_download_funasr_model.sh @@ -2,6 +2,7 @@ set -euo pipefail ROOT=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd) +REPO_ROOT=$(cd "$ROOT/../.." && pwd) SCRIPT="$ROOT/download-funasr-model.sh" TMP=$(mktemp -d) trap 'rm -rf "$TMP"' EXIT @@ -106,4 +107,23 @@ if HF_SKIP_CREATE=1 bash "$SCRIPT" sensevoice "$TMP/out" >"$TMP/stdout" 2>"$TMP/ fi grep -F "no GGUF files found in $TMP/out" "$TMP/stderr" >/dev/null +assert_readme_quickstart() { + local readme=$1 + if ! grep -F "bash download-funasr-model.sh sensevoice ./gguf" "$readme" >/dev/null; then + printf 'missing default SenseVoice download command in %s\n' "$readme" >&2 + exit 1 + fi + if ! grep -F "llama-funasr-sensevoice -m ./gguf/sensevoice-small-q8.gguf --vad ./gguf/fsmn-vad.gguf -a audio.wav" "$readme" >/dev/null; then + printf 'README command does not run the default sensevoice-small-q8.gguf in %s\n' "$readme" >&2 + exit 1 + fi + if grep -F "SenseVoiceSmall-f16.gguf" "$readme" >/dev/null; then + printf 'stale SenseVoice filename in %s\n' "$readme" >&2 + exit 1 + fi +} + +assert_readme_quickstart "$REPO_ROOT/README.md" +assert_readme_quickstart "$REPO_ROOT/README_zh.md" + echo "download-funasr-model contract tests passed" From 941307a23b5801df85b0d692a1be807d7681ee45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B8=B8=E9=9B=81?= Date: Wed, 15 Jul 2026 05:34:59 +0000 Subject: [PATCH 2/4] fix(llama.cpp): make release quickstart executable MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 游雁 --- .../workflows/test-llamacpp-downloader.yml | 31 ++++++++++++++ README.md | 13 ++++-- README_zh.md | 13 ++++-- .../tests/test_download_funasr_model.sh | 42 ++++++++++++++++--- 4 files changed, 87 insertions(+), 12 deletions(-) create mode 100644 .github/workflows/test-llamacpp-downloader.yml diff --git a/.github/workflows/test-llamacpp-downloader.yml b/.github/workflows/test-llamacpp-downloader.yml new file mode 100644 index 000000000..eee54d3ee --- /dev/null +++ b/.github/workflows/test-llamacpp-downloader.yml @@ -0,0 +1,31 @@ +name: Test llama.cpp downloader + +on: + workflow_dispatch: + pull_request: + paths: + - 'README.md' + - 'README_zh.md' + - 'runtime/llama.cpp/download-funasr-model.sh' + - 'runtime/llama.cpp/tests/test_download_funasr_model.sh' + - '.github/workflows/test-llamacpp-downloader.yml' + push: + branches: + - main + paths: + - 'README.md' + - 'README_zh.md' + - 'runtime/llama.cpp/download-funasr-model.sh' + - 'runtime/llama.cpp/tests/test_download_funasr_model.sh' + - '.github/workflows/test-llamacpp-downloader.yml' + +permissions: + contents: read + +jobs: + contract: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Run downloader and README contract tests + run: bash runtime/llama.cpp/tests/test_download_funasr_model.sh diff --git a/README.md b/README.md index a71e2f38b..4f7e30efe 100644 --- a/README.md +++ b/README.md @@ -246,13 +246,20 @@ docker pull registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime- Run **SenseVoice / Paraformer / Fun-ASR-Nano** as a **single self-contained binary** on CPU and edge devices — this is to FunASR what [whisper.cpp](https://github.com/ggml-org/whisper.cpp) is to Whisper, but with **~3× lower CER than whisper.cpp on Chinese**. Built-in FSMN-VAD, no Python at runtime. ```bash -# 1) Grab a prebuilt binary from Releases (Linux / macOS / Windows), then: +# Linux / macOS: run from the extracted release directory bash download-funasr-model.sh sensevoice ./gguf # or: paraformer | nano -llama-funasr-sensevoice -m ./gguf/sensevoice-small-q8.gguf --vad ./gguf/fsmn-vad.gguf -a audio.wav +./llama-funasr-sensevoice -m ./gguf/sensevoice-small-q8.gguf --vad ./gguf/fsmn-vad.gguf -a audio.wav # → 欢迎大家来体验达摩院推出的语音识别模型 ``` -**Prebuilt binaries:** [Releases](../../releases) · **Download & quickstart:** [funasr.com/llama-cpp](https://www.funasr.com/llama-cpp.html) · **GGUF models:** [Hugging Face](https://huggingface.co/FunAudioLLM) · **Docs & benchmarks:** [runtime/llama.cpp/](./runtime/llama.cpp/) +```powershell +# Windows PowerShell: run from the extracted archive root (with the `hf` CLI installed) +hf download FunAudioLLM/SenseVoiceSmall-GGUF sensevoice-small-q8.gguf --local-dir .\gguf +hf download FunAudioLLM/fsmn-vad-GGUF fsmn-vad.gguf --local-dir .\gguf +.\pkg\llama-funasr-sensevoice.exe -m .\gguf\sensevoice-small-q8.gguf --vad .\gguf\fsmn-vad.gguf -a audio.wav +``` + +**Prebuilt binaries:** [Releases](https://github.com/modelscope/FunASR/releases) · **Download & quickstart:** [funasr.com/llama-cpp](https://www.funasr.com/llama-cpp.html) · **GGUF models:** [Hugging Face](https://huggingface.co/FunAudioLLM) · **Docs & benchmarks:** [runtime/llama.cpp/](./runtime/llama.cpp/) [OpenAI API example →](./examples/openai_api/) · [Gradio demo →](./examples/openai_api/GRADIO.md) · [Client recipes →](./examples/openai_api/CLIENTS.md) · [JavaScript/TypeScript recipes →](./examples/openai_api/JAVASCRIPT.md) · [Kubernetes template →](./examples/openai_api/kubernetes/) · [Workflow recipes →](./examples/openai_api/WORKFLOWS.md) · [Postman collection →](./examples/openai_api/POSTMAN.md) · [OpenAPI spec →](./examples/openai_api/OPENAPI.md) · [Security guide →](./examples/openai_api/SECURITY.md) · [Deployment matrix →](./docs/deployment_matrix.md) · [Deployment docs →](./runtime/readme.md) · [Agent integration →](https://modelscope.github.io/FunASR/agent.html) diff --git a/README_zh.md b/README_zh.md index c28b45a75..976a15890 100644 --- a/README_zh.md +++ b/README_zh.md @@ -279,13 +279,20 @@ docker pull registry.cn-hangzhou.aliyuncs.com/funasr_repo/funasr:funasr-runtime- 在 CPU 和边缘设备上用单个自包含二进制运行 **SenseVoice / Paraformer / Fun-ASR-Nano**,无需 Python 运行环境,并内置 FSMN-VAD。 ```bash -# 1) 从 Releases 下载 Linux / macOS / Windows 预编译包,然后执行: +# Linux / macOS:在解压后的发布目录中执行 bash download-funasr-model.sh sensevoice ./gguf # 也可使用 paraformer 或 nano -llama-funasr-sensevoice -m ./gguf/sensevoice-small-q8.gguf --vad ./gguf/fsmn-vad.gguf -a audio.wav +./llama-funasr-sensevoice -m ./gguf/sensevoice-small-q8.gguf --vad ./gguf/fsmn-vad.gguf -a audio.wav # -> 欢迎大家来体验达摩院推出的语音识别模型 ``` -**预编译二进制:** [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/) +```powershell +# Windows PowerShell:在解压根目录执行(需已安装 `hf` CLI) +hf download FunAudioLLM/SenseVoiceSmall-GGUF sensevoice-small-q8.gguf --local-dir .\gguf +hf download FunAudioLLM/fsmn-vad-GGUF fsmn-vad.gguf --local-dir .\gguf +.\pkg\llama-funasr-sensevoice.exe -m .\gguf\sensevoice-small-q8.gguf --vad .\gguf\fsmn-vad.gguf -a audio.wav +``` + +**预编译二进制:** [Releases](https://github.com/modelscope/FunASR/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/) [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) diff --git a/runtime/llama.cpp/tests/test_download_funasr_model.sh b/runtime/llama.cpp/tests/test_download_funasr_model.sh index 9777ed0d9..da65e71ac 100755 --- a/runtime/llama.cpp/tests/test_download_funasr_model.sh +++ b/runtime/llama.cpp/tests/test_download_funasr_model.sh @@ -63,6 +63,8 @@ bash "$SCRIPT" sensevoice "$TMP/out" >/dev/null assert_log "download FunAudioLLM/SenseVoiceSmall-GGUF sensevoice-small-q8.gguf --local-dir $TMP/out" assert_log "download FunAudioLLM/fsmn-vad-GGUF fsmn-vad.gguf --local-dir $TMP/out" assert_no_log "--include *.gguf" +DEFAULT_SENSEVOICE_MODEL=$(awk '$1 == "download" && $2 == "FunAudioLLM/SenseVoiceSmall-GGUF" { print $3; exit }' "$HF_LOG") +[[ -n "$DEFAULT_SENSEVOICE_MODEL" ]] reset_case bash "$SCRIPT" paraformer "$TMP/out" f16 >/dev/null @@ -109,21 +111,49 @@ grep -F "no GGUF files found in $TMP/out" "$TMP/stderr" >/dev/null assert_readme_quickstart() { local readme=$1 - if ! grep -F "bash download-funasr-model.sh sensevoice ./gguf" "$readme" >/dev/null; then + local section_prefix=$2 + local section + local quickstart + + if ! section=$(awk -v prefix="$section_prefix" ' + !found && index($0, prefix) == 1 { found = 1 } + found && /^---$/ { exit } + found { print } + END { if (!found) exit 1 } + ' "$readme"); then + printf 'missing CPU/edge section in %s\n' "$readme" >&2 + exit 1 + fi + + if ! quickstart=$(printf '%s\n' "$section" | awk ' + !seen && /^```bash$/ { seen = 1; in_block = 1; next } + in_block && /^```$/ { complete = 1; exit } + in_block { print } + END { if (!seen || !complete) exit 1 } + '); then + printf 'missing Bash quickstart block in %s\n' "$readme" >&2 + exit 1 + fi + + if ! grep -F "bash download-funasr-model.sh sensevoice ./gguf" <<<"$quickstart" >/dev/null; then printf 'missing default SenseVoice download command in %s\n' "$readme" >&2 exit 1 fi - if ! grep -F "llama-funasr-sensevoice -m ./gguf/sensevoice-small-q8.gguf --vad ./gguf/fsmn-vad.gguf -a audio.wav" "$readme" >/dev/null; then + if ! grep -F "./llama-funasr-sensevoice -m ./gguf/$DEFAULT_SENSEVOICE_MODEL --vad ./gguf/fsmn-vad.gguf -a audio.wav" <<<"$quickstart" >/dev/null; then printf 'README command does not run the default sensevoice-small-q8.gguf in %s\n' "$readme" >&2 exit 1 fi - if grep -F "SenseVoiceSmall-f16.gguf" "$readme" >/dev/null; then - printf 'stale SenseVoice filename in %s\n' "$readme" >&2 + if ! grep -F ".\\pkg\\llama-funasr-sensevoice.exe -m .\\gguf\\$DEFAULT_SENSEVOICE_MODEL --vad .\\gguf\\fsmn-vad.gguf -a audio.wav" <<<"$section" >/dev/null; then + printf 'missing Windows PowerShell quickstart in %s\n' "$readme" >&2 + exit 1 + fi + if ! grep -F '[Releases](https://github.com/modelscope/FunASR/releases)' <<<"$section" >/dev/null; then + printf 'non-portable Releases link in %s\n' "$readme" >&2 exit 1 fi } -assert_readme_quickstart "$REPO_ROOT/README.md" -assert_readme_quickstart "$REPO_ROOT/README_zh.md" +assert_readme_quickstart "$REPO_ROOT/README.md" '### CPU / Edge' +assert_readme_quickstart "$REPO_ROOT/README_zh.md" '### CPU / 边缘部署' echo "download-funasr-model contract tests passed" From 634469c224b4a3df642aada8b8ddc0fe7d58990c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B8=B8=E9=9B=81?= Date: Wed, 15 Jul 2026 05:38:15 +0000 Subject: [PATCH 3/4] fix(llama.cpp): validate Windows release layout MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 游雁 --- README.md | 2 +- README_zh.md | 2 +- .../tests/test_download_funasr_model.sh | 21 ++++++++++++++++++- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 4f7e30efe..6da05300d 100644 --- a/README.md +++ b/README.md @@ -256,7 +256,7 @@ bash download-funasr-model.sh sensevoice ./gguf # or: paraformer | nano # Windows PowerShell: run from the extracted archive root (with the `hf` CLI installed) hf download FunAudioLLM/SenseVoiceSmall-GGUF sensevoice-small-q8.gguf --local-dir .\gguf hf download FunAudioLLM/fsmn-vad-GGUF fsmn-vad.gguf --local-dir .\gguf -.\pkg\llama-funasr-sensevoice.exe -m .\gguf\sensevoice-small-q8.gguf --vad .\gguf\fsmn-vad.gguf -a audio.wav +.\llama-funasr-sensevoice.exe -m .\gguf\sensevoice-small-q8.gguf --vad .\gguf\fsmn-vad.gguf -a audio.wav ``` **Prebuilt binaries:** [Releases](https://github.com/modelscope/FunASR/releases) · **Download & quickstart:** [funasr.com/llama-cpp](https://www.funasr.com/llama-cpp.html) · **GGUF models:** [Hugging Face](https://huggingface.co/FunAudioLLM) · **Docs & benchmarks:** [runtime/llama.cpp/](./runtime/llama.cpp/) diff --git a/README_zh.md b/README_zh.md index 976a15890..dd2385189 100644 --- a/README_zh.md +++ b/README_zh.md @@ -289,7 +289,7 @@ bash download-funasr-model.sh sensevoice ./gguf # 也可使用 paraformer # Windows PowerShell:在解压根目录执行(需已安装 `hf` CLI) hf download FunAudioLLM/SenseVoiceSmall-GGUF sensevoice-small-q8.gguf --local-dir .\gguf hf download FunAudioLLM/fsmn-vad-GGUF fsmn-vad.gguf --local-dir .\gguf -.\pkg\llama-funasr-sensevoice.exe -m .\gguf\sensevoice-small-q8.gguf --vad .\gguf\fsmn-vad.gguf -a audio.wav +.\llama-funasr-sensevoice.exe -m .\gguf\sensevoice-small-q8.gguf --vad .\gguf\fsmn-vad.gguf -a audio.wav ``` **预编译二进制:** [Releases](https://github.com/modelscope/FunASR/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/) diff --git a/runtime/llama.cpp/tests/test_download_funasr_model.sh b/runtime/llama.cpp/tests/test_download_funasr_model.sh index da65e71ac..ddb4ac16a 100755 --- a/runtime/llama.cpp/tests/test_download_funasr_model.sh +++ b/runtime/llama.cpp/tests/test_download_funasr_model.sh @@ -114,6 +114,7 @@ assert_readme_quickstart() { local section_prefix=$2 local section local quickstart + local powershell if ! section=$(awk -v prefix="$section_prefix" ' !found && index($0, prefix) == 1 { found = 1 } @@ -135,6 +136,16 @@ assert_readme_quickstart() { exit 1 fi + if ! powershell=$(printf '%s\n' "$section" | awk ' + !seen && /^```powershell$/ { seen = 1; in_block = 1; next } + in_block && /^```$/ { complete = 1; exit } + in_block { print } + END { if (!seen || !complete) exit 1 } + '); then + printf 'missing PowerShell quickstart block in %s\n' "$readme" >&2 + exit 1 + fi + if ! grep -F "bash download-funasr-model.sh sensevoice ./gguf" <<<"$quickstart" >/dev/null; then printf 'missing default SenseVoice download command in %s\n' "$readme" >&2 exit 1 @@ -143,7 +154,15 @@ assert_readme_quickstart() { printf 'README command does not run the default sensevoice-small-q8.gguf in %s\n' "$readme" >&2 exit 1 fi - if ! grep -F ".\\pkg\\llama-funasr-sensevoice.exe -m .\\gguf\\$DEFAULT_SENSEVOICE_MODEL --vad .\\gguf\\fsmn-vad.gguf -a audio.wav" <<<"$section" >/dev/null; then + if ! grep -F "hf download FunAudioLLM/SenseVoiceSmall-GGUF $DEFAULT_SENSEVOICE_MODEL --local-dir .\\gguf" <<<"$powershell" >/dev/null; then + printf 'missing Windows SenseVoice download command in %s\n' "$readme" >&2 + exit 1 + fi + if ! grep -F 'hf download FunAudioLLM/fsmn-vad-GGUF fsmn-vad.gguf --local-dir .\gguf' <<<"$powershell" >/dev/null; then + printf 'missing Windows FSMN-VAD download command in %s\n' "$readme" >&2 + exit 1 + fi + if ! grep -F ".\\llama-funasr-sensevoice.exe -m .\\gguf\\$DEFAULT_SENSEVOICE_MODEL --vad .\\gguf\\fsmn-vad.gguf -a audio.wav" <<<"$powershell" >/dev/null; then printf 'missing Windows PowerShell quickstart in %s\n' "$readme" >&2 exit 1 fi From 81b243adead93878c8d76884df422b99dcc929e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=B8=B8=E9=9B=81?= Date: Wed, 15 Jul 2026 05:40:11 +0000 Subject: [PATCH 4/4] test(llama.cpp): require runnable quickstart lines MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: 游雁 --- runtime/llama.cpp/tests/test_download_funasr_model.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/runtime/llama.cpp/tests/test_download_funasr_model.sh b/runtime/llama.cpp/tests/test_download_funasr_model.sh index ddb4ac16a..2bd9e8a6c 100755 --- a/runtime/llama.cpp/tests/test_download_funasr_model.sh +++ b/runtime/llama.cpp/tests/test_download_funasr_model.sh @@ -146,23 +146,23 @@ assert_readme_quickstart() { exit 1 fi - if ! grep -F "bash download-funasr-model.sh sensevoice ./gguf" <<<"$quickstart" >/dev/null; then + if ! grep -Eq '^bash download-funasr-model\.sh sensevoice \./gguf([[:space:]]+#.*)?$' <<<"$quickstart"; then printf 'missing default SenseVoice download command in %s\n' "$readme" >&2 exit 1 fi - if ! grep -F "./llama-funasr-sensevoice -m ./gguf/$DEFAULT_SENSEVOICE_MODEL --vad ./gguf/fsmn-vad.gguf -a audio.wav" <<<"$quickstart" >/dev/null; then + if ! grep -Fx "./llama-funasr-sensevoice -m ./gguf/$DEFAULT_SENSEVOICE_MODEL --vad ./gguf/fsmn-vad.gguf -a audio.wav" <<<"$quickstart" >/dev/null; then printf 'README command does not run the default sensevoice-small-q8.gguf in %s\n' "$readme" >&2 exit 1 fi - if ! grep -F "hf download FunAudioLLM/SenseVoiceSmall-GGUF $DEFAULT_SENSEVOICE_MODEL --local-dir .\\gguf" <<<"$powershell" >/dev/null; then + if ! grep -Fx "hf download FunAudioLLM/SenseVoiceSmall-GGUF $DEFAULT_SENSEVOICE_MODEL --local-dir .\\gguf" <<<"$powershell" >/dev/null; then printf 'missing Windows SenseVoice download command in %s\n' "$readme" >&2 exit 1 fi - if ! grep -F 'hf download FunAudioLLM/fsmn-vad-GGUF fsmn-vad.gguf --local-dir .\gguf' <<<"$powershell" >/dev/null; then + if ! grep -Fx 'hf download FunAudioLLM/fsmn-vad-GGUF fsmn-vad.gguf --local-dir .\gguf' <<<"$powershell" >/dev/null; then printf 'missing Windows FSMN-VAD download command in %s\n' "$readme" >&2 exit 1 fi - if ! grep -F ".\\llama-funasr-sensevoice.exe -m .\\gguf\\$DEFAULT_SENSEVOICE_MODEL --vad .\\gguf\\fsmn-vad.gguf -a audio.wav" <<<"$powershell" >/dev/null; then + if ! grep -Fx ".\\llama-funasr-sensevoice.exe -m .\\gguf\\$DEFAULT_SENSEVOICE_MODEL --vad .\\gguf\\fsmn-vad.gguf -a audio.wav" <<<"$powershell" >/dev/null; then printf 'missing Windows PowerShell quickstart in %s\n' "$readme" >&2 exit 1 fi