Downloads · 30 days
7
7% of all-time downloads
shraavb/spanish-slang-whisper
spanish-slang-whisper is a automatic speech recognition model from shraavb. Use it when you need speech turned into text. It is set up for transformers. The card lists the license as mit.
A fine-tuned OpenAI Whisper model specialized for Spanish speech recognition with enhanced support for regional dialects and colloquial expressions (slang).
Downloads · 30 days
7
7% of all-time downloads
All-time downloads
106
Public
Parameters
242M
967 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors967 MB · 99%
From the Hugging Face model README
A fine-tuned OpenAI Whisper model specialized for Spanish speech recognition with enhanced support for regional dialects and colloquial expressions (slang).
This model extends Whisper's Spanish ASR capabilities to accurately transcribe informal speech patterns, regional vocabulary, and dialectal variations across four major Spanish-speaking regions:
| Region | Code | Key Features |
|---|---|---|
| Spain | es-ES | Vosotros conjugation, distinción (z/c vs s), slang: tío, mola, guay, flipar |
| Mexico | es-MX | Ustedes, diminutives (-ito/ita), slang: chido, güey, qué onda, neta |
| Argentina | es-AR | Voseo (vos sos), sheísmo (ll/y→sh), slang: che, boludo, pibe, laburo |
| Chile | es-CL | Mixed voseo, "po" particle, slang: bacán, cachai, fome, al tiro |
The model was fine-tuned on a diverse dataset including:
Vocabulary Coverage: 156+ unique slang words and 67+ region-specific phrases across all four regions.
openai/whisper-smallpython -m src.regional_training.train_all_regions train \
--component stt \
--region all \
--epochs 3 \
--batch-size 8
| Metric | Target | Description |
|---|---|---|
| WER | <15% | Word Error Rate per region |
| CER | <10% | Character Error Rate |
| Latency | <2s | Processing time for typical utterances |
| Dialect Accuracy | 80%+ | Regional slang marker recognition |
| Marker Preservation | 90%+ | Regional slang words correctly transcribed |
from transformers import WhisperProcessor, WhisperForConditionalGeneration
import torch
# Load model and processor
processor = WhisperProcessor.from_pretrained("shraavb/spanish-slang-whisper")
model = WhisperForConditionalGeneration.from_pretrained("shraavb/spanish-slang-whisper")
# Load audio (16kHz mono)
import librosa
audio, sr = librosa.load("audio.wav", sr=16000)
# Process and transcribe
input_features = processor(audio, sampling_rate=16000, return_tensors="pt").input_features
# Generate with forced Spanish language
forced_decoder_ids = processor.get_decoder_prompt_ids(language="es", task="transcribe")
predicted_ids = model.generate(input_features, forced_decoder_ids=forced_decoder_ids)
# Decode
transcription = processor.batch_decode(predicted_ids, skip_special_tokens=True)[0]
print(transcription)
from transformers import pipeline
transcriber = pipeline(
"automatic-speech-recognition",
model="shraavb/spanish-slang-whisper",
chunk_length_s=30,
device="cuda" # or "cpu"
)
result = transcriber("audio.wav", generate_kwargs={"language": "es"})
print(result["text"])
from faster_whisper import WhisperModel
model = WhisperModel("shraavb/spanish-slang-whisper", compute_type="int8")
segments, info = model.transcribe("audio.wav", language="es")
for segment in segments:
print(f"[{segment.start:.2f}s -> {segment.end:.2f}s] {segment.text}")
Whisper Encoder-Decoder Architecture
├── Input: Audio (16kHz, mono)
├── Preprocessing: Mel-spectrogram extraction
├── Encoder: 12 transformer layers (8 attention heads)
├── Decoder: 12 transformer layers (autoregressive)
└── Output: Spanish text transcription + timestamps
Model Size: 244M parameters (0.2B) Tensor Type: F32 (Safetensors format)
@misc{spanish-slang-whisper,
author = {Shraavasti Bhat},
title = {Spanish Regional Slang Whisper: Fine-tuned ASR for Spanish Dialects},
year = {2025},
publisher = {HuggingFace},
howpublished = {\url{https://huggingface.co/shraavb/spanish-slang-whisper}}
}