mms-1b-all-shn-v1

facebook/mms-1b-all fine-tuned for Shan (shn) speech recognition (CTC, character vocabulary, target_lang="shn").

  • Training mode: top_layers (top 12 of 48 layers), 30 epochs, best checkpoint by CER
  • Data: NorHsangPha/Shan-ASR-Nova, shan-tts-dataset (Kaggle)
  • License follows the base model (CC-BY-NC 4.0)
metric value
eval CER (greedy) 3.63%
eval WER (greedy) 55.00%
CER greedy (held-out half) 15.81%
CER + 3-gram KenLM (held-out half, alpha=0.3, beta=0.0) 34.80%

WER is high because Shan word spacing is inconsistent - CER is the meaningful number.

Usage

import torch, librosa
from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor

proc = Wav2Vec2Processor.from_pretrained("k1ngtai/mms-1b-all-shn-v1")
proc.tokenizer.set_target_lang("shn")
model = Wav2Vec2ForCTC.from_pretrained("k1ngtai/mms-1b-all-shn-v1", target_lang="shn", ignore_mismatched_sizes=True).eval()

audio, _ = librosa.load("clip.wav", sr=16000)
inputs = proc(audio, sampling_rate=16000, return_tensors="pt")
with torch.no_grad():
    logits = model(**inputs).logits
print(proc.decode(logits.argmax(-1)[0]))

With the Shan language model (better accuracy)

# pip install pyctcdecode https://github.com/kpu/kenlm/archive/master.zip
from transformers import Wav2Vec2ProcessorWithLM
proc_lm = Wav2Vec2ProcessorWithLM.from_pretrained("k1ngtai/mms-1b-all-shn-v1")
print(proc_lm.batch_decode(logits.numpy()).text[0])
Downloads last month
14
Safetensors
Model size
1.0B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for k1ngtai/mms-1b-all-shn-v1

Finetuned
(461)
this model