Scicom's Tiny Malaysian STT, Running Locally in Voxtype
I have been using Voxtype for dictation since I wrote about fixing Malaysian English dictation in Omarchy. The setup has been Mesolitica’s Malaysian Whisper small v2, converted to GGML, running through whisper.cpp. It works, but “small” is doing a lot of work in that sentence. The model is friendly to Malay, leans Indonesian on some words, and needs about two seconds to transcribe a short clip on my Ryzen 7 5800U laptop.
Then Scicom (MSC) released Tiny Malaysian STT on Hugging Face. A Malaysian speech model, Apache-2.0, trained on local Malay, English, Mandarin, Tamil and the code-switching in between. The headline numbers are almost rude: a 54 MB model that runs at 21x real time on a single CPU thread and beats Whisper large-v3 on their Malaysian benchmark.
I had to try it. This is how I got it running fully local inside Voxtype, without swapping binaries or giving up the Whisper model I already had.
# What Scicom actually shipped
The release is one Zipformer encoder with two different heads, both shipped as 8-bit ONNX and meant to run through sherpa-onnx.
| Transducer | CTC | |
|---|---|---|
| Parameters | 41.7M | 36.8M |
| Model size (int8 ONNX) | 54.4 MB | 46.6 MB |
| Speed, one CPU thread | 21x real time | 28x real time |
| Malaysian benchmark WER | 9.6 | 13.9 |
| What it adds | Prediction network and joiner (a small built-in language model) | Frame-wise head with a blank token |
| Best for | Accuracy | Speed and size |
Both variants share the same Zipformer encoder; only the head changes.
“Transducer” is a speech model with a small language model built in. It has an encoder that listens, a prediction network that anticipates the next token, and a joiner that combines both. CTC skips the prediction network: it maps audio frames straight to characters, using a blank token for gaps. That makes CTC smaller and faster, but less accurate. Scicom measured a 4.3-point WER gap between the two heads on the same encoder, which matches what I saw.
The models ship as ONNX, run through sherpa-onnx, and include streaming variants at 160, 320 and 640 ms chunks. There is no GGML or Whisper version, and no .bin file to point Voxtype at.
# Why I could not just drop it in
Voxtype 1.1.1 supports Whisper, Parakeet, Moonshine, SenseVoice, Paraformer, Dolphin, Omnilingual, Cohere, OpenVINO and Soniox. None of those engines loads a Zipformer transducer in the format Scicom publishes.
Converting the model to Whisper is not a file-format problem; it is an architecture problem. Whisper is an encoder-decoder Transformer with its own mel frontend, a 151k-token vocabulary and timestamp tokens. The Scicom model is a Zipformer with a CTC or transducer head and a 6,877-token vocabulary. You cannot map those weights onto each other by renaming tensors.
| Option | What it involves | Verdict |
|---|---|---|
| Convert the weights to Whisper | A different architecture, frontend, vocabulary and decoder. There is no weight mapping. | Not a conversion. Only retraining or distillation. |
| Patch a Voxtype ONNX engine | The Dolphin CTC engine is closest: rename log_probs to lob_probs, add CMVN metadata, match input names. |
Fragile. Depends on undocumented engine internals. |
| Run it as a local server | A small FastAPI service exposing an OpenAI-compatible endpoint; Voxtype's remote mode sends audio to 127.0.0.1. |
Chosen |
I picked the third option. Voxtype’s whisper.mode = "remote" sends audio to any OpenAI-compatible transcription endpoint. The endpoint can be 127.0.0.1, which means nothing leaves the laptop, no API key is involved, and the existing Vulkan/Whisper binary keeps working. The only new piece is a small FastAPI service.
The trade-off is honest: this is not a native engine. You are running a second process, and dictation depends on it being alive. In exchange, you get the most accurate Scicom variant without touching Voxtype’s internals.
# The setup
This is the exact setup running on my machine: Omarchy (Arch + Hyprland), Voxtype 1.1.1, Python 3.12, a Ryzen 7 5800U with 40 GB of RAM. Steps are the same on any Linux distro with systemd and Python 3.12.
# 1. Download the model
The transducer lives in the repository root. The CTC variant is a separate repository.
mkdir -p ~/.local/share/scicom-stt/models/tiny-ms-transducer
cd ~/.local/share/scicom-stt/models/tiny-ms-transducer
for f in encoder.int8.onnx decoder.int8.onnx joiner.int8.onnx tokens.txt; do
curl -L -O "https://huggingface.co/Scicom-intl/Tiny-Malaysian-STT-Transducer/resolve/main/$f"
done
Total download is about 54 MB. If you also want the CTC model for comparison, download model.int8.onnx and tokens.txt from Scicom-intl/Tiny-Malaysian-STT-CTC into models/tiny-ms-ctc/.
# 2. Create the Python environment
I use uv, but a plain python -m venv works too.
cd ~/.local/share/scicom-stt
uv venv venv --python 3.12
uv pip install --python venv/bin/python \
sherpa-onnx fastapi uvicorn soundfile numpy python-multipart
sherpa-onnx bundles its own ONNX Runtime. There is no separate onnxruntime install, no CUDA, and no Vulkan involved. Inference runs on the CPU.
# 3. The server
Save this as ~/.local/share/scicom-stt/app.py. It exposes POST /v1/audio/transcriptions and GET /health, loads models lazily, and supports both the transducer and CTC layouts.
#!/usr/bin/env python3
"""OpenAI-compatible ASR server backed by Scicom Tiny Malaysian STT."""
from __future__ import annotations
import io
import logging
import os
import threading
from pathlib import Path
import numpy as np
import soundfile as sf
from fastapi import FastAPI, Request
from fastapi.responses import JSONResponse, PlainTextResponse
import sherpa_onnx
BASE = Path(__file__).resolve().parent
MODELS_DIR = BASE / "models"
logging.basicConfig(level=logging.INFO, format="%(asctime)s %(levelname)s %(message)s")
log = logging.getLogger("scicom-stt")
app = FastAPI(title="Scicom Tiny Malaysian STT", version="1.0")
_MODELS: dict[str, sherpa_onnx.OfflineRecognizer] = {}
_LOCK = threading.Lock()
ALIASES = {
"tiny-ms-transducer": "tiny-ms-transducer",
"transducer": "tiny-ms-transducer",
"tiny-ms-ctc": "tiny-ms-ctc",
"ctc": "tiny-ms-ctc",
}
def load_model(name: str) -> sherpa_onnx.OfflineRecognizer:
name = ALIASES.get(name, name)
with _LOCK:
if name in _MODELS:
return _MODELS[name]
d = MODELS_DIR / name
tokens = d / "tokens.txt"
if not d.is_dir() or not tokens.is_file():
raise FileNotFoundError(f"model not found: {d}")
if (d / "joiner.int8.onnx").is_file():
rec = sherpa_onnx.OfflineRecognizer.from_transducer(
encoder=str(d / "encoder.int8.onnx"),
decoder=str(d / "decoder.int8.onnx"),
joiner=str(d / "joiner.int8.onnx"),
tokens=str(tokens),
num_threads=2,
sample_rate=16000,
feature_dim=80,
decoding_method="greedy_search",
)
else:
rec = sherpa_onnx.OfflineRecognizer.from_zipformer_ctc(
model=str(d / "model.int8.onnx"),
tokens=str(tokens),
num_threads=2,
sample_rate=16000,
feature_dim=80,
)
_MODELS[name] = rec
log.info("model %s loaded", name)
return rec
def resample(samples: np.ndarray, sr_in: int, sr_out: int = 16000) -> np.ndarray:
if sr_in == sr_out or samples.size == 0:
return samples
n_out = int(round(samples.size * sr_out / sr_in))
old = np.linspace(0.0, 1.0, samples.size, endpoint=False)
new = np.linspace(0.0, 1.0, n_out, endpoint=False)
return np.interp(new, old, samples).astype(np.float32)
@app.get("/health")
def health():
return {"status": "ok", "models": sorted(ALIASES), "loaded": sorted(_MODELS)}
@app.post("/v1/audio/transcriptions")
async def transcriptions(request: Request):
form = await request.form()
response_format = (form.get("response_format") or "json").lower()
if response_format == "verbose_json":
return JSONResponse(status_code=400, content={"error": "verbose_json not supported"})
model_name = str(form.get("model") or "tiny-ms-transducer")
upload = form.get("file")
if upload is None or not hasattr(upload, "read"):
return JSONResponse(status_code=400, content={"error": "missing file"})
audio = await upload.read()
try:
samples, rate = sf.read(io.BytesIO(audio), dtype="float32", always_2d=True)
except Exception as exc:
return JSONResponse(status_code=400, content={"error": f"cannot decode audio: {exc}"})
mono = resample(samples[:, 0], rate)
try:
rec = load_model(model_name)
except FileNotFoundError as exc:
return JSONResponse(status_code=404, content={"error": str(exc)})
stream = rec.create_stream()
stream.accept_waveform(16000, mono)
rec.decode_stream(stream)
text = (stream.result.text or "").strip()
if response_format == "text":
return PlainTextResponse(text)
return {"text": text}
The verbose_json rejection is deliberate. Voxtype’s meeting mode probes for it, and a clean 400 response makes it fall back to plain JSON instead of guessing.
# 4. Run it as a user service
Create ~/.config/systemd/user/scicom-stt.service:
[Unit]
Description=Scicom Tiny Malaysian STT - OpenAI-compatible ASR server
After=network.target
[Service]
Type=simple
WorkingDirectory=%h/.local/share/scicom-stt
ExecStart=%h/.local/share/scicom-stt/venv/bin/uvicorn app:app --host 127.0.0.1 --port 8300
Restart=on-failure
RestartSec=2
Environment=PYTHONUNBUFFERED=1
[Install]
WantedBy=default.target
Then enable and start it:
systemctl --user daemon-reload
systemctl --user enable --now scicom-stt.service
curl -s http://127.0.0.1:8300/health
# 5. Point Voxtype at it
Open ~/.config/voxtype/config.toml and add four keys. Keep your existing model line: it is still used when you switch back to local mode.
[whisper]
mode = "remote"
remote_endpoint = "http://127.0.0.1:8300"
remote_model = "tiny-ms-transducer"
remote_timeout_secs = 60
# the local model stays installed and is used when mode = "local"
model = "/home/YOUR_USER/.local/share/voxtype/models/ggml-malaysian-whisper-small-v2.bin"
language = ["en", "ms"]
Restart the daemon:
systemctl --user restart voxtype.service
voxtype transcribe ~/some-malay-clip.wav
The first request after a restart takes about a second while the model loads. After that, requests are fast.
You can skip the config file entirely and use the CLI:
voxtype config set whisper.mode remote
voxtype config set whisper.remote_endpoint http://127.0.0.1:8300
voxtype config set whisper.remote_model tiny-ms-transducer
systemctl --user restart voxtype.service
# Switching between the two models
The old Whisper model stays installed, so switching is one key. I keep a small script at ~/.local/bin/voxtype-stt-mode:
#!/usr/bin/env bash
set -euo pipefail
case "${1:-}" in
local) voxtype config set whisper.mode local >/dev/null ;;
scicom) voxtype config set whisper.mode remote >/dev/null ;;
*) echo "usage: $0 local|scicom"; exit 2 ;;
esac
systemctl --user restart voxtype.service
Now voxtype-stt-mode scicom and voxtype-stt-mode local are the whole interface. I also added a toggle to my Voxtype settings UI so I can switch from the GUI and see the real active model instead of the dormant .bin path.
# What it sounds like
I recorded three Malay clips with edge-tts so every model heard exactly the same audio: a formal sentence, a Malay/English mix, and something colloquial. This is a smoke test, not a benchmark.
| Clip | Malaysian Whisper small v2 | Scicom Transducer | Scicom CTC |
|---|---|---|---|
| Formal Malay | Perfect | Perfect | "Basa Malaysia" |
| Mixed BM/EN | "semit ripu" | "submit report" | "reportut" |
| Colloquial | "pukul 8 ... kat kedai" | "pukul lapan ... kad kedai" | "...depan of" |
Green marks the phrase the speaker actually said; red marks a misheard version. Bold words are the ones that differ between models.
The mixed clip is the clearest difference. Whisper small heard English loanwords as Malay syllables and produced “semit ripu” where the speaker said “submit report”. The transducer kept the English phrase and still punctuated the sentence. The CTC model sat in between on the easy clip and fell apart on the harder ones, which is what a 13.9 WER versus 9.6 predicts.
Both models have small spelling quirks on very colloquial speech. Whisper wrote “kat” correctly once; Scicom wrote “kad”. Neither is perfect, and that is fine.
# Speed, size and memory
These numbers are from the same laptop, same clips, CPU only.
| Malaysian Whisper small v2 | Scicom Transducer | Scicom CTC | |
|---|---|---|---|
| Model file | 465 MB (GGML) | 54 MB (ONNX int8) | 47 MB (ONNX int8) |
| Published benchmark WER | 13.6 | 9.6 | 13.9 |
| Runtime | whisper.cpp | sherpa-onnx (CPU) | sherpa-onnx (CPU) |
| 8.3 s clip | ~2.1 s | ~0.17 s | ~0.1 s |
| Memory while loaded | ~500 MB (daemon) | 210 MB (service) | 210 MB (service) |
Memory is resident memory with one model loaded; the Scicom service grows to about 455 MB when both variants are cached. Timings are wall-clock for a warm request, including WAV decoding and JSON handling.
The transducer is roughly ten times faster and a third of the memory, and it is more accurate on Malaysian speech. The CTC variant is faster again, but the accuracy drop is visible on real sentences, so I would only choose it for constrained hardware.
# Honest limits
- It is a second service. If
scicom-sttis stopped, remote dictation fails. The settings UI now shows the service state, and the systemd unit restarts on failure. - No language detection. The model does not tell you which language it heard, and Voxtype’s remote mode cannot pass a language array. In practice the model handles Malay/English code-switching by itself.
- Short clips. Scicom recommends clips up to about 30 seconds. Voxtype already caps recordings at 60 seconds. For long meetings, cut audio into turns with VAD.
- Teacher bias. Most of Scicom’s training transcripts were produced by a fine-tuned Whisper large-v3, so the model inherits some of that model’s mistakes.
- English is not its strongest language. Whisper large-v3 still wins on FLEURS English. For Malaysian dictation, which is the point here, the trade is worth it.
# If you want it native
The clean native path would be teaching one of Voxtype’s ONNX CTC engines to load Scicom models. I looked into it: the Dolphin engine expects a model.int8.onnx with a lob_probs output and CMVN statistics in ONNX metadata. Scicom ships log_probs, plural input names and no CMVN metadata at all. It is a small patch on paper and a moving target in practice, because it depends on engine internals that can change between Voxtype releases.
The server approach has one more advantage: it is engine-agnostic. The same endpoint can later serve the CTC model, a streaming variant, or a completely different model. Voxtype only needs a URL.
# Closing
For the first time, dictation in Malay feels like it is not fighting me. The words come out at the speed I speak them, English loanwords stay English, and the whole thing fits in 54 MB on a laptop CPU. The fact that it comes from a Malaysian team, trained on how we actually talk, is the part I keep coming back to.
If you want to try it, the server above is the whole installation. If you would rather wait for a native engine, that is reasonable too: this setup trades a little operational complexity for a lot of accuracy, and the trade has been worth it for me.