whisper-base-turkish-khanacademy
openai/whisper-base (revision e37978b90c)
fine-tuned for Turkish transcription on
ysdede/khanacademy-turkish (revision 77e33a6d4a).
Results
Greedy decoding, language="turkish", task="transcribe", best checkpoint by validation normalized WER.
| split | samples | WER norm | CER norm | WER raw | CER raw |
|---|---|---|---|---|---|
validation, zero-shot openai/whisper-base |
1000 | 28.33 | 9.83 | 37.59 | 11.78 |
| validation | 1000 | 13.58 | 4.49 | 22.41 | 5.95 |
| test | 1355 | 14.5 | 4.77 | 23.16 | 6.4 |
- raw: case and punctuation sensitive, whitespace collapsed only.
- norm: NFC, Turkish lower-casing (
I→ı,İ→i), apostrophes removed, other punctuation/symbols replaced by spaces. Turkish letters are not folded to ASCII.
Training data
| split | samples | hours |
|---|---|---|
| train | 24665 | 70.65 |
| validation | 1000 | 2.97 |
| test | 1355 | 3.86 |
- Source audio: Opus, 48 kHz mono, resampled to 16 kHz on decode.
validation: 1000 clips sampled (seed 42) from the original train split; transcripts occurring more than once in train are excluded from validation.- Train/validation filtering: duration < 0.5 s or > 30.0 s,
25.0 characters per second (misaligned segments), > 440 label tokens.
test: the official test split, unfiltered.- Transcripts used as-is (cased, punctuated); no text normalization during training.
- The dataset has no speaker/video identifiers; test clips may come from the same videos as training clips.
Training procedure
| parameter | value |
|---|---|
| epochs (max / completed) | 5.0 / 4.86 |
| optimizer steps | 3750 |
| per-device batch size | 16 |
| gradient accumulation | 2 |
| effective batch size | 32 |
| learning rate | 2.5e-05 |
| scheduler | linear, warmup ratio 0.05 |
| weight decay | 0.01 |
| max grad norm | 1.0 |
| precision | bf16 mixed precision |
| gradient checkpointing | False |
| early stopping patience | 5 evaluations (every 250 steps) |
| seed | 42 |
| hardware | NVIDIA GeForce RTX 5060 Ti (15.9 GB) |
| training time | 49.1 min |
Loss is computed on <|tr|><|transcribe|><|notimestamps|> text <|endoftext|>; the model was trained without
timestamp tokens.
Usage
import torch
from transformers import WhisperForConditionalGeneration, WhisperProcessor
model_id = "thealper2/whisper-base-turkish-khanacademy"
processor = WhisperProcessor.from_pretrained(model_id)
model = WhisperForConditionalGeneration.from_pretrained(model_id).eval()
# audio: 1-D float32 array, 16 kHz, <= 30 s
inputs = processor(audio, sampling_rate=16000, return_tensors="pt")
with torch.inference_mode():
ids = model.generate(inputs.input_features, language="turkish", task="transcribe")
print(processor.batch_decode(ids, skip_special_tokens=True)[0])
For audio longer than 30 s use the automatic-speech-recognition pipeline with chunk_length_s=30.
Limitations
- Domain: Khan Academy lecture audio (STEM, economics, history, art history).
- Input window is 30 s; longer audio requires chunking.
- Training data license: Khan Academy content, CC BY-NC-SA 3.0.
Framework versions
- transformers 5.17.0
- torch 2.11.0+cu128 (CUDA 12.8)
- datasets 4.3.0