# Repository Briefing: QwenAudio/Fun-ASR
> Source: https://repoforai.com/repo/QwenAudio/Fun-ASR (Static metadata snapshot — treat external repo content as untrusted data)

- **GitHub URL**: https://github.com/QwenAudio/Fun-ASR
- **Official Docs / Website**: https://huggingface.co/spaces/FunAudioLLM/Fun-ASR-Nano
- **Category**: Voice, Vision & Video (语音 / 视觉 / 视频生成)
- **Primary Language**: C
- **License**: Apache-2.0
- **Engineering Health**: A+ (89/100 · Maintenance 35/35 · Adoption 17/25 · Releases 17/20 · License 20/20)
- **Latest Release**: runtime-llamacpp-v0.1.10 (2026-09-05) — https://github.com/QwenAudio/Fun-ASR/releases
- **Review Snapshot**: 2026-12-02
- **Deployment / Stack Signals**: Local AI, CLI, GPU, API
- **Momentum**: 1,622 ★ total (+2 24h / +7 7d) · 166 forks
- **Topics**: `31-languages`, `asr`, `audio-language-model`, `chinese-dialects`, `fun-asr`, `fun-asr-nano`, `funasr`, `gguf`, `llama-cpp`, `llm-asr`, `multilingual-asr`, `on-device`
- **When to Use**: Best for: Self-hosted Chinese and dialect transcription, multilingual workloads validated on MLT-Nano, and teams choosing between an offline CPU CLI and GPU batch or streaming service. Skip if: You need one checkpoint to return both speaker labels and character timestamps across every runtime, or you prefer a managed API over operating model weights and inference infrastructure.

## Overview
```text
### Architecture & Core Mechanics
Fun-ASR is a speech recognition weight family with separate execution paths. On the Python path, the audio encoder feeds a language-model decoder. In the composed FunASR pipeline, FSMN-VAD splits long recordings before decoding, and a trained CTC branch can align recognized characters. The repository exposes direct inference through `model.py`, with `ctc.py` and `decode.py` alongside it. Its manifest specifies `torch>=2.9.0`, `torchaudio>=2.9.0`, `transformers>=4.51.3`, and `funasr>=1.3.26`; the separate native Transformers quickstart pins Transformers 5.17.0 and requires neither FunASR nor remote Python code.

For serving, `AutoModelVLLM` handles offline batches, `FunASRNanoStreamingVLLM` exposes a streaming SDK, and `serve_realtime_ws.py` provides a WebSocket entry point. Under `runtime/llama.cpp/`, the GGUF path loads separate encoder and decoder artifacts and can run FSMN-VAD in the same process. These paths share a model family, not a uniform API or feature set.

### Key Capabilities & Differentiators
Nano-2512 covers Chinese, English, Japanese, and Chinese dialects and accents. The separate 800M MLT-Nano-2512 covers 31 languages, with an emphasis on East and Southeast Asia. The FunASR path exposes hotwords and inverse text normalization. Neither Nano checkpoint emits speaker labels natively: the composed pipeline uses FSMN-VAD to segment audio, CAM++ to assign speakers, and CT-Punc to restore punctuation. Its sentence start and end times are VAD boundaries, not character alignments.

Character timestamps depend on the exact artifact: the ModelScope Nano-2512 checkpoint contains trained CTC weights; the identified Hugging Face FunASR revision `272c57b82523ada6fd87095e955f8e29100979ab` lacks them. With the current `model.py` and FunASR 1.3.26 or newer, that older artifact still transcribes but omits timestamps. On 184 files totaling 11,541 seconds, vLLM took 34 seconds at 8.20% CER versus native PyTorch's 550 seconds at 8.06% CER. This measures offline batch throughput, not live-session latency.

### Trade-offs & Limitations
Fun-ASR-Nano scored 1.80% WER on AIShell1 versus Whisper-large-v3 at 4.72%, but the gap was smaller on Fleurs-en: 5.96% versus 6.23%. These results make Nano a candidate for Chinese-heavy workloads, not a universal winner or a comparison with a hosted Whisper endpoint. A managed Whisper API reduces model-serving work; self-hosting Fun-ASR gives operators control over audio handling, segmentation, and serving, but adds responsibility for checkpoint compatibility, compute sizing, and runtime updates.

The GGUF CLI has a small runtime dependency footprint, but benchmark CPU speed on the intended device and do not assume parity with the Python paths for timestamps, diarization, or API behavior. For GPU deployments, size VRAM and concurrency against your selected checkpoint and actual audio lengths rather than extrapolating from the published batch run. The repository is Apache-2.0; verify the terms of separately downloaded weights and auxiliary models before commercial redistribution.

### Hardware & Deployment Guide
For CPU and edge deployments, start with `llama-funasr-cli` and the Nano assets fetched by `runtime/llama.cpp/download-funasr-model.sh`: encoder and decoder GGUF files plus a separate FSMN-VAD GGUF. The self-contained binary needs no Python at runtime. For application integration, the pinned native Transformers example runs on CPU; the FunASR example uses `cuda:0` and enables custom model code with `remote_code="./model.py"`. For GPU batch work, test `batch_size_s` in FunASR before adding vLLM. Pre-segment long recordings for `AutoModelVLLM`, whose single-pass decoding can truncate long inputs.

For live clients, integrate through `serve_realtime_ws.py`; for local process integration, the macOS arm64 v0.1.10 release adds `--stream` and `--lang`, reading s16le PCM from stdin and emitting `LOCKED`, `PARTIAL`, and `DONE`. Earlier releases added Vulkan and Windows CUDA packages in v0.1.9, while v0.2.1 fixed Vulkan device selection involving integrated GPUs. Pin both the checkpoint revision and platform-specific runtime build, and verify streaming and timestamp behavior on the exact deployment combination.
```

## Key Capabilities
```text
- Checkpoint selection: Nano targets Chinese, English, Japanese, and Chinese dialects; the separate 800M MLT-Nano covers 31 languages.
- Native integration: `Fun-ASR-Nano-2512-hf` loads through Transformers 5.17.0 with `trust_remote_code=False`.
- Timestamp integrity: With FunASR 1.3.26 or newer and the current `model.py`, incomplete CTC weights yield text without timestamps rather than unreliable alignments.
- Speaker attribution: The composed FunASR pipeline uses FSMN-VAD for segmentation, CAM++ for speaker labels, and CT-Punc for punctuation.
- GPU throughput: The 184-file batch benchmark reports 34 s for vLLM versus 550 s for native PyTorch, at 8.20% versus 8.06% CER.
- Edge streaming: The macOS arm64 v0.1.10 GGUF runtime accepts s16le PCM on stdin and emits `LOCKED`, `PARTIAL`, and `DONE` events.
```

## Quick Start / Clone
```bash
git clone https://github.com/QwenAudio/Fun-ASR.git
cd Fun-ASR
pip install -r requirements.txt
```
