All apps · 0 apps
Fun-ASR-Nano-API
Docker app from hsiang's Repository
Overview
Readme
View on GitHubFun-ASR-Nano-API
OpenAI-compatible Speech-to-Text API powered by Fun-ASR-Nano (Alibaba FunAudioLLM).
800M parameters. 31 languages. Chinese dialects. Hotwords. VAD. Punctuation. Speaker diarization. One container.
Features
- OpenAI-compatible
/v1/audio/transcriptionsendpoint - 31 languages (Chinese, English, Japanese, Korean, Vietnamese, Arabic, and more)
- Chinese dialects: Wu, Cantonese, Min, Hakka, Gan, Xiang, Jin + 26 regional accents
- Hotword boosting (improve recognition of domain-specific terms)
- VAD (Voice Activity Detection) — auto-segments long audio
- Automatic punctuation restoration
- Speaker diarization (who said what)
- Switchable models via
MODEL_ID:Fun-ASR-Nano-2512(default) — full features, dialects, hotwordsFun-ASR-MLT-Nano-2512— 31 languages including European
Quick Start
# Default: Fun-ASR-Nano (Chinese dialects, hotwords, full features)
docker run -d --gpus all \
-p 8080:8080 \
-v /mnt/user/appdata/fun-asr-nano-api/models:/root/.cache/huggingface \
-e MODEL_ID=FunAudioLLM/Fun-ASR-Nano-2512 \
--shm-size=4g \
--name fun-asr-nano-api \
ghcr.io/hsiang-han/fun-asr-nano-api:latest
# With speaker diarization enabled
docker run -d --gpus all \
-p 8080:8080 \
-v /mnt/user/appdata/fun-asr-nano-api/models:/root/.cache/huggingface \
-e MODEL_ID=FunAudioLLM/Fun-ASR-Nano-2512 \
-e ENABLE_SPK=true \
--shm-size=4g \
--name fun-asr-nano-api \
ghcr.io/hsiang-han/fun-asr-nano-api:latest
# Alternative: Fun-ASR-MLT (31 languages including European)
docker run -d --gpus all \
-p 8080:8080 \
-v /mnt/user/appdata/fun-asr-nano-api/models:/root/.cache/huggingface \
-e MODEL_ID=FunAudioLLM/Fun-ASR-MLT-Nano-2512 \
--shm-size=4g \
--name fun-asr-nano-api \
ghcr.io/hsiang-han/fun-asr-nano-api:latest
China users: add -e HF_ENDPOINT=https://hf-mirror.com.
Usage Examples
# Basic transcription (OpenAI-compatible)
curl -X POST http://localhost:8080/v1/audio/transcriptions \
-F "file=@audio.wav"
# Specify language
curl -X POST http://localhost:8080/v1/audio/transcriptions \
-F "file=@audio.wav" \
-F "language=中文"
# With hotwords (boost domain-specific terms)
curl -X POST http://localhost:8080/v1/audio/transcriptions \
-F "file=@audio.wav" \
-F "hotwords=人工智能,大语言模型,通义千问"
# Verbose output (timestamps + speaker info if enabled)
curl -X POST http://localhost:8080/v1/audio/transcriptions \
-F "file=@audio.wav" \
-F "response_format=verbose_json"
Response Examples
Standard (json):
{"text": "今天天气真好,我们出去玩吧。"}
Verbose (verbose_json, with speaker diarization):
{
"text": "今天天气真好,我们出去玩吧。",
"language": "中文",
"segments": [
{"start": 0.0, "end": 2.5, "text": "今天天气真好,", "speaker": 0},
{"start": 2.5, "end": 4.8, "text": "我们出去玩吧。", "speaker": 1}
]
}
API Endpoints
| Endpoint | Method | Description |
|---|---|---|
/v1/audio/transcriptions |
POST | Speech-to-text (OpenAI-compatible) |
/v1/models |
GET | List models |
/health |
GET | Health check (shows enabled features) |
/docs |
GET | Swagger documentation |
Environment Variables
| Variable | Default | Description |
|---|---|---|
| MODEL_ID | FunAudioLLM/Fun-ASR-Nano-2512 | Model to load |
| DEVICE | cuda:0 | Compute device (cuda:0, cpu) |
| LANGUAGE | auto | Default language (auto, 中文, English, 日文, etc.) |
| ENABLE_VAD | true | Voice Activity Detection (segments long audio) |
| ENABLE_PUNC | true | Auto punctuation restoration |
| ENABLE_SPK | false | Speaker diarization (who said what) |
| PORT | 8080 | API server port |
| HF_ENDPOINT | https://huggingface.co | HuggingFace mirror |
Available Models
| Model ID | Languages | Features |
|---|---|---|
| FunAudioLLM/Fun-ASR-Nano-2512 | Chinese+dialects, English, Japanese, Korean, + more | Hotwords, dialects, accents, lyrics |
| FunAudioLLM/Fun-ASR-MLT-Nano-2512 | 31 languages (including European) | Broader language coverage |
Pipeline Components
| Component | Model | Size | Enabled by |
|---|---|---|---|
| ASR | Fun-ASR-Nano-2512 | 800M | always |
| VAD | fsmn-vad | 0.4M | ENABLE_VAD=true |
| Punctuation | ct-punc | 290M | ENABLE_PUNC=true |
| Speaker | cam++ | 7.2M | ENABLE_SPK=true |
Hardware Requirements
- NVIDIA GPU with 2GB+ VRAM (ASR only) or 3GB+ (with all components)
- NVIDIA driver 550+
- Docker with NVIDIA Container Toolkit
Credits
- Fun-ASR-Nano by Alibaba FunAudioLLM / Tongyi Lab
- FunASR toolkit
License
Apache-2.0
Install Fun-ASR-Nano-API on Unraid in a few clicks.
Find Fun-ASR-Nano-API in Community Apps on your Unraid server, review the template, and click Install. Unraid handles the Docker app or plugin setup from the published template.
Categories
Related apps
Explore more like this
Explore allDetails
ghcr.io/hsiang-han/fun-asr-nano-api:latestRuntime arguments
- Web UI
http://[IP]:[PORT:8080]/docs- Network
bridge- Shell
bash- Privileged
- false
- Extra Params
--gpus all --shm-size=4g
Template configuration
OpenAI-compatible STT API port. Swagger docs at /docs
- Target
- 8080
- Default
- 8080
- Value
- 8080
Model download cache. Persists across container recreates.
- Target
- /root/.cache/huggingface
- Default
- /mnt/user/appdata/fun-asr-nano-api/models
- Value
- /mnt/user/appdata/fun-asr-nano-api/models
Fun-ASR-Nano-2512 (full features, dialects, hotwords) or FunAudioLLM/Fun-ASR-MLT-Nano-2512 (31 languages including European).
- Target
- MODEL_ID
- Default
- FunAudioLLM/Fun-ASR-Nano-2512
- Value
- FunAudioLLM/Fun-ASR-Nano-2512
Default language: auto, 中文, English, 日文, etc. Per-request override via API parameter.
- Target
- LANGUAGE
- Default
- auto
- Value
- auto
Voice Activity Detection. Segments long audio into utterances. Recommended for files longer than 30s.
- Target
- ENABLE_VAD
- Default
- true
- Value
- true
Auto-add punctuation to transcription output.
- Target
- ENABLE_PUNC
- Default
- true
- Value
- true
Identify who is speaking. Adds ~7MB speaker model. Results in verbose_json format.
- Target
- ENABLE_SPK
- Default
- false
- Value
- false
HuggingFace download endpoint. China users: change to https://hf-mirror.com for faster downloads.
- Target
- HF_ENDPOINT
- Default
- https://huggingface.co
- Value
- https://huggingface.co
GPU selection (all, 0, 1, etc.)
- Target
- NVIDIA_VISIBLE_DEVICES
- Default
- all
- Value
- all
NVIDIA driver capabilities
- Target
- NVIDIA_DRIVER_CAPABILITIES
- Default
- compute,utility
- Value
- compute,utility