DariusTheGeek/waxal-joint-ctc-1b-lid
waxal-joint-ctc-1b-lid
Joint Lingala + Shona OmniASR CTC-1B, fine-tuned without any language tag, paired with the text language-identification classifier used to route its output.
This is the entry point of the WAXAL ASR solution. It exists so the pipeline can determine each clip's language from the audio: a tag-free decode of every clip, then a character n-gram classification of the decoded text.
What is in this repository
How routing works
model.ptdecodes every clip once, with no language conditioning — the model has one recognizer, one shared encoder, one shared CTC head, and no language tag, prompt, ID, or embedding input.text_lid_train_only.joblibclassifies the resulting transcript as Lingala or Shona.- Each clip is routed to its language-specific decoder stack.
The classifier is fitted only on gold training transcripts (32,328 rows), never on model output and never on test data. At inference it is applied to hypothesis strings.
On the 892-clip evaluation set it assigns 447 clips to Lingala and 445 to Shona.
Model contract
recognizers: 1 shared_encoder: true shared_tokenizer: true
shared_ctc_head: true language_tag: false language_prompt: false
language_id: false language_embedding: false
metadata_input: false model_level_routing: falseTraining
Character and word error on the held-out validation split:
Standalone it is weaker than the language-specific models it routes to; its value is that one object serves both languages, so a single decode of the full test set yields the routing decision.
Usage
from huggingface_hub import snapshot_download
import joblib, sklearn
d = snapshot_download("DariusTheGeek/waxal-joint-ctc-1b-lid")
assert sklearn.__version__ == "1.5.2" # the classifier was fitted under this version
lid = joblib.load(f"{d}/text_lid_train_only.joblib")
lid.predict(["mbote na yo", "mhoro sei"]) # -> ['lin', 'sna']For the ASR half, point fairseq2 at card.yaml after substituting @WAXAL_MODEL_DIR@, or use the solution repository's CLI, which wraps the whole contract (pinned environment, batch-size-1 decode, tokenizer wiring):
git clone https://github.com/DariusTheGeek/waxal-asr-solution
cd waxal-asr-solution && bash install.sh
python models/download_models.py --repo waxal-joint-ctc-1b-lid
.venvs/omni/bin/python inference/decode/omniasr.py \
--config configs/joint/joint.yaml \
--audio path/to/wav_dir --output hypotheses.csv
.venvs/fuse/bin/python inference/route/route.py \
--hypotheses hypotheses.csv \
--model artifacts/text_lid_train_only.joblib --output route.csvrequirements.txt in this repo pins the inference runtime.
Licence
apache-2.0, inherited from the OmniASR parent.
