Downloads · 30 days
46
25% of all-time downloads
q1805/hubert_large-german-IPA-v2
hubert_large-german-IPA-v2 is a automatic speech recognition model from q1805. Use it when you need speech turned into text. It is set up for transformers. The card lists the license as cc-by-nc-4.0.
Downloads · 30 days
46
25% of all-time downloads
All-time downloads
184
Public
Parameters
316M
3.8 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.3 GB · 100%
From the Hugging Face model README
The model was fine-tuned on a composite dataset q1805/german-pronuncheck-mega-dataset, combining three complementary sources:
espeak-ng using a fork-safe parallel pipeline (preserve_punctuation=False, with_stress=True).fp16=True): Enabled NVIDIA L4 Tensor Cores, cutting memory by 50% and doubling matrix throughput.gradient_checkpointing=True): Mitigated memory spikes from long audio sequences ($O(N^2)$ attention matrices).dataloader_num_workers=4): Eliminated GPU starvation by asynchronously feeding audio arrays.per_device_train_batch_size = 2 and gradient_accumulation_steps = 16.PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True.3e-5, followed by linear decay to 0.0.sps-corpus-4.0)Evaluated on 100% of the completely unseen Mozilla Common Voice Spontaneous Speech 4.0 German dataset (natural speech with diverse accents and background noise):
| Benchmark Metric | Model_v1 | Model v2 (This repo) | Improvement |
|---|---|---|---|
| Phoneme Error Rate (PER) | 35.60% | 33.81% | -1.79% absolute error reduction 🎯 |
| Phonetic Accuracy | 64.40% | 66.19% | +1.79% 🚀 |
| Mean Inference Latency | 18.75 ms | 32.58 ms | Real-time ready |
| P50 Latency (Median) | 18.62 ms | 33.71 ms | Ultra-fast |
| P90 Latency | 19.30 ms | 35.03 ms | Smooth streaming |
| P99 Latency (Complex) | 23.14 ms | 41.44 ms | No bottlenecks |
q1805/german-pronuncheck-mega-dataset)Evaluated on the independent 10% test split extracted from mega_dataset (comprising 86,575 utterances across Parliamentary debates, crowdsourced Mozilla audio, and MLS studio audio that neither model touched during training):
| Evaluation Metric | Model_v1 | Model_v2 (This repo) | Improvement |
|---|---|---|---|
| Phoneme Error Rate (PER) | 32.51% | 21.86% | -10.65% absolute error reduction 🎯 |
| Phonetic Accuracy | 67.49% | 78.14% | +10.65% 🚀 |
| Mean Inference Latency | 20.15 ms | 19.97 ms | Ultra-responsive |
| P50 Latency (Median) | 19.19 ms | 18.92 ms | Real-time ready |
| P90 Latency | 21.28 ms | 22.22 ms | Smooth streaming |
| P99 Latency (Complex) | 34.77 ms | 34.45 ms | No bottlenecks |
import torch
import librosa
from transformers import Wav2Vec2Processor, HubertForCTC
# Load production model and processor
REPO_ID = "q1805/hubert-german-IPA-large-v2"
processor = Wav2Vec2Processor.from_pretrained(REPO_ID)
model = HubertForCTC.from_pretrained(REPO_ID).eval()
# Load 16kHz audio
audio_path = "german_speech_sample.wav"
audio, sr = librosa.load(audio_path, sr=16000)
# Forward pass
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)
ipa_transcription = processor.batch_decode(predicted_ids)[0]
print("Predicted German IPA:", ipa_transcription)