Automatic Speech Recognition
Transformers
Safetensors
Khmer
qwen3_asr
speech
audio
khmer
qwen3-asr
Eval Results (legacy)
Instructions to use seanghay/Qwen3-ASR-0.6B-Khmer with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use seanghay/Qwen3-ASR-0.6B-Khmer with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="seanghay/Qwen3-ASR-0.6B-Khmer")# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("seanghay/Qwen3-ASR-0.6B-Khmer") model = AutoModelForMultimodalLM.from_pretrained("seanghay/Qwen3-ASR-0.6B-Khmer") - Notebooks
- Google Colab
- Kaggle
Add model card
Browse files
README.md
ADDED
|
@@ -0,0 +1,142 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: apache-2.0
|
| 3 |
+
language:
|
| 4 |
+
- km
|
| 5 |
+
base_model:
|
| 6 |
+
- Qwen/Qwen3-ASR-0.6B
|
| 7 |
+
pipeline_tag: automatic-speech-recognition
|
| 8 |
+
library_name: transformers
|
| 9 |
+
tags:
|
| 10 |
+
- automatic-speech-recognition
|
| 11 |
+
- speech
|
| 12 |
+
- audio
|
| 13 |
+
- khmer
|
| 14 |
+
- qwen3-asr
|
| 15 |
+
metrics:
|
| 16 |
+
- cer
|
| 17 |
+
model-index:
|
| 18 |
+
- name: Qwen3-ASR-0.6B-Khmer
|
| 19 |
+
results:
|
| 20 |
+
- task:
|
| 21 |
+
type: automatic-speech-recognition
|
| 22 |
+
name: Automatic Speech Recognition
|
| 23 |
+
dataset:
|
| 24 |
+
type: khmer
|
| 25 |
+
name: Khmer held-out dev set (in-domain)
|
| 26 |
+
metrics:
|
| 27 |
+
- type: cer
|
| 28 |
+
value: 1.96
|
| 29 |
+
name: CER
|
| 30 |
+
- task:
|
| 31 |
+
type: automatic-speech-recognition
|
| 32 |
+
name: Automatic Speech Recognition
|
| 33 |
+
dataset:
|
| 34 |
+
type: khmer
|
| 35 |
+
name: Khmer out-of-domain set
|
| 36 |
+
metrics:
|
| 37 |
+
- type: cer
|
| 38 |
+
value: 7.91
|
| 39 |
+
name: CER
|
| 40 |
+
---
|
| 41 |
+
|
| 42 |
+
# Qwen3-ASR-0.6B-Khmer
|
| 43 |
+
|
| 44 |
+
A Khmer (ខ្មែរ) automatic speech recognition model, fine-tuned from
|
| 45 |
+
[**Qwen/Qwen3-ASR-0.6B**](https://huggingface.co/Qwen/Qwen3-ASR-0.6B) on
|
| 46 |
+
~700 hours of Khmer speech. It substantially improves Khmer transcription
|
| 47 |
+
accuracy over the base model while keeping the compact 0.6B footprint.
|
| 48 |
+
|
| 49 |
+
## Results
|
| 50 |
+
|
| 51 |
+
Character Error Rate (CER, lower is better). Khmer has no spaces between words,
|
| 52 |
+
so CER is computed **space-insensitive**; the out-of-domain set is additionally
|
| 53 |
+
normalized by removing punctuation.
|
| 54 |
+
|
| 55 |
+
| Evaluation set | Clips | CER (corpus) | CER (avg) | Median CER | Perfect (CER=0) |
|
| 56 |
+
|---|---:|---:|---:|---:|---:|
|
| 57 |
+
| In-domain dev | 1,000 | **1.96%** | 1.95% | 0.65% | 49.2% |
|
| 58 |
+
| Out-of-domain | 2,906 | **7.91%** | 8.26% | 6.25% | 26.4% |
|
| 59 |
+
|
| 60 |
+
- **CER (corpus)** = total edit distance ÷ total reference characters (micro-average).
|
| 61 |
+
- **CER (avg)** = mean of per-clip CER (macro-average).
|
| 62 |
+
|
| 63 |
+
On the out-of-domain set, this model roughly halves the CER of an earlier,
|
| 64 |
+
smaller-data checkpoint (≈16% → ≈8%), showing the fine-tuning generalizes
|
| 65 |
+
beyond the training domain.
|
| 66 |
+
|
| 67 |
+
## Usage
|
| 68 |
+
|
| 69 |
+
Install the [`qwen-asr`](https://pypi.org/project/qwen-asr/) package (transformers backend):
|
| 70 |
+
|
| 71 |
+
```bash
|
| 72 |
+
pip install -U qwen-asr
|
| 73 |
+
```
|
| 74 |
+
|
| 75 |
+
```python
|
| 76 |
+
import torch
|
| 77 |
+
from qwen_asr import Qwen3ASRModel
|
| 78 |
+
|
| 79 |
+
model = Qwen3ASRModel.from_pretrained(
|
| 80 |
+
"seanghay/Qwen3-ASR-0.6B-Khmer",
|
| 81 |
+
dtype=torch.bfloat16,
|
| 82 |
+
device_map="cuda:0",
|
| 83 |
+
max_inference_batch_size=32,
|
| 84 |
+
max_new_tokens=256, # increase for long audio to avoid truncation
|
| 85 |
+
)
|
| 86 |
+
|
| 87 |
+
results = model.transcribe(
|
| 88 |
+
audio="path/to/khmer.wav", # local path, URL, base64, or (np.ndarray, sr)
|
| 89 |
+
language="Khmer", # force Khmer decoding
|
| 90 |
+
)
|
| 91 |
+
|
| 92 |
+
print(results[0].text)
|
| 93 |
+
```
|
| 94 |
+
|
| 95 |
+
Audio is resampled to 16 kHz mono internally. Long recordings are automatically
|
| 96 |
+
chunked; for long clips set a larger `max_new_tokens` so the transcript is not cut off.
|
| 97 |
+
|
| 98 |
+
## Training
|
| 99 |
+
|
| 100 |
+
| | |
|
| 101 |
+
|---|---|
|
| 102 |
+
| Base model | Qwen/Qwen3-ASR-0.6B |
|
| 103 |
+
| Language | Khmer (`km`) |
|
| 104 |
+
| Training data | ~700 h Khmer speech (~384k clips) |
|
| 105 |
+
| Epochs | 3 (35,997 steps) |
|
| 106 |
+
| Effective batch size | 32 (per-device 4 × grad-accum 8) |
|
| 107 |
+
| Learning rate | 2e-5, linear schedule with warmup |
|
| 108 |
+
| Precision | bf16 |
|
| 109 |
+
| Hardware | 1× NVIDIA RTX 3090 (24 GB) |
|
| 110 |
+
| Final eval loss | 0.040 |
|
| 111 |
+
|
| 112 |
+
The model is trained to emit a language tag followed by the transcript
|
| 113 |
+
(`language Khmer<asr_text>…`); the `qwen-asr` package parses this automatically.
|
| 114 |
+
|
| 115 |
+
## Limitations
|
| 116 |
+
|
| 117 |
+
- Tuned primarily for **read/clean Khmer speech**. Accuracy degrades on noisy,
|
| 118 |
+
spontaneous, or heavily **code-switched (Khmer–English) technical speech**,
|
| 119 |
+
where English terms may be transliterated phonetically into Khmer script.
|
| 120 |
+
- Output is unpunctuated / minimally segmented Khmer text.
|
| 121 |
+
- As with most ASR models, very long or hesitant/repetitive speech can
|
| 122 |
+
occasionally produce repeated phrases.
|
| 123 |
+
|
| 124 |
+
## License
|
| 125 |
+
|
| 126 |
+
Released under the **Apache-2.0** license, inheriting the license of the base
|
| 127 |
+
Qwen3-ASR-0.6B model.
|
| 128 |
+
|
| 129 |
+
## Acknowledgements
|
| 130 |
+
|
| 131 |
+
Built on [Qwen3-ASR](https://github.com/QwenLM/Qwen3-ASR) by the Alibaba Qwen team.
|
| 132 |
+
|
| 133 |
+
## Citation
|
| 134 |
+
|
| 135 |
+
```bibtex
|
| 136 |
+
@misc{qwen3asr,
|
| 137 |
+
title = {Qwen3-ASR},
|
| 138 |
+
author = {Qwen Team},
|
| 139 |
+
year = {2025},
|
| 140 |
+
url = {https://github.com/QwenLM/Qwen3-ASR}
|
| 141 |
+
}
|
| 142 |
+
```
|