Safetensors
English
t5
ipa
phoneme-to-text
ghana

T5 IPA-to-Text (Ghanaian English) β€” v2

Converts a Ghanaian-English IPA phoneme sequence into the English text it represents. Use it to turn phonetic output β€” from a G2P tool or a phoneme-recognizing ASR model β€” back into ordinary written English.

Usage

from transformers import AutoTokenizer, T5ForConditionalGeneration

tok = AutoTokenizer.from_pretrained("ghananlpcommunity/ghana-english-ipa2text-tokenizer")
model = T5ForConditionalGeneration.from_pretrained("ghananlpcommunity/t5-small-ipa2text-v2")

ipa = "Ι‘ ʊ d m ɔː n Ιͺ Ε‹ , l e d i s Γ¦ n d dΚ’ Ι› n t Ι™ l m Ι› n !"
ids = tok(ipa, return_tensors="pt").input_ids
out = model.generate(ids)
print(tok.decode(out[0], skip_special_tokens=True))
# "Good morning, ladies and gentlemen!"

No task prefix β€” feed the IPA string directly. Use the paired tokenizer (ghananlpcommunity/ghana-english-ipa2text-tokenizer), not stock T5-small's β€” this model's vocabulary was extended with phone tokens it needs.

For a full audio β†’ text pipeline (chaining a phoneme-ASR model in front of this one, with chunking for long audio), see scripts/infer.py in this repo, or the poto-asr library.

Training data

ghananlpcommunity/ghana-gov-speeches-sentences-ipa-robust: Ghana government/parliamentary speech, phonemised with ghana-english-g2p. Training input isn't clean G2P output as-is β€” each batch, most examples are run through one of five random perturbations (vowel-length collapse, weak-vowel deletion, consonant confusion/deletion, phone insertion) that mimic real ASR phoneme-recognizer errors, so the model has seen noisy input, not just perfect phonemes.

Evaluation

Held-out validation, scored with SacreBLEU against the clean reference sentence: 84.94.

Limitations

  • Numbers and dates are the least reliable part of the output β€” many spoken-number phrases are phonetically ambiguous, so rare or unseen numbers can come out wrong.
  • Rare proper nouns (names seen once or twice in training) are less reliable than common vocabulary.
  • Domain: trained entirely on formal government/parliamentary speech. Expect the best accuracy on similar formal register; casual conversation is out of domain.
  • Real (ASR-produced) input can occasionally trigger a repetition loop under decoding; this model's generation_config.json already sets no_repeat_ngram_size=3 and repetition_penalty=1.3 to guard against it β€” don't override those unless you've checked the effect on your inputs.

Model Author

Mich-Seth Owusu

Downloads last month
31
Safetensors
Model size
60.5M params
Tensor type
F32
Β·
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support

Model tree for ghananlpcommunity/t5-small-ipa2text-v2

Finetuned
(2326)
this model

Dataset used to train ghananlpcommunity/t5-small-ipa2text-v2