Twi (Asante) ASR โ€“ Fixed Grapheme Model

This model is a fine-tuned version of facebook/mms-300m for Automatic Speech Recognition (ASR) on Asante Twi.

The training transcripts were normalized using the twi-grapheme-fixer before training.

Model Description

  • Base model: facebook/mms-300m
  • Task: Automatic Speech Recognition (CTC)
  • Language: Asante Twi (tw)
  • Grapheme normalization: Applied with twi-grapheme-fixer
  • Feature encoder: Frozen during fine-tuning
  • Training type: Full fine-tuning of the Transformer + CTC head

Dataset

  • Source: ghananlpcommunity/ghana-speech
  • Configuration used: Asante_Twi_twi
  • Training samples (after filtering): ~2,432
  • Validation samples (after filtering): ~388
  • Sampling rate: 16 kHz
  • Minimum duration filter: 1.0 second

Training Details

Training Hyperparameters

Hyperparameter Value
Learning rate 1e-4
Batch size 8
Gradient accumulation steps 2
Effective batch size 16
Warmup steps 300
Number of epochs (reported) 10
FP16 Yes
Gradient checkpointing Yes
Feature encoder Frozen
Evaluation strategy epoch
Metric for best model CER

Training Results (Validation Set)

Epoch Training Loss Validation Loss CER WER
1 4.234 4.405 1.000 1.000
2 3.400 3.334 1.000 1.000
3 3.280 3.166 0.986 1.000
4 3.175 3.171 0.987 1.000
5 2.741 2.754 0.907 1.000
6 1.709 1.504 0.442 0.970
7 1.208 1.130 0.296 0.785
8 0.912 0.881 0.215 0.642
9 0.821 0.773 0.210 0.615
10 0.901 0.784 0.206 0.613

Intended Uses & Limitations

This is a research / pilot model. It was trained on a relatively small subset of the Ghana Speech dataset and should not be considered production-ready.

Limitations

  • Trained on only ~2.4k utterances
  • Higher error rate compared to the baseline (original orthography) model trained under the same conditions
  • No language model fusion was applied
  • Performance may degrade on noisy or out-of-domain audio

How to Use

from transformers import Wav2Vec2Processor, Wav2Vec2ForCTC
import torch
import torchaudio

model_id = "saanimustaf/twi-asr-fixed-grapheme-mms300m"

processor = Wav2Vec2Processor.from_pretrained(model_id)
model = Wav2Vec2ForCTC.from_pretrained(model_id)

# Load and resample audio to 16 kHz
speech, sr = torchaudio.load("path/to/audio.wav")
if sr != 16000:
    speech = torchaudio.functional.resample(speech, sr, 16000)

inputs = processor(speech.squeeze().numpy(), sampling_rate=16000, return_tensors="pt", padding=True)

with torch.no_grad():
    logits = model(**inputs).logits

predicted_ids = torch.argmax(logits, dim=-1)
transcription = processor.batch_decode(predicted_ids)[0]

print(transcription)
Downloads last month
55
Safetensors
Model size
0.3B params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Dataset used to train saanimustaf/twi-asr-fixed-grapheme-mms300m

Evaluation results