⭐ 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. It supports multilingual speech recognition covering Chinese (with dialects), English, Japanese, Korean, and many more languages.

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.

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
782
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