Whisper Small - German-Accented English IPA Transcription
This model is a fine-tuned version of openai/whisper-small trained to transcribe German-accented English speech into IPA (International Phonetic Alphabet) notation instead of standard English orthography.
Model Description
Base Model: openai/whisper-small (244M parameters)
Training Data: 516 manually segmented audio samples from 175 German speakers
Task: Automatic Speech Recognition (ASR) with IPA output
Language: English (with German accent)
Output Format: IPA phonetic transcription
Intended Use
This model is designed for:
Phonetic analysis of German-accented English speech
Note: WER is not always the best metric for IPA transcription quality. This model produces higher-quality IPA output (better vowel accuracy, stress patterns, and formatting) compared to models with lower WER but less accurate phonetic details.
Usage
⚠️ CRITICAL: You MUST disable language/task forcing to get IPA output instead of English text!
Basic Usage
python
1import torch
2from transformers import WhisperProcessor, WhisperForConditionalGeneration
3import librosa
45# Load model and processor6model_id ="canpolatbulbul/whisper-small-ipa"7processor = WhisperProcessor.from_pretrained(model_id)8model = WhisperForConditionalGeneration.from_pretrained(model_id)910# CRITICAL: Disable forced English output11model.config.forced_decoder_ids =None12model.config.suppress_tokens =[]13if model.generation_config isnotNone:14 model.generation_config.forced_decoder_ids =None15 model.generation_config.suppress_tokens =[]1617# Load audio18audio, sr = librosa.load("path/to/audio.wav", sr=16000)1920# Process audio21input_features = processor(audio, sampling_rate=16000, return_tensors="pt").input_features
2223# Generate IPA transcription24device ="cuda"if torch.cuda.is_available()else"cpu"25model.to(device)26input_features = input_features.to(device)2728# Use only start-of-transcript token (no language forcing)29decoder_input_ids = torch.tensor([[50258]]).to(device)3031with torch.no_grad():32 predicted_ids = model.generate(33 input_features,34 decoder_input_ids=decoder_input_ids,35 forced_decoder_ids=None,36 suppress_tokens=[]37)3839# Decode to IPA40ipa_transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True)[0]41print(ipa_transcription)
Example Output
Input Audio: German speakers reading:
Please call Stella.
Ask her to bring these things with her from the store:
Six spoons of fresh snow peas, five thick slabs of blue cheese,
and maybe a snack for her brother Bob. We also need a small
plastic snake and a big toy frog for the kids. She can scoop
these things into three red bags, and we will go meet her
Wednesday at the train station.
Whisper has an architectural limit of 448 tokens. For very long IPA transcriptions (>30 seconds of dense speech), the output may be truncated. This is a Whisper limitation, not a model training issue.
2. IPA Convention
The model outputs IPA in the style of the training data (broad phonemic transcription). Different IPA conventions exist, and this model follows the specific notation used in the training dataset.
3. Accent Specificity
The model is trained on German-accented English. Performance on other accents may vary.
4. Audio Quality
Best results are achieved with:
Clear speech
Minimal background noise
16kHz sample rate
Audio segments <30 seconds
Evaluation
The model was evaluated on a held-out validation set of 52 samples (10% of the dataset) using Phoneme Error Rate (PER), the standard metric for phonetic transcription evaluation.
Validation Set Performance
Metric
Value
Phoneme Error Rate (PER)
8.26%
Median PER
6.34%
Standard Deviation
7.48%
Min PER
0.49%
Max PER
29.38%
Metrics Explained
Phoneme Error Rate (PER) measures the edit distance (insertions, deletions, substitutions) between predicted and reference IPA transcriptions at the phoneme level. It is more appropriate for evaluating phonetic transcription than Word Error Rate (WER), which operates at the word level.