Downloads · 30 days
422
24% of all-time downloads
Maxdorger29/f5-tts-hungarian
f5-tts-hungarian is a text-to-speech model from Maxdorger29. Use it when you need text read aloud. It is set up for f5-tts. The card lists the license as cc-by-nc-4.0.
The first and only Hungarian fine-tuned F5-TTS model with zero-shot voice cloning from just 5-15 seconds of reference audio.
Downloads · 30 days
422
24% of all-time downloads
All-time downloads
1.8K
Public
Repo size
683 MB
Likes
12
Public
Click a slice to open those files.
.safetensors672 MB · 98%
From the Hugging Face model README
The first and only Hungarian fine-tuned F5-TTS model with zero-shot voice cloning from just 5-15 seconds of reference audio.
Training on H100 GPUs is expensive — a coffee directly funds the next epochs. 🙏
Listen to what the model can do based on 5-15 seconds of Hungarian reference audio!
<table> <tr> <th>Reference Audio (Original)</th> <th>Generated Audio (F5-TTS Clone)</th> </tr> <tr> <td><audio controls src="https://huggingface.co/Maxdorger29/f5-tts-hungarian/resolve/main/samples/ref_01.wav"></audio></td> <td><audio controls src="https://huggingface.co/Maxdorger29/f5-tts-hungarian/resolve/main/samples/clone_01.wav"></audio></td> </tr> <tr> <td><audio controls src="https://huggingface.co/Maxdorger29/f5-tts-hungarian/resolve/main/samples/ref_02.wav"></audio></td> <td><audio controls src="https://huggingface.co/Maxdorger29/f5-tts-hungarian/resolve/main/samples/clone_02.wav"></audio></td> </tr> <tr> <td><audio controls src="https://huggingface.co/Maxdorger29/f5-tts-hungarian/resolve/main/samples/ref_03.wav"></audio></td> <td><audio controls src="https://huggingface.co/Maxdorger29/f5-tts-hungarian/resolve/main/samples/clone_03.wav"></audio></td> </tr> </table>| Base Model | F5-TTS v1 Base (DiT 1024d / 22 depth / 16 heads) |
| Pretrained Checkpoint | SWivid/F5-TTS/F5TTS_v1_Base/model_1200000.safetensors |
| Training Hardware | NVIDIA H100 SXM 80GB HBM3 |
| Training Duration | ~50 epochs, stopped at loss plateau (0.63) |
| Total Samples | ~145,000 (sum of the three datasets below) |
| Total Audio | ~270 hours |
| Vocabulary | 67 tokens (Hungarian UTF-8 characters + digits) |
| Sample Rate | 24,000 Hz |
| Checkpoint Format | FP16 safetensors (~640 MB) |
| Dataset | Samples | Hours | Description |
|---|---|---|---|
| YodaLingua Hungarian | ~80,740 | ~206h | High-quality curated Hungarian speech corpus |
| Common Voice HU 17.0 | ~59,925 | ~54h | Mozilla community-contributed recordings |
| CSS10 Hungarian | ~4,474 | ~10h | Single-speaker professional narration (Egri Csillagok) |
| Parameter | Value |
|---|---|
| Learning Rate | 1e-5 |
| Warmup Steps | 500 |
| Batch Size | 38,400 frames |
| Precision | Mixed Precision (BF16) |
| Optimizer | AdamW |
| EMA | Yes (used for inference) |
import torch
import torchaudio
import soundfile as sf
import numpy as np
# Monkey-patch torchaudio for cross-platform compatibility
_orig_load = torchaudio.load
def _patched_load(fp, **kw):
d, sr = sf.read(str(fp), dtype="float32")
if d.ndim == 1: d = d[np.newaxis, :]
else: d = d.T
return torch.from_numpy(d), sr
torchaudio.load = _patched_load
from f5_tts.api import F5TTS
model = F5TTS(
model="F5TTS_v1_Base",
ckpt_file="model_last_final.safetensors",
vocab_file="vocab.txt",
device="cuda",
use_ema=True,
)
wav, sr, _ = model.infer(
ref_file="your_reference.wav",
ref_text="A referencia hang pontos atirata.",
gen_text="Szia, ez egy teszt mondat a magyar szovegfelolvasashoz.",
)
sf.write("output.wav", wav, sr)
The ref_text must be the exact transcription of ref_audio. Mismatched text causes garbled output. Use Whisper to transcribe:
from faster_whisper import WhisperModel
whisper = WhisperModel("large-v3-turbo", device="cuda")
segments, _ = whisper.transcribe("your_reference.wav", language="hu")
ref_text = " ".join(s.text.strip() for s in segments)
Measured on NVIDIA RTX 5060 Ti 16GB, PyTorch 2.x, CUDA, FP16:
| Metric | Value |
|---|---|
| Real-Time Factor (RTF) | ~0.25 (10s of audio generated in ~2.5s) |
| Model Load Time | ~4.4s (first load, CUDA) |
| Warmup Inference | ~2.5s (first generation) |
| Steady-State Latency | ~250ms per sentence |
| Peak VRAM Usage | ~2.4 GB (Highly optimized for consumer GPUs) |
| Min VRAM Recommended | 4 GB (FP16) |
For optimal voice cloning quality:
| File | Size | Description |
|---|---|---|
model_last_final.safetensors | ~640 MB | FP16 EMA model weights |
vocab.txt | <1 KB | 67-token Hungarian character vocabulary (required for loading) |
config.json | <1 KB | Model architecture and training configuration |
inference_example.py | ~6 KB | Complete inference script with Whisper transcription + artifact trimming |
hungarian_preprocessing.py | ~3 KB | Text normalizer (numbers, symbols, acronyms to spoken Hungarian) |
samples/ | — | 20 reference + 20 cloned audio pairs for evaluation |
The model occasionally produces a brief garbled sound (~200-400ms) at the very beginning of generated audio. This is a known characteristic of the F5-TTS DiT architecture — the hard mel-spectrogram boundary between reference and generated speech does not always align with the acoustic boundary.
Workarounds (in order of effectiveness):
gen_text (e.g., "szoval, " + your_text), then trim the first ~400ms from the outputThe included inference_example.py implements an energy-based adaptive trimmer. Community contributions for better solutions are welcome!
Very short texts (<5 characters) may produce stretched or compressed audio. The model estimates duration from the ref_text/gen_text character ratio — extremely short inputs can break this heuristic. Workaround: pad short texts with natural filler.
The model weights are released under CC-BY-NC-4.0 (following the base F5-TTS license). The inference code, preprocessing scripts, and tooling are open for contributions!
We welcome:
GitHub (Inference toolkit & Issues): github.com/Maxdorger/f5-tts-hungarian Hugging Face (Model Weights): huggingface.co/Maxdorger29/f5-tts-hungarian
Training high-quality TTS models on H100 GPUs is expensive. If this model is useful to you, consider buying me a coffee — it directly funds compute time for future improvements!
This model is released under CC-BY-NC-4.0, consistent with the base F5-TTS model license.
@misc{f5tts-hungarian-2026,
title={F5-TTS Hungarian: Native Magyar Text-to-Speech with Zero-Shot Voice Cloning},
author={Maxdorger29},
year={2026},
url={https://huggingface.co/Maxdorger29/f5-tts-hungarian},
note={Fine-tuned on ~145k Hungarian speech samples using NVIDIA H100}
}