This model is a fine-tuned version of
Google's MedASR optimized for
Ghanaian-accented English speech recognition, particularly suited for clinical and medical transcription in Ghana.
MedASR-Ghana is designed to transcribe English speech from speakers with Ghanaian accents, including Twi, Akan, and Fante language backgrounds. It builds on Google's MedASR foundation (a 105M parameter Conformer-based CTC model) and adapts it specifically for West African English pronunciation patterns.
Fine-tuned on the
AfriSpeech-200 dataset, using all Ghanaian accent configurations:
1from transformers import AutoProcessor, AutoModelForCTC
2import torch
3import librosa
4
5# Load model and processor
6model_id = "samwell/medasr-ghana"
7processor = AutoProcessor.from_pretrained(model_id)
8model = AutoModelForCTC.from_pretrained(model_id)
9
10# Load and preprocess audio
11audio, sr = librosa.load("your_audio.wav", sr=16000)
12inputs = processor(audio, sampling_rate=16000, return_tensors="pt")
13
14# Transcribe
15with torch.no_grad():
16 logits = model(**inputs).logits
17 predicted_ids = torch.argmax(logits, dim=-1)
18 transcription = processor.batch_decode(predicted_ids)[0]
19
20print(transcription)
1from transformers import pipeline
2
3transcriber = pipeline(
4 "automatic-speech-recognition",
5 model="samwell/medasr-ghana"
6)
7
8result = transcriber("your_audio.wav")
9print(result["text"])
1TrainingArguments(
2 learning_rate=3e-5,
3 per_device_train_batch_size=8,
4 gradient_accumulation_steps=4,
5 num_train_epochs=120,
6 warmup_steps=300,
7 bf16=True,
8 group_by_length=True,
9 eval_strategy="epoch",
10 save_strategy="epoch",
11 load_best_model_at_end=True,
12 metric_for_best_model="wer",
13)
1@misc{medasr-ghana,
2 title={MedASR-Ghana: Medical ASR for Ghanaian-Accented English},
3 author={samwell},
4 year={2026},
5 publisher={Hugging Face},
6 url={https://huggingface.co/samwell/medasr-ghana}
7}
1@article{afrispeech2023,
2 title={AfriSpeech-200: Pan-African Accented Speech Dataset for Clinical and General Domain ASR},
3 author={Olatunji, Tobi and others},
4 journal={arXiv preprint arXiv:2310.00274},
5 year={2023}
6}
7
8@article{medasr2024,
9 title={MedASR: Medical Automatic Speech Recognition},
10 author={Google Health AI},
11 year={2024}
12}
For questions or feedback, please open an issue on the
model repository.