Downloads · 30 days
0
jboat/jacaranda-asr-whispercpp
jacaranda-asr-whispercpp is a automatic speech recognition model from jboat. Use it when you need speech turned into text. It is set up for transformers. The card lists the license as cc-by-sa-4.0.
This model is a fine-tuned version of openai/whisper-medium specifically optimized for Swahili and English speech recognition. The model has been trained on Common Voice 17.0 dataset and achieves significant improveme…
Downloads · 30 days
0
Access
Public
Updated Oct 30, 2025
Repo size
444 MB
Likes
0
Public
Click a slice to open those files.
.bin444 MB · 100%
From the Hugging Face model README
This model is a fine-tuned version of openai/whisper-medium specifically optimized for Swahili and English speech recognition. The model has been trained on Common Voice 17.0 dataset and achieves significant improvements in word error rate (WER) compared to the base model.
The model achieves the following results on the evaluation set:
First, install the required dependencies:
pip install transformers torch librosa
from transformers import AutoModelForSpeechSeq2Seq, AutoProcessor
import torch
import librosa
# Load the model and processor
processor = AutoProcessor.from_pretrained("Jacaranda-Health/ASR-STT")
model = AutoModelForSpeechSeq2Seq.from_pretrained("Jacaranda-Health/ASR-STT")
model.generation_config.forced_decoder_ids = None
def transcribe(filepath):
"""
Transcribe audio file to text
Args:
filepath (str): Path to audio file
Returns:
str: Transcribed text
"""
# Load audio file
audio, sr = librosa.load(filepath, sr=16000)
# Process audio
inputs = processor(audio, sampling_rate=sr, return_tensors="pt")
# Generate transcription
with torch.no_grad():
generated_ids = model.generate(inputs["input_features"])
# Decode the transcription
transcription = processor.batch_decode(generated_ids, skip_special_tokens=True)[0]
return transcription
# Example usage
transcription = transcribe("path/to/your/audio.wav")
print(f"Transcription: {transcription}")
def transcribe_batch(audio_files):
"""
Transcribe multiple audio files
Args:
audio_files (list): List of audio file paths
Returns:
list: List of transcriptions
"""
transcriptions = []
for filepath in audio_files:
try:
transcription = transcribe(filepath)
transcriptions.append({
'file': filepath,
'transcription': transcription
})
except Exception as e:
transcriptions.append({
'file': filepath,
'error': str(e)
})
return transcriptions
# Example usage
audio_files = ["audio1.wav", "audio2.wav", "audio3.wav"]
results = transcribe_batch(audio_files)
The fine-tuned model shows dramatic improvements over the base Whisper model, particularly in Swahili language accuracy. Here are some comparison examples showing how the base model completely failed while our fine-tuned model nailed it:
Ground Truth: "Panya wengi huishi kati ya wanadamu."
Base Model: "本来我以为是个铁网来的" (Chinese characters!)
Fine-tuned Model: "Wanyawengi huishi kati ya wanadamu." ✓ <br><br>
Ground Truth: "Mji ulianzishwa kwenye kisiwa kilichopo karibu sana na bara."
Base Model: "Nguni unia nzisho kwenye kisiwa kilichopo kariwu sana nabara"
Fine-tuned Model: "Mji ulianzishwa kwenye kisiwa kilichopo karibu sana na bara." ✓ <br><br>
Ground Truth: "Nchi ya maajabu."
Base Model: "Um dia mais, diabo!" (Portuguese/Spanish)
Fine-tuned Model: "Nchi ya maajabu." ✓
The fine-tuned model demonstrates superior performance in:
The following charts illustrate the model's training progress and performance improvements:

The WER chart shows the steady improvement in transcription accuracy throughout the training process. Starting from approximately 21.6% WER at step 500, the model achieves its best performance of 14.7% WER by step 8000, demonstrating consistent learning and convergence.

