Skip to content

Commit 634469c

Browse files
committed
fix(llama.cpp): validate Windows release layout
Signed-off-by: 游雁 <zhifu.gzf@alibaba-inc.com>
1 parent 941307a commit 634469c

3 files changed

Lines changed: 22 additions & 3 deletions

File tree

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ bash download-funasr-model.sh sensevoice ./gguf # or: paraformer | nano
256256
# Windows PowerShell: run from the extracted archive root (with the `hf` CLI installed)
257257
hf download FunAudioLLM/SenseVoiceSmall-GGUF sensevoice-small-q8.gguf --local-dir .\gguf
258258
hf download FunAudioLLM/fsmn-vad-GGUF fsmn-vad.gguf --local-dir .\gguf
259-
.\pkg\llama-funasr-sensevoice.exe -m .\gguf\sensevoice-small-q8.gguf --vad .\gguf\fsmn-vad.gguf -a audio.wav
259+
.\llama-funasr-sensevoice.exe -m .\gguf\sensevoice-small-q8.gguf --vad .\gguf\fsmn-vad.gguf -a audio.wav
260260
```
261261

262262
**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/)

README_zh.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ bash download-funasr-model.sh sensevoice ./gguf # 也可使用 paraformer
289289
# Windows PowerShell:在解压根目录执行(需已安装 `hf` CLI)
290290
hf download FunAudioLLM/SenseVoiceSmall-GGUF sensevoice-small-q8.gguf --local-dir .\gguf
291291
hf download FunAudioLLM/fsmn-vad-GGUF fsmn-vad.gguf --local-dir .\gguf
292-
.\pkg\llama-funasr-sensevoice.exe -m .\gguf\sensevoice-small-q8.gguf --vad .\gguf\fsmn-vad.gguf -a audio.wav
292+
.\llama-funasr-sensevoice.exe -m .\gguf\sensevoice-small-q8.gguf --vad .\gguf\fsmn-vad.gguf -a audio.wav
293293
```
294294

295295
**预编译二进制:** [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/)

runtime/llama.cpp/tests/test_download_funasr_model.sh

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@ assert_readme_quickstart() {
114114
local section_prefix=$2
115115
local section
116116
local quickstart
117+
local powershell
117118

118119
if ! section=$(awk -v prefix="$section_prefix" '
119120
!found && index($0, prefix) == 1 { found = 1 }
@@ -135,6 +136,16 @@ assert_readme_quickstart() {
135136
exit 1
136137
fi
137138

139+
if ! powershell=$(printf '%s\n' "$section" | awk '
140+
!seen && /^```powershell$/ { seen = 1; in_block = 1; next }
141+
in_block && /^```$/ { complete = 1; exit }
142+
in_block { print }
143+
END { if (!seen || !complete) exit 1 }
144+
'); then
145+
printf 'missing PowerShell quickstart block in %s\n' "$readme" >&2
146+
exit 1
147+
fi
148+
138149
if ! grep -F "bash download-funasr-model.sh sensevoice ./gguf" <<<"$quickstart" >/dev/null; then
139150
printf 'missing default SenseVoice download command in %s\n' "$readme" >&2
140151
exit 1
@@ -143,7 +154,15 @@ assert_readme_quickstart() {
143154
printf 'README command does not run the default sensevoice-small-q8.gguf in %s\n' "$readme" >&2
144155
exit 1
145156
fi
146-
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
157+
if ! grep -F "hf download FunAudioLLM/SenseVoiceSmall-GGUF $DEFAULT_SENSEVOICE_MODEL --local-dir .\\gguf" <<<"$powershell" >/dev/null; then
158+
printf 'missing Windows SenseVoice download command in %s\n' "$readme" >&2
159+
exit 1
160+
fi
161+
if ! grep -F 'hf download FunAudioLLM/fsmn-vad-GGUF fsmn-vad.gguf --local-dir .\gguf' <<<"$powershell" >/dev/null; then
162+
printf 'missing Windows FSMN-VAD download command in %s\n' "$readme" >&2
163+
exit 1
164+
fi
165+
if ! grep -F ".\\llama-funasr-sensevoice.exe -m .\\gguf\\$DEFAULT_SENSEVOICE_MODEL --vad .\\gguf\\fsmn-vad.gguf -a audio.wav" <<<"$powershell" >/dev/null; then
147166
printf 'missing Windows PowerShell quickstart in %s\n' "$readme" >&2
148167
exit 1
149168
fi

0 commit comments

Comments
 (0)