CoolFace
Modelpublic

Grushashunyalabsai/qwen3-asr-rakuten-multilingual-18lang

sourceHugging Faceupdated 3mo agoView on Hugging Face
0likes13downloads
Model Card

Qwen3-ASR Rakuten Multilingual (18 Languages)

Fine-tuned Qwen3-ASR model for multilingual automatic speech recognition, optimized for Rakuten customer service use cases.

Supported Languages (18)

English, Chinese, French, Portuguese, Korean, Vietnamese, Hindi, Thai, Indonesian, Tamil, Urdu, Nepali, Uzbek, Mongolian, Sinhala, Burmese, Japanese, Italian

Quick Start

Installation

bash
pip install -U qwen-asr

Inference

python
import torch
from qwen_asr import Qwen3ASRModel

model_path = "Grushashunyalabsai/qwen3-asr-rakuten-multilingual-18lang"
device = "cuda:0" if torch.cuda.is_available() else "cpu"
dtype = torch.bfloat16 if device.startswith("cuda") else torch.float32

asr = Qwen3ASRModel.from_pretrained(
    model_path,
    dtype=dtype,
    device_map=device,
    max_inference_batch_size=16,
    max_new_tokens=440,
)

# Single file (auto-detect language)
results = asr.transcribe(audio="audio.wav")
print(results[0].language)  # e.g. "Japanese"
print(results[0].text)      # transcribed text

# Force a specific language
results = asr.transcribe(audio="audio.wav", language="Japanese")

# From numpy array (16kHz mono)
import numpy as np
audio_array = np.zeros(16000, dtype=np.float32)  # 1 sec
results = asr.transcribe(audio=(audio_array, 16000))

# Batch processing
results = asr.transcribe(
    audio=["file1.wav", "file2.wav", "file3.wav"],
    language=["Japanese", "English", "Hindi"],
)
for r in results:
    print(f"{r.language}: {r.text}")

CLI Inference

bash
# Auto-detect language
python infer.py audio.wav

# Force language
python infer.py audio.wav --language Japanese

# Batch folder to JSONL
python infer.py ./audio_dir --out results.jsonl

Model Details

  • —Base Model: Qwen/Qwen3-ASR-1.7B
  • —Format: SafeTensors (bf16)
  • —Size: ~3.8 GB
  • —Max Audio Duration: 30 seconds per utterance
  • —Sample Rate: 16kHz (automatically resampled)

Training

  • —Hardware: 2x A100 GPUs (DDP)
  • —Data: 1,624,974 utterances across 18 languages
  • —Epochs: 2
  • —Learning Rate: 2e-5 (linear schedule)
  • —Batch Size: 16 (effective)
  • —Gradient Checkpointing: Enabled
  • —Final Train Loss: ~0.10
  • —Max Transcript Length: 500 characters

Audio Input Formats

The model accepts:

  • —File paths: .wav, .flac, .mp3, .m4a, .ogg, .opus, .webm
  • —NumPy arrays: (np.ndarray, sample_rate) tuple
  • —URLs: Direct audio URLs
  • —Batch: List of any of the above

Output Format

python
@dataclass
class ASRTranscription:
    language: str    # e.g. "Japanese", "English", "Chinese,English"
    text: str        # Transcribed text
    time_stamps: Optional[Any]  # Word-level timestamps (if requested)

Files

  • —model.safetensors — Model weights (bf16)
  • —config.json — Model configuration
  • —tokenizer_config.json — Tokenizer configuration
  • —vocab.json — Vocabulary
  • —merges.txt — BPE merges
  • —infer.py — CLI inference script
  • —preprocessor_config.json — Audio preprocessor config