Ir para o conteúdo
ModelListadosExterno
Browse files

Wav2vec2 Large Mms 1b Hungarian

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,...

TipoOtherModelo basefacebook/mms-1b-allVersãoRevision fae2de9Bnota

Fonte do modelo

Tipo
Other
Tamanho do arquivo
8,43 MB–3,59 GB
Modelo base
facebook/mms-1b-all
Versão
vRevision fae2de9
Atualizado
27 de set. de 2026
Downloads
15
Fonte
Hugging Face

Descrição da fonte

Model Card for wav2vec2-large-mms-1b-hungarian

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:

  • Hungarian FLEURS Test WER: 0.1993
  • Hungarian FLEURS Test CER: 0.0519
  • Common Voice (500 held-out samples) WER: 0.16

Model Details

Model Description

  • Developed by: Gabor Madarasz
  • Model type: Wav2Vec2ForCTC (Connectionist Temporal Classification)
  • Language(s): Hungarian (hu)
  • License: CC0-1.0
  • Finetuned from model: facebook/mms-1b-all

Model Sources

Uses

Direct Use

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.

Downstream Use

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).

Out-of-Scope Use

  • Transcribing audio with heavy background noise, overlapping speakers, or extreme reverberation.
  • Processing non-Hungarian languages.
  • Real-time streaming ASR without appropriate chunking/VAD modifications.

Bias, Risks, and Limitations

Limitations

  • CTC Characteristics: As a CTC model, it may occasionally produce phonetically similar word substitutions (e.g., homophones) or struggle with precise punctuation placement. The low CER (5.19%) compared to WER (19.93%) confirms strong phonetic accuracy, making LM integration highly effective.
  • Domain Shift: Performance may degrade on highly specialized technical jargon, heavy regional dialects, or code-switching not represented in the training data.
  • Demographic Bias: The training data (e.g., Common Voice) may overrepresent certain demographics, potentially leading to slightly higher error rates for underrepresented accents or speech patterns.

Recommendations

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.

How to Get Started with the Model

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-hungarian"
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}")

Training Details

Training Data

The model was trained on:

  1. Mozilla Common Voice 24.0 (Hungarian): Primary open-source, crowdsourced speech data.

Training Procedure

The model was fine-tuned using the Hugging Face transformers Trainer API.

Training Hyperparameters

  • Learning Rate: 1e-3 (with linear scheduler)
  • Batch Size: 2 per device
  • Gradient Accumulation Steps: 16 (Effective batch size: 32)
  • Mixed Precision: BF16
  • Gradient Checkpointing: Enabled (to fit within 12GB VRAM constraints)
  • Epochs: 4

Speeds, Sizes, Times

  • Checkpoint Size: ~3.8 GB
  • Hardware: NVIDIA RTX3060 GPU with 12GB VRAM

Evaluation

Testing Data, Factors & Metrics

  • Testing Data: Hungarian FLEURS test set, and a 500-sample held-out subset of Common Voice.
  • Metrics:
    • Word Error Rate (WER): Standard metric for ASR, measuring word-level accuracy. 3 - Character Error Rate (CER): Crucial for agglutinative languages like Hungarian, as it accurately captures phonetic and morphological errors (e.g., missing or incorrect suffixes) that WER might over-penalize.

Results

DatasetMetricScore
FLEURS (hu) TestWER0.1993
FLEURS (hu) TestCER0.0519
Common Voice (500 held-out)WER0.1600

Model Card Contact

For questions, issues, or collaboration, please contact: [email protected]

Fontes

1 fonte
Hugging FacePrimárioVersão fae2de94d8c123177e93cfbd913a514f9788aeed
huggingface.co/GaborMadarasz/wav2vec2-large-mms-1b-hungarian/tree/fae2de94d8c123177e93cfbd913a514f9788aeed

Verificado 30 de ago.

Download files

Artefatos de modelo

2 artefatos

adapter.hun.safetensors

safetensors · 8,43 MB · SHA-256 62cfd8a8c0e3…c990 · Hugging Face

Download file

model.safetensors

safetensors · 3,59 GB · SHA-256 70cb278357e3…09f4 · Hugging Face

Download file

Trechos de fonte

2 trechos

--- library_name: transformers tags: - ASR - STT - hungarian - speech-recognition - mms license: cc0-1.0 datasets: - mozilla-foundation/common_voice_17_0 - google/fleurs language: - hu metrics: - wer - cer base_model: - facebook/mms-1b-all --- # Model Card for wav2vec2-large-mms-1b-hungarian 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:** - Hungarian FLEURS Test WER: 0.1993 - Hungarian FLEURS Test CER: 0.0519 - Common Voice (500 held-out samples) WER: 0.16 ## Model Details ### Model Description - **Developed by:** Gabor Madarasz - **Model type:** Wav2Vec2ForCTC (Connectionist Temporal Classification) - **Language(s):** Hungarian (hu) - **License:** CC0-1.0 - **Finetuned from model:** [facebook/mms-1b-all](https://huggingface.co/facebook/mms-1b-all) ### Model Sources - **Repository:** https://huggingface.co/GaborMadarasz/wav2vec2-large-mms-1b-hungarian ## Uses ### Direct Use 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. ### Downstream Use 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). ### Out-of-Scope Use - Transcribing audio with heavy background noise, overlapping speakers, or extreme reverberation. - Processing non-Hungarian languages. - Real-time streaming ASR without appropriate chunking/VAD modifications. ## Bias, Risks, and Limitations ### Limitations - **CTC Characteristics:** As a CTC model, it may occasionally produce phonetically similar word substitutions (e.g., homophones) or struggle with precise punctuation placement. The low CER (5.19%) compared to WER (19.93%) confirms strong phonetic accuracy, making LM integration highly effective. - **Domain Shift:** Performance may degrade on highly specialized technical jargon, heavy regional...

Source context: 15 downloads · 0 likes · Pipeline automatic-speech-recognition · Library transformers · Repo GaborMadarasz/wav2vec2-large-mms-1b-hungarian