How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("automatic-speech-recognition", model="FunAudioLLM/Fun-ASR-Nano-2512-hf")
# Load model directly
from transformers import AutoModelForSeq2SeqLM
model = AutoModelForSeq2SeqLM.from_pretrained("FunAudioLLM/Fun-ASR-Nano-2512-hf", dtype="auto")
Quick Links

⭐ Powered by FunASR — please give us a GitHub Star!

This model is part of the FunASR ecosystem — one industrial-grade open-source toolkit for ASR · VAD · punctuation · speaker diarization · emotion / event · LLM-ASR. A Star really helps the project (and keeps you updated):

🌟 FunASR · 🌟 SenseVoice · 🌟 Fun-ASR · 🌟 FunClip

Fun-ASR-Nano (Hugging Face Transformers)

This is the Hugging Face Transformers-compatible version of Fun-ASR-Nano-2512.

Fun-ASR-Nano is an end-to-end speech recognition model by FunAudioLLM, trained on tens of millions of hours of real speech data. This checkpoint supports Chinese, English, and Japanese; its Chinese coverage includes 7 dialect groups and 26 regional accents. For 31-language recognition, use the separate Fun-ASR-MLT-Nano-2512 checkpoint.

Transformers quickstart

Fun-ASR-Nano support is being added to Transformers in huggingface/transformers#46180. Until it is included in a Transformers release, use a build containing that PR.

With PyTorch installed for your platform, install the tested PR build and the quickstart dependencies:

python -m pip install accelerate librosa \
  "transformers @ https://github.com/huggingface/transformers/archive/d58b6371091473c7bd1486f3147950c6e076ace9.zip"
import torch
from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor

model_id = "FunAudioLLM/Fun-ASR-Nano-2512-hf"
processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForSpeechSeq2Seq.from_pretrained(
    model_id,
    dtype=torch.bfloat16,
    device_map="auto",
)

audio_url = "https://huggingface.co/FunAudioLLM/Fun-ASR-Nano-2512/resolve/main/example/en.mp3"
inputs = processor.apply_transcription_request(audio=audio_url, return_tensors="pt").to(model.device)

generated_ids = model.generate(**inputs, max_new_tokens=200)
generated_ids = generated_ids[:, inputs.input_ids.shape[1] :]
print(processor.batch_decode(generated_ids, skip_special_tokens=True)[0])

Expected transcription:

The tribal chieftain called for the boy, and presented him with fifty pieces of gold.

For batch inference, training, torch.compile, benchmarks, and the full model description, see the Transformers documentation and the original model card.

Downloads last month
793
Safetensors
Model size
0.8B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support