mirror of
https://github.com/modelscope/FunASR.git
synced 2026-10-12 02:19:18 +00:00
* Add llama.cpp/GGUF runtime for Fun-ASR-Nano, SenseVoice and Paraformer Run FunASR models entirely on the llama.cpp / ggml stack: CPU / edge, single binary, no Python at runtime, quantized GGUF weights (like whisper.cpp for Whisper). Adds runtime/llama.cpp/ with three models sharing a common ggml SAN-M encoder / FSMN / attention and kaldi fbank front end: - fun-asr-nano : SAN-M encoder + adaptor + Qwen3-0.6B LLM (audio embeds injected via llama_decode embedding input, llava/mtmd style); integrated WAV->text CLI. - sensevoice : SAN-M encoder + CTC; WAV->CTC ids. - paraformer : SAN-M encoder + CIF predictor + SAN-M decoder (non-autoregressive). Each ships a GGUF export script and a README (architecture, quickstart, accuracy, gotchas). Validated against the PyTorch reference (encoder cosine ~1.0; SenseVoice CTC ids identical; Paraformer text identical; Fun-ASR-Nano CER within 0.02% under identical conditions). Adds a new directory only; no existing code is modified. * docs: add comprehensive design document (architecture, GGUF format, validation, gotchas) * docs: link README to DESIGN.md * fix: address code review (WAV ch/bits validation, chunk guard, null/leak checks) Fixes gemini-code-assist findings: validate channels/bits in the WAV reader (reject non-16-bit/zero-channel instead of dividing by zero), guard chunk size >=1, null-check fopen/llama_context, and fclose/ggml_free on all paths. --------- Co-authored-by: LauraGPT <[email protected]>