Prefer matching discrete GPU devices while retaining a matching integrated GPU as fallback. Tested with the pinned llama.cpp revision in CPU and Vulkan builds; this addresses the iGPU selector bug without claiming to fix the separate RX 9070 XT backend crash.
`raise "some message"` is invalid in Python 3 — a str is not an exception — so
the interpreter discards the message and raises
TypeError: exceptions must derive from BaseException
instead. Paired with a bare `except:`, the original cause is lost too, and the
user is told to install something they may already have.
Concretely: funasr was installed, but importing it failed on a missing
torchaudio. The message said 'please install funasr', the traceback said
TypeError, and the actual ModuleNotFoundError was nowhere to be seen.
This converts all 30 occurrences under runtime/python to real exceptions:
- guarded imports -> except ImportError as e: raise ImportError(...) from e
- everything else -> except Exception as e: raise RuntimeError(...) from e
`from e` keeps the original traceback, so a missing transitive dependency stays
visible. Narrowing the bare `except:` also stops unrelated failures from being
reported as a missing package — the model_dir branch in particular fired for any
failure, so a mistyped path also surfaced as TypeError.
Messages are unchanged. No behaviour changes beyond the exception type.
Refresh the pinned llama.cpp revision with AMD Vulkan submission batching and DeviceLost diagnostics, adapt the sampler API, and document Windows troubleshooting. Refs #3479.
* feat(runtime): add Windows Vulkan release asset
* fix(ci): install SPIR-V headers for Windows Vulkan
* fix(runtime): make Windows Vulkan package standalone
Document the current sm_86 Windows CUDA prebuilt limit and direct RTX 50 / Blackwell users to CPU binaries or source builds with CMAKE_CUDA_ARCHITECTURES=120 until a dedicated asset is available.
Adds a Windows x64 CUDA release asset for the llama.cpp SenseVoice runtime, with CUDA Toolkit setup, architecture-86 build flags, focused SenseVoice target packaging, docs, and workflow regression tests. Manual workflow dispatch 29656771776 passed all build matrix jobs including build-windows-x64-cuda.
SenseVoice and Paraformer binaries now output text directly (whisper-cli style),
no Python detok step.
- export_{sensevoice,paraformer}_gguf.py: embed the vocab as a GGUF string array
(sv.vocab = SentencePiece pieces; pf.vocab = tokens.json) so the binary is self-contained.
- funasr-sensevoice.cpp: CTC ids -> text (pieces + ▁->space), drop <|...|> meta by
default; --ids (raw), --keep-tags (keep meta tags).
- funasr-paraformer.cpp: ids -> text (tokens.json, drop @@ continuations); --ids for raw.
- both fall back to ids if the GGUF has no vocab. READMEs updated to text output.
Verified: C++ text == reference detok (sentencepiece / tokens.json) on sample and the
full 002 clip; ids unchanged so CER is unchanged.
* test: numerical regression harness (frozen golden vs ggml/VAD/CIF/CTC output)
Adds tests/ — runs each runtime tool on a fixed 6 s clip and diffs against frozen
golden output, catching regressions in the ggml graphs, the FSMN-VAD state machine,
the CIF predictor and CTC decode.
- tests/run_regression.sh: auto-detects which tools are built; VAD model is auto-fetched
(1.7 MB), ASR GGUFs tested when present or with RUN_FULL=1 (downloads from HF).
Non-zero exit on any mismatch. BIN_DIR/MODELS_DIR overridable.
- tests/sample.wav (~6 s) + tests/golden/*.txt: golden captured on Linux x86-64 with the
f16 GGUFs from FunAudioLLM/*-GGUF.
Verified locally: all present tools PASS; default mode fetches VAD + skips absent models.
* test: golden as text (binaries now detok in-process; merge after in-binary-detok)
* test: fix sensevoice golden (correct transcription text)
- download-funasr-model.sh: detect `hf` (new CLI) or fall back to `huggingface-cli`
(older huggingface_hub); fail with an install hint if neither exists.
- convert-funasr-to-gguf.py: catch ModuleNotFoundError and print how to install the
missing package instead of a raw traceback.