mbfa-other-alphabetic (p4mbfa · other_alphabetic)

A context-free CNN phoneme encoder and forced aligner (p4mbfa, the successor of CUPE / p3cupe), for the other_alphabetic language group of standard_g2p. Each 5 ms frame is classified from at most 120 ms of audio (38.9 ms receptive field), so the model cannot learn any language's phonotactics. Phone boundaries come from a segmental Viterbi decoder over the known phone sequence, refined to sub-frame precision at the crossing of neighbouring posteriors.

head labels size
ph local tokens of other_alphabetic (incl. <blank> SIL noise <unk>) 104
phg gold phoneme groups, shared by every language group 15
tone tone values, shared by every language group; present but untrained (no language in this group has a tone layer) 22

Languages (the FLEURS languages it was trained on): am, el, hy, ka, ko. standard_g2p maps every member of the group onto the same tokens, so other members may align too, untested.

Training

Data: FLEURS other_alphabetic, all 39.8 h, training noise_level 0.02.
Checkpoint: experiment mo01b, epoch 3, selected on FLEURS val_loss (best of 20 epochs; final epoch 2.841).
Trunk and phg_head from latin ma02a (final epoch), ph_head and tone_head trained fresh in mo01a (onset bonus 30), then continued in mo01b with boundary_bonus_weight 0, which this model's config.json keeps as its default decoder.

metric value
val_loss 2.6278
val_frame_acc 0.4589
val_frame_acc_groups 0.6319

val_* are on held-out FLEURS clips but are scored against the model's own alignments (there are no boundary labels outside English), so they measure self-consistency, not boundary accuracy.

Labels are standard_g2p dictionary pronunciations (gold inventory 9438371ed6dd), not phonetic transcriptions of what was said.

Usage

The code is in https://github.com/tabahi/bfa_models (p4mbfa/); clone it and run from its root.

from p4mbfa.inference import MbfaAligner

aligner = MbfaAligner.from_pretrained("Tabahi/mbfa-other-alphabetic")
wav = aligner.load_audio("clip.wav")                     # mono, 16000 Hz
phones = ["SIL", "h", "ɛ", "l", "o", "SIL"]   # this group's tokens (config.json labels.tokens)
for seg in aligner.align(wav, phones):
    print(seg["token"], seg["start_ms"], seg["end_ms"])

aligner.encode(wav) returns the per-frame log posteriors of all three heads. Text -> tokens is standard_g2p's job (goldG2P.phonemize_sentence then lang_group_inventory.to_local); config.json lists the token strings. from_pretrained downloads only config.json and model.safetensors.

Fine-tuning

ckpt/other_alphabetic_fleurs40h_mo01b_e3_val_loss=2.628.ckpt is the training checkpoint (PyTorch Lightning, weights only, a pickle: load it only if you trust this repo). Download it, then point a p4mbfa yaml at it to continue training, or to train a new language group on its trunk and shared phg head:

hf download Tabahi/mbfa-other-alphabetic "ckpt/other_alphabetic_fleurs40h_mo01b_e3_val_loss=2.628.ckpt" --local-dir tmp/hf/mbfa-other-alphabetic
ckpt_path: "tmp/hf/mbfa-other-alphabetic/ckpt/other_alphabetic_fleurs40h_mo01b_e3_val_loss=2.628.ckpt"
reset_fine_heads: true      # new lang_group: rebuild ph_head / tone_head; false = same group

License: AGPL-3.0.

Downloads last month
14
Safetensors
Model size
14.8M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Dataset used to train Tabahi/mbfa-other-alphabetic