Model reference · open weights

wav2vec2-vietnamese-160h

Available as managed deployment Licence fee Audio khanhld · community Speech→text 1 variants 526 dl/mo

wav2vec2-vietnamese-160h is an open-weight audio or speech model from khanhld. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.

Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.

What it is

Released bykhanhld
TypeAudio & music
TaskSpeech→text
Runs withtransformers
Released2022-05-07
Popularity526 downloads / month
LicenceCommercial licence needed

About

What wav2vec2-vietnamese-160h is

Read the full model card

Vietnamese Speech Recognition using Wav2vec 2.0

Table of contents

  1. Model Description
  2. Implementation
  3. Benchmark Result
  4. Example Usage
  5. Evaluation
  6. Citation
  7. Contact

Model Description

Fine-tuned the Wav2vec2-based model on about 160 hours of Vietnamese speech dataset from different resources, including VIOS, COMMON VOICE, FOSD and VLSP 100h. We have not yet incorporated the Language Model into our ASR system but still gained a promising result.

Implementation

We also provide code for Pre-training and Fine-tuning the Wav2vec2 model. If you wish to train on your dataset, check it out here:

Benchmark WER Result

VIVOSCOMMON VOICE 8.0
without LM15.0510.78
with LMin progressin progress
from transformers import Wav2Vec2Processor, Wav2Vec2ForCTC
import librosa
import torch

device = torch.device("cuda" if torch.cuda.is_available() else "cpu")

processor = Wav2Vec2Processor.from_pretrained("khanhld/wav2vec2-base-vietnamese-160h")
model = Wav2Vec2ForCTC.from_pretrained("khanhld/wav2vec2-base-vietnamese-160h")
model.to(device)

def transcribe(wav):
  input_values = processor(wav, sampling_rate=16000, return_tensors="pt").input_values
  logits = model(input_values.to(device)).logits
  pred_ids = torch.argmax(logits, dim=-1)
  pred_transcript = processor.batch_decode(pred_ids)[0]
  return pred_transcript

wav, _ = librosa.load('path/to/your/audio/file', sr = 16000)
print(f"transcript: {transcribe(wav)}")

from transformers import Wav2Vec2Processor, Wav2Vec2ForCTC
from datasets import load_dataset
import torch
import re
from datasets import load_dataset, load_metric, Audio

wer = load_metric("wer")
device = torch.device("cuda" if torch.cuda.is_available() else "cpu")

# load processor and model
processor = Wav2Vec2Processor.from_pretrained("khanhld/wav2vec2-base-vietnamese-160h")
model = Wav2Vec2ForCTC.from_pretrained("khanhld/wav2vec2-base-vietnamese-160h")
model.to(device)
model.eval()

# Load dataset
test_dataset = load_dataset("mozilla-foundation/common_voice_8_0", "vi", split="test", use_auth_token="your_huggingface_auth_token")
test_dataset = test_dataset.cast_column("audio", Audio(sampling_rate=16000))
chars_to_ignore = r'[,?.!\-;:"“%\'�]' # ignore special characters

# preprocess data
def preprocess(batch):
  audio = batch["audio"]
  batch["input_values"] = audio["array"]
  batch["transcript"] = re.sub(chars_to_ignore, '', batch["sentence"]).lower()
  return batch

# run inference
def inference(batch):
  input_values = processor(batch["input_values"],
                            sampling_rate=16000,
                            return_tensors="pt").input_values
  logits = model(input_values.to(device)).logits
  pred_ids = torch.argmax(logits, dim=-1)
  batch["pred_transcript"] = processor.batch_decode(pred_ids)
  return batch

test_dataset = test_dataset.map(preprocess)
result = test_dataset.map(inference, batched=True, batch_size=1)
print("WER: {:2f}".format(100 * wer.compute(predictions=result["pred_transcript"], references=result["transcript"])))

Test Result: 10.78%

Citation

@mics{Duy_Khanh_Finetune_Wav2vec_2_0_2022,
  author = {Duy Khanh, Le},
  doi = {10.5281/zenodo.6542357},
  license = {CC-BY-NC-4.0},
  month = {5},
  title = {{Finetune Wav2vec 2.0 For Vietnamese Speech Recognition}},
  url = {https://github.com/khanld/ASR-Wa2vec-Finetune},
  year = {2022}
}
Duy Khanh, L. (2022). Finetune Wav2vec 2.0 For Vietnamese Speech Recognition [Data set]. https://doi.org/10.5281/zenodo.6542357

Contact

  • khanhld218@gmail.com

From the published model card. Full card on the HuggingFace links in the sidebar.

Benchmarks

Reported results

As published on the model card — the maker's own numbers, not measured by AxForge.

TaskDatasetMetricScore
Speech Recognitioncommon-voice-vietnameseTest WER10.780
Speech RecognitionVIVOSTest WER15.050

Using it via the API

Call it like any OpenAI endpoint

Once AxForge deploys wav2vec2-vietnamese-160h for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (wav2vec2-vietnamese-160h below is illustrative; you get the exact model name on deployment.)

$ curl -sS https://api.axforge.ai/v1/audio/transcriptions \
  -H "Authorization: Bearer $AXFORGE_API_KEY" \
  -F model="wav2vec2-vietnamese-160h" -F file=@audio.mp3

Create an account — your API key is available in the console. 3M free tokens every 30 days with every new account.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms