AfriPunctCap: Pan-African Punctuation & Capitalization Model

A fast, lightweight multilingual model fine-tuned on 314 African languages to restore capitalization (Title Case, ALL CAPS) and punctuation (commas, sentence-ending periods, question marks).

Part of the AfriSpeech open-source speech initiative.

🌍 Language Coverage & Generalizability

  • Directly Trained on 314 African Languages: Spans Niger-Congo, Afroasiatic, Nilo-Saharan, and Khoisan language families from AfriSpeech/afri2universal.
  • Zero-Shot Generalizability to Other African Languages: Because grammatical clause boundaries, breath pauses, appositives, and conjunctions follow shared typological and phonetic patterns across related African language families, the model exhibits robust zero-shot generalizability to hundreds of other African languages and local dialects not explicitly in the training set.

🎙️ Why This Model is Essential for African Text-to-Speech (TTS)

Across African languages, writers conventionally omit commas, despite native speakers making clear, audible pauses in normal speech:

  • Written Orthography Habit: Commas are routinely skipped before conjunctions (like ne in Akan, àti in Yoruba, na in Swahili), complementizers, appositives, and compound titles.
  • The TTS Bottleneck: For Text-to-Speech (TTS) models, punctuation is the single most critical signal for breath pauses and prosodic rhythm. Without commas, TTS engines rush through clauses unnaturally without breathing.
  • Acoustic Grounding: Fine-tuned on speech where pauses (>=350ms) were acoustically aligned with Meta MMS Forced Aligner, this model systematically compensates for commas conventionally ignored in writing, matching natural spoken rhythm.

Highlights

  • Backbone: Davlan/afro-xlmr-mini (12 layers, 384 hidden, 117M params).
  • Fast CPU Inference:
    • INT8 Quantized ONNX: ~15–25 ms per sentence (118 MB model).
    • FP16 GPU / Safetensors: ~225 MB compact half-precision weights.
  • Zero Hallucination Guarantee: Non-autoregressive token classification preserves all input words in their original order.

Model Formats Available

  • model_quantized.onnx (118 MB, INT8 quantized for ultra-fast CPU inference)
  • model_fp16.safetensors (225 MB, compact FP16 weights for GPU)
  • model.safetensors (449 MB)
  • model.onnx (449 MB)
  • pytorch_model.bin (449 MB)
  • Complete SentencePiece tokenizer files

GitHub Repository

Code, data pipelines, and CLI tool: AfriSpeech/afri-punct-cap

Downloads last month
-
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

Space using AfriSpeech/afri-punct-cap 1