anaksor-ocr
Sokheng · Kit
Reads Khmer and English text from documents, receipts and photos of signs, using a detector for text lines and a recogniser for each line. Suits developers who…
Transcribes Vietnamese and mixed Vietnamese and English speech, offline or in 0.48 second streaming chunks, with a 359M-parameter model on Google's EmbeddingGemma 2 audio encoder. Licensed for non-commercial use.
VieGem-ASR is a kit in the Developer category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page, a zip of its files. Nothing in it runs by itself.
pip install -U huggingface_hub hf download 5CD-AI/VieGem-ASR
VieGem-ASR is a speech recognition model for Vietnamese and for Vietnamese mixed with English. It is a 359M-parameter streaming CTC model built on the audio encoder of Google's EmbeddingGemma 2. The author says it was inspired by QUAN-Transcribe-1.0. The same model works on whole files and on live audio.
It suits developers and researchers who need fast Vietnamese transcription and can work within a non-commercial license.
| Industry | Who uses it | How they use it | Example |
|---|---|---|---|
| Media | Vietnamese subtitle and transcript teams | Transcribe recorded speech into text | Turn a long interview recording into a draft transcript |
| Software | Developers building voice features | Feed audio in short chunks for live results | Show captions as someone speaks |
| Healthcare technology | Teams handling speech with English terms | Check how mixed-language terms are written | Test Vietnamese speech that includes English medical words |
| Research | Speech researchers | Compare it with other recognizers on the same sets | Score it on the card's Vietnamese test sets |
You can skip it if your work is commercial, or if your audio is in a language other than Vietnamese or English.
| Use case | Who | What they get back |
|---|---|---|
| File transcription | Media teams | The text of a recording of up to 30 seconds per clip |
| Live captions | App developers | Text from streaming audio chunks |
| Language-model decoding | Researchers | A transcript decoded with the included n-gram model |
You need these first:
pip install -U huggingface_hub hf download 5CD-AI/VieGem-ASR
pip install kenlm
You load the checkpoint, read a mono audio file and run the model, then decode the output into text. Set streaming to True for 0.48 second chunks.
import torch, soundfile as sf
from transformers import AutoTokenizer
from asr.model import CTCModel, ModelConfig, greedy_decode # asr/ folder of this repo
from asr.text import Units
ck = torch.load("viegem_asr.pt", map_location="cpu")
cfg = ModelConfig.from_dict(ck["model_config"])
units = Units(ck["gemma_ids"])
tok = AutoTokenizer.from_pretrained(cfg.encoder_id) # google/embeddinggemma-2 (accept its terms)
model = CTCModel(cfg, units.gemma_ids)
model.load_state_dict(ck["model"], strict=False)
model = model.cuda().eval()
wav, sr = sf.read("audio.wav", dtype="float32") # 16 kHz mono, ≤ 30 s
x = torch.from_numpy(wav)[None].cuda()
with torch.no_grad(), torch.autocast("cuda", dtype=torch.bfloat16):
logits, lens = model(x, torch.tensor([x.shape[1]], device="cuda"), streaming=False) # streaming=True: 0.48 s chunks
print(units.decode(tok, greedy_decode(logits, lens)[0]))With the language model installed, you decode the same logits through the LM decoder instead.
from asr.lm_decode import LMDecoder
words = open("lm/viegem_lm.unigrams.txt", encoding="utf-8").read().split()
dec = LMDecoder("lm/viegem_lm.bin", unigrams=words, alpha=0.35, beta=1.5)
pieces = ["", ""] + tok.convert_ids_to_tokens(units.gemma_ids)
lp = torch.log_softmax(logits[0, : lens[0]].float(), -1).cpu().numpy()
print(units.decode(tok, dec.decode(lp, pieces, beam_width=32)))| Tool | What it does |
|---|---|
| CTCModel | Builds the recognizer from the checkpoint settings |
| greedy_decode | Turns the model output into text by taking the best choice at each step |
| LMDecoder | Decodes with the included 4-gram language model and a beam search |
| streaming=True | Processes audio in 0.48 second chunks instead of whole clips |
You save a 16 kHz mono clip of Vietnamese speech with a few English terms as audio.wav, then run the script. It prints the recognized text for that clip.
This model turns spoken Vietnamese into text. A good first try is one short clip of clear speech, run through the script above on a machine with a CUDA GPU. Try the language model after that.
For readers who know the field, the encoder is the EmbeddingGemma 2 audio tower, with 12 conformer layers at 25 frames per second and its top 4 layers fine-tuned. Six transformer blocks with chunked attention sit on top, so one model serves offline and streaming use. A CTC head over 21,031 Gemma tokens produces the text. Training used about 5,800 hours of audio.
Transcribes Vietnamese and mixed Vietnamese and English speech, offline or in 0.48 second streaming chunks, with a 359M-parameter model on Google's EmbeddingGemma 2 audio encoder. Licensed for non-commercial use.
Made by 5CD-AI on Hugging Face. These notes are Mindket's, written from its model page and model card; the model's own files and license are on Hugging Face.
What it is: VieGem-ASR is a speech recognition model for Vietnamese and for Vietnamese mixed with English. It is a 359M-parameter streaming CTC model built on the audio encoder of Google's EmbeddingGemma 2. The author says it was inspired by QUAN-Transcribe-1.0. The same model works on whole files and on live audio.
Who it suits: It suits developers and researchers who need fast Vietnamese transcription and can work within a non-commercial license.
Industry | Who uses it | How they use it | Example
Media | Vietnamese subtitle and transcript teams | Transcribe recorded speech into text | Turn a long interview recording into a draft transcript
Software | Developers building voice features | Feed audio in short chunks for live results | Show captions as someone speaks
Healthcare technology | Teams handling speech with English terms | Check how mixed-language terms are written | Test Vietnamese speech that includes English medical words
Research | Speech researchers | Compare it with other recognizers on the same sets | Score it on the card's Vietnamese test sets
You can skip it if your work is commercial, or if your audio is in a language other than Vietnamese or English.
Where to use it:
Use case | Who | What they get back
File transcription | Media teams | The text of a recording of up to 30 seconds per clip
Live captions | App developers | Text from streaming audio chunks
Language-model decoding | Researchers | A transcript decoded with the included n-gram model
How to set it up: You need these first:
pip install -U huggingface_hub
hf download 5CD-AI/VieGem-ASR
pip install kenlm
How to use it: You load the checkpoint, read a mono audio file and run the model, then decode the output into text. Set streaming to True for 0.48 second chunks.
import torch, soundfile as sf
from transformers import AutoTokenizer
from asr.model import CTCModel, ModelConfig, greedy_decode # asr/ folder of this repo
from asr.text import Units
ck = torch.load("viegem_asr.pt", map_location="cpu")
cfg = ModelConfig.from_dict(ck["model_config"])
units = Units(ck["gemma_ids"])
tok = AutoTokenizer.from_pretrained(cfg.encoder_id) # google/embeddinggemma-2 (accept its terms)
model = CTCModel(cfg, units.gemma_ids)
model.load_state_dict(ck["model"], strict=False)
model = model.cuda().eval()
wav, sr = sf.read("audio.wav", dtype="float32") # 16 kHz mono, ≤ 30 s
x = torch.from_numpy(wav)[None].cuda()
with torch.no_grad(), torch.autocast("cuda", dtype=torch.bfloat16):
logits, lens = model(x, torch.tensor([x.shape[1]], device="cuda"), streaming=False) # streaming=True: 0.48 s chunks
print(units.decode(tok, greedy_decode(logits, lens)[0]))
With the language model installed, you decode the same logits through the LM decoder instead.
from asr.lm_decode import LMDecoder
words = open("lm/viegem_lm.unigrams.txt", encoding="utf-8").read().split()
dec = LMDecoder("lm/viegem_lm.bin", unigrams=words, alpha=0.35, beta=1.5)
pieces = ["", ""] + tok.convert_ids_to_tokens(units.gemma_ids)
lp = torch.log_softmax(logits[0, : lens[0]].float(), -1).cpu().numpy()
print(units.decode(tok, dec.decode(lp, pieces, beam_width=32)))
Tool | What it does
CTCModel | Builds the recognizer from the checkpoint settings
greedy_decode | Turns the model output into text by taking the best choice at each step
LMDecoder | Decodes with the included 4-gram language model and a beam search
streaming=True | Processes audio in 0.48 second chunks instead of whole clips
Example: You save a 16 kHz mono clip of Vietnamese speech with a few English terms as audio.wav, then run the script. It prints the recognized text for that clip.
For newcomers and experts: This model turns spoken Vietnamese into text. A good first try is one short clip of clear speech, run through the script above on a machine with a CUDA GPU. Try the language model after that.
For readers who know the field, the encoder is the EmbeddingGemma 2 audio tower, with 12 conformer layers at 25 frames per second and its top 4 layers fine-tuned. Six transformer blocks with chunked attention sit on top, so one model serves offline and streaming use. A CTC head over 21,031 Gemma tokens produces the text. Training used about 5,800 hours of audio.
Read a 16 kHz mono audio clip
Encode it with the EmbeddingGemma 2 audio tower
Run the reader blocks and the CTC head
Decode greedily or with the 4-gram model
Print the transcript
Good to know:
Title: Mean word error rate over 8 Vietnamese test sets, lower is better
VieGem-ASR + LM: 5.29%
VieGem-ASR: 6.34%
QUAN-Transcribe-1.0: 6.89%
Gemini-Flash-3.8: 6.92%
ElevenLabs Scribe v2: 7.08%
PhoWhisper-large: 7.21%
Qwen3-ASR-0.6B: 9.73%
Whisper large-v3: 18.04%
Download its files with Hugging Face's command line:
pip install -U huggingface_hub
hf download 5CD-AI/VieGem-ASR
Then follow the usage in its model card. Nothing in this kit runs by itself.
README.md 7 KB
Listed Hugging Face models in the same category that share the most tags with this one.
| Product | Downloads, last 30 days | Likes | Parameters | License | Last change |
|---|---|---|---|---|---|
| VieGem-ASR This page | 0 | 12 | — | cc-by-nc-sa-4.0 | |
| FireRedVADShares streaming · automatic-speech-recognition | 2,286 | 80 | — | apache-2.0 | |
| Earlybird by sahilmahendrakarShares streaming · automatic-speech-recognition | 89 | 24 | — | mit | |
| zipformer-asr-turkish-v1Shares streaming · automatic-speech-recognition | 0 | 6 | — | apache-2.0 | |
| Silencio-2Shares streaming · pytorch | 351 | 22 | 27.9M | cc-by-4.0 | |
| ZeroTTSShares vietnamese | 8,091 | 54 | — | mit |
Sokheng · Kit
Reads Khmer and English text from documents, receipts and photos of signs, using a detector for text lines and a recogniser for each line. Suits developers who…
Qwen · Kit
Qwen2.5-7B-Instruct as GGUF files in eight quantization sizes, to chat with locally through llama.cpp. For people who want a capable 7.6B model on their own co…
ACE-Step · Kit
Generates music from text with a 4B diffusion decoder, 50 steps and guidance control, aiming for higher audio quality than the base. For creators with a GPU of…
alirezarezvani · Skill
Adds 411 ready-made skills for Claude Code and other coding agents, grouped by role from engineering and product to marketing, finance and compliance. Installs…
block · Kit
Self-hostable workspace where people and AI agents share the same rooms, built on a Nostr relay that logs every action as a signed event. For teams that want t…
backnotprop · Kit
Opens your AI coding agent's plans, specs and code changes in a browser so you can annotate or comment on them and send the feedback straight back to the agent.