Views
No views yet
1pip install git+https://github.com/SWivid/F5-TTS.git
2pip install git+https://github.com/btseee/oron-tts.git1import soundfile as sf
2from huggingface_hub import hf_hub_download
3from f5_tts.api import F5TTS
4from oron_tts.text import MongolianNormalizer
5
6VOICE = "female" # or "male"
7
8ckpt = hf_hub_download("btsee/oron-tts", "model.safetensors")
9vocab = hf_hub_download("btsee/oron-tts", "vocab.txt")
10ref = hf_hub_download("btsee/oron-tts", f"voices/{VOICE}.wav")
11rtxt = hf_hub_download("btsee/oron-tts", f"voices/{VOICE}.txt")
12
13tts = F5TTS(model="F5TTS_v1_Base", ckpt_file=ckpt, vocab_file=vocab, use_ema=False)
14wav, sr, _ = tts.infer(
15 ref_file=ref,
16 ref_text=open(rtxt, encoding="utf-8").read().strip(),
17 gen_text=MongolianNormalizer().normalize("Сайн байна уу. Өнөөдөр цаг агаар сайхан байна.",
18 strict=True),
19 nfe_step=32, cfg_strength=2.0, sway_sampling_coef=-1.0, seed=0)
20
21sf.write("out.wav", wav, sr)use_ema=False. The EMA weights synthesise fluent non-words, an order
of magnitude worse by CER than the raw tensors, while sounding like confident
speech -- so you will not hear the mistake.MongolianNormalizer.voices/ prompts, over held-out sentences never
used to select anything: n=201 per voice. Micro-CER and mean UTMOS, 95%
bootstrap intervals.| male | female | |
|---|---|---|
| CER | 0.0508 [0.0466–0.0552] | 0.0630 [0.0585–0.0676] |
| UTMOS | 2.95 [2.91–2.99] | 2.95 [2.92–2.98] |
| speaker similarity to own prompt | 0.741 | 0.717 |
eval.json, curves in TensorBoard.