Skip to main content
Back

VISTEC's Open Source Thai Speech Model Beats Google and Microsoft on Accuracy

A Thai speech recognition model built on wav2vec2 XLS-R crosses one million monthly downloads while beating Google, Microsoft, and Amazon on Common Voice benchmarks.

Pro

  • Thai ASR model finetuned from facebook/wav2vec2-large-xlsr-53 on Common Voice 7.0.
  • Achieves 8.15% WER and 2.81% CER, beating Google, Microsoft, and Amazon Thai APIs.
  • Approaching 1M monthly downloads on Hugging Face, making it a de facto Thai ASR standard.
  • Trained on a single V100 with batch size 32, learning rate 1e-4, fp16, gradient checkpointing.
  • Powers the PyThaiASR package by default, with optional KenLM language model variants.
  • Released under CC-BY-SA 4.0 for weights and Apache 2.0 for training code.

Thai automatic speech recognition has long been a rough spot for global cloud APIs, and an open source model from Thailand's VISTEC-depa AI Research Institute is quietly eating their lunch. The airesearch wav2vec2-large-xlsr-53-th checkpoint is now pulling close to a million downloads a month on Hugging Face, ranking it among the most heavily used non-English ASR models on the hub.

The recipe is straightforward but the numbers are not. The team finetuned wav2vec2-large-xlsr-53 following the standard Fine-tuning Wav2Vec2 for English ASR guide, swapping in Thai examples from Common Voice Corpus 7.0, with notebooks and scripts published in the vistec-ai/wav2vec2-large-xlsr-53-th repository. The result is a CTC-based model that outperforms every major commercial Thai transcription API on the Common Voice test set.

Beating the cloud giants at their own game

On the test-unique split, the model hits 8.15% WER (deepcut tokenizer) and 2.81% CER without spell correction. Compare that to commercial APIs measured on the same audio:

SystemWER (deepcut)CER
This model8.152.81
Microsoft Bing Speech9.625.02
Google Web Speech10.867.36
Amazon Transcribe14.497.08
Kaldi from scratch-7.57

The character error rate gap stands out. At 2.81% CER, the model is roughly twice as accurate at the character level as Microsoft Bing and nearly three times better than Google Web Speech on this data. Adding a spell correction pass using TNC n-grams actually made things worse, pushing WER up to 14.17%, so the raw acoustic output wins.

Why Thai breaks the usual WER math

Thai is written without spaces between words, which breaks the standard WER calculation. The team worked around this by adding syllable_tokenize and word_tokenize from PyThaiNLP plus deepcut tokenizers to the evaluation script from the robust-speech-event benchmark. A Thai ASR system that outputs a correct string can still score badly if the tokenizer disagrees with the reference on where word boundaries fall, which is why the model card reports numbers under three different tokenizers.

Inside the training setup

Much of the quality traces back to the data pipeline. The team deduplicated and split the corpus using the ekapolc/Thai_commonvoice_split scheme to avoid leakage from naive random splits after cleaning, while preserving most of the audio for training. The final splits are 86,586 training clips, 3,027 validation, and 2,502 test.

Training itself was modest. The finetune ran on a single V100 GPU for up to 100 epochs at batch size 32, learning rate 1e-4, with fp16 and gradient checkpointing on. The dropout settings are the usual XLS-R fine-tuning defaults:

model = Wav2Vec2ForCTC.from_pretrained(
    "facebook/wav2vec2-large-xlsr-53",
    attention_dropout=0.1,
    hidden_dropout=0.1,
    feat_proj_dropout=0.0,
    mask_time_prob=0.05,
    layerdrop=0.1,
    ctc_loss_reduction="mean",
)
model.freeze_feature_extractor()

The feature extractor is frozen and only the transformer plus CTC head get updated, which is standard for XLS-R finetuning and keeps compute requirements low enough that reproducing this on a single consumer GPU is realistic.

Dropping it into a project

Usage is a two line load through transformers. Audio must be resampled to 16 kHz before feeding it to the processor:

from transformers import pipeline
pipe = pipeline("automatic-speech-recognition",
                model="airesearch/wav2vec2-large-xlsr-53-th")
print(pipe("clip.wav"))

For a higher level wrapper with language model rescoring, the PyThaiASR package uses airesearch/wav2vec2-large-xlsr-53-th as its default and ships offline Thai ASR from AIResearch.in.th. There are also community variants with KenLM on top for use cases that benefit from decoding with an external LM.

Where it works and where it does not

  • Good for: read speech, clean recordings, dictation apps, transcription of podcasts or interviews recorded in reasonable acoustic conditions.
  • Good for: on device or self hosted Thai ASR where sending audio to a cloud API is not acceptable for privacy, cost, or latency reasons.
  • Weaker for: heavy code switching between Thai and English, since Common Voice is monolingual Thai read speech.
  • Weaker for: far field audio, heavy background noise, or strong regional dialects that are underrepresented in Common Voice.
  • Not ideal for: domain specific vocabulary like medical or legal jargon without additional finetuning or LM rescoring.

The model weights are released under CC-BY-SA 4.0 while the training code is Apache 2.0, so downstream users should note that share alike applies to model derivatives even if the surrounding code does not carry that obligation. For self hosted transcription projects targeting Thai audio, this is currently the strongest freely available starting point, and the download numbers suggest the community has already figured that out.