Downloads · 30 days
18
10% of all-time downloads
GaborMadarasz/wav2vec2-large-mms-1b-cv_vp
wav2vec2-large-mms-1b-cv_vp is a automatic speech recognition model from GaborMadarasz. Use it when you need speech turned into text. It is set up for transformers. The card lists the license as cc0-1.0.
This model is a Hungarian Automatic Speech Recognition (ASR) system fine-tuned from the facebook/mms-1b-all base model. It utilizes the Wav2Vec2 architecture with a Connectionist Temporal Classification (CTC) head, op…
Downloads · 30 days
18
10% of all-time downloads
All-time downloads
189
Public
Parameters
965M
3.9 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors3.9 GB · 100%
From the Hugging Face model README
This model is a Hungarian Automatic Speech Recognition (ASR) system fine-tuned from the facebook/mms-1b-all base model. It utilizes the Wav2Vec2 architecture with a Connectionist Temporal Classification (CTC) head, optimized specifically for Hungarian speech.
Key Metrics:
This model is intended for direct use in Hungarian speech-to-text (STT) applications. It can transcribe clear, single-speaker Hungarian audio (e.g., podcasts, audiobooks, recorded speech) into text with high character-level accuracy.
The model serves as an excellent acoustic baseline for downstream applications. For production environments, it is highly recommended to integrate this model with an n-gram Language Model (e.g., KenLM) via beam search decoding (e.g., pyctcdecode) to resolve phonetically similar word errors and further reduce the Word Error Rate (WER).
Users should be aware of these limitations. For critical applications, implement a post-processing step or a Language Model decoder to correct contextually unlikely word sequences. Always validate the model's performance on your specific target domain before deployment.
Use the code below to get started with the model.
import torch
from transformers import Wav2Vec2Processor, Wav2Vec2ForCTC
from datasets import load_dataset
# Load model and processor
model_id = "GaborMadarasz/wav2vec2-large-mms-1b-cv_vp"
processor = Wav2Vec2Processor.from_pretrained(model_id)
model = Wav2Vec2ForCTC.from_pretrained(model_id, target_lang="hun")
# Load dummy audio (replace with your own Hungarian audio file)
# Ensure the audio is resampled to 16,000 Hz
dataset = load_dataset("hf-internal-testing/librispeech_asr_dummy", "clean", split="validation")
audio_array = dataset[0]["audio"]["array"]
sampling_rate = dataset[0]["audio"]["sampling_rate"]
# Process audio and predict
inputs = processor(audio_array, sampling_rate=sampling_rate, return_tensors="pt", padding=True)
with torch.no_grad():
logits = model(inputs.input_values).logits
# Decode output
pred_ids = torch.argmax(logits, dim=-1)
predicted_text = processor.batch_decode(pred_ids)[0]
print(f"Prediction: {predicted_text}")
The model was trained on:
The model was fine-tuned using the Hugging Face transformers Trainer API.
| Dataset | Metric | Score |
|---|---|---|
| FLEURS (hu) Test | WER | 0.3068 |
| FLEURS (hu) Test | CER | 0.0727 |
| Common Voice + Voxpopuli (1000 held-out) | WER | 0.1275 |
For questions, issues, or collaboration, please contact: [email protected]