The learning rate follows a cosine annealing schedule, starting at 1e-05 and gradually decreasing over the 8000 training steps. This schedule helps ensure stable training and prevents overfitting while allowing the model to fine-tune effectively.
The model was fine-tuned using the following approach:
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | WER Ortho | WER |
|---|---|---|---|---|---|
| 0.4135 | 0.6180 | 500 | 0.4069 | 29.9115 | 21.6319 |
| 0.2036 | 1.2361 | 1000 | 0.3584 | 25.8738 | 18.3552 |
| 0.1899 | 1.8541 | 1500 | 0.3390 | 24.0940 | 16.4814 |
| 0.0978 | 2.4722 | 2000 | 0.3406 | 24.1957 | 16.8982 |
| 0.0584 | 3.0902 | 2500 | 0.3589 | 22.7718 | 15.9189 |
| 0.0457 | 3.7083 | 3000 | 0.3660 | 23.3075 | 15.8580 |
| 0.0203 | 4.3263 | 3500 | 0.3762 | 22.9108 | 15.7394 |
| 0.0193 | 4.9444 | 4000 | 0.3683 | 22.0192 | 15.2616 |
| 0.0073 | 5.5624 | 4500 | 0.3926 | 22.5447 | 15.5801 |
| 0.0022 | 6.1805 | 5000 | 0.4065 | 21.5649 | 14.9092 |
| 0.0022 | 6.7985 | 5500 | 0.4080 | 21.2835 | 14.6313 |
| 0.0009 | 7.4166 | 6000 | 0.4180 | 21.2564 | 14.6415 |
| 0.0007 | 8.0346 | 6500 | 0.4244 | 21.2361 | 14.6551 |
| 0.0006 | 8.6527 | 7000 | 0.4283 | 21.3276 | 14.6957 |
| 0.0006 | 9.2707 | 7500 | 0.4297 | 21.3378 | 14.7059 |
| 0.0006 | 9.8888 | 8000 | 0.4300 | 21.3276 | 14.7093 |
The use of this Speech-to-Text (ASR) model is intended for research, social good, and internal use purposes only. For commercial use and distribution, organizations/individuals are encouraged to contact Jacaranda Health. To ensure the ethical and responsible use of this ASR model, we have outlined a set of guidelines. These guidelines categorize activities and practices into three main areas: prohibited actions, high-risk activities, and deceptive practices. By understanding and adhering to these directives, users can contribute to a safer and more trustworthy environment.
This Speech-to-Text model represents cutting-edge technology with significant potential, yet it is not without inherent risks and limitations. The extensive testing conducted has been predominantly focused on Swahili and English languages, leaving an expansive terrain of linguistic variations and acoustic scenarios unexplored.
Language and Dialect Variations: The model's performance may vary significantly across different Swahili dialects, regional accents, and code-switching patterns not represented in the training data.
Audio Quality Sensitivity: Performance degrades with poor audio quality, background noise, multiple speakers, or non-standard recording conditions.
Domain Specificity: The model may struggle with highly technical terminology, proper names, or domain-specific vocabulary outside its training scope.
Contextual Understanding: While improved over the base model, contextual interpretation limitations may lead to incorrect transcriptions in ambiguous scenarios.
Bias Considerations: Like other AI models, this ASR system may exhibit biases present in the training data, potentially affecting transcription quality for underrepresented speaker groups or topics.
Consequently, like other ASR systems, this model's output predictability remains variable, and there's potential for it to occasionally generate transcriptions that are inaccurate, culturally insensitive, or otherwise problematic when processing certain audio inputs.
Prior to deploying this ASR model in any production applications, developers must embark on thorough safety testing and meticulous evaluation customized to the unique demands of their specific use cases. This includes testing across diverse speaker demographics, audio conditions, and content types relevant to the intended application.
For any questions, feedback, or commercial inquiries, please reach out at ai@jacarandahealth.org
If you use this model in your research, please cite:
@misc{jacaranda_asr_stt_2025,
title={Swahili-English Speech-to-Text Model},
author={Jacaranda Health},
year={2025},
howpublished={\url{https://huggingface.co/Jacaranda-Health/ASR-STT}}
}