Instructions to use Or4kool/wolof_asr with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Or4kool/wolof_asr with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="Or4kool/wolof_asr")# Load model directly from transformers import AutoProcessor, AutoModelForCTC processor = AutoProcessor.from_pretrained("Or4kool/wolof_asr") model = AutoModelForCTC.from_pretrained("Or4kool/wolof_asr") - Notebooks
- Google Colab
- Kaggle
Wolof ASR (wav2vec2 CTC)
Fine-tuned wav2vec2 CTC model for transcribing Wolof speech to text.
Model details
- Architecture: wav2vec2 CTC (
AutoModelForCTC) - Task: Automatic speech recognition (ASR)
- Language: Wolof (
wo) - Sample rate: 16 kHz mono
- Output: Plain text transcription
Expected input format
| Field | Requirement |
|---|---|
| Audio format | WAV, FLAC, OGG, MP3, M4A (decoded server-side) |
| Channels | Mono preferred (stereo is averaged to mono) |
| Sample rate | Any (resampled to 16 kHz automatically) |
| Duration | Up to 60 seconds per request |
| Encoding | Raw bytes, base64, multipart upload, or HTTPS URL |
Quick start
from transformers import AutoModelForCTC, AutoProcessor
import librosa
model_id = "Or4kool/wolof_asr"
processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForCTC.from_pretrained(model_id)
model.eval()
audio, sr = librosa.load("sample.wav", sr=16000, mono=True)
inputs = processor(audio, sampling_rate=16000, return_tensors="pt")
with torch.no_grad():
logits = model(inputs.input_values).logits
predicted_ids = torch.argmax(logits, dim=-1)
text = processor.batch_decode(predicted_ids)[0]
print(text)
Pipeline usage
from transformers import pipeline
asr = pipeline(
"automatic-speech-recognition",
model="Or4kool/wolof_asr",
)
print(asr("sample.wav")["text"])
API service (this repository)
This model powers the myagro-audio service. Example requests:
JSON (base64)
curl -X POST https://your-endpoint/transcribe \
-H "Content-Type: application/json" \
-d '{
"audio_base64": "<base64-audio>",
"language": "wol",
"return_timestamps": false
}'
Multipart file upload
curl -X POST https://your-endpoint/transcribe/upload \
-F "file=@sample.wav" \
-F "language=wol" \
-F "return_timestamps=true"
Batch (RunPod-friendly)
{
"input": {
"items": [
{"id": "clip-1", "audio_base64": "..."},
{"id": "clip-2", "audio_base64": "..."}
],
"return_timestamps": false
}
}
Response format
{
"text": "transcribed wolof text",
"language": "wol",
"duration_seconds": 2.5,
"request_id": "uuid",
"inference_ms": 120.4,
"words": [
{"word": "example", "start": 0.12, "end": 0.48}
]
}
words is optional and only included when return_timestamps=true.
Limitations
- Best performance on clear, close-mic speech at 16 kHz
- Word timestamps are approximate CTC alignments, not forced alignments
- Not intended for real-time streaming transcription
- Long-form audio should be split into chunks under 60 seconds
Training data
Citation
@misc{or4kool-wolof-asr,
author = {Samuel Oriaku},
title = {Wolof ASR wav2vec2 CTC},
year = {2026},
publisher = {Hugging Face},
howpublished = {\url{https://huggingface.co/Or4kool/wolof_asr}}
}
Uploading this card to Hugging Face
huggingface-cli login
huggingface-cli upload Or4kool/wolof_asr huggingface_model_card/README.md README.md
- Downloads last month
- 43