Views
No views yet
| File | Purpose |
|---|---|
model_last.pt | Trained model weights. |
vocab.txt | Character vocabulary built from the training transcripts. |
F5-TTS_OpenBible_Gamo.yaml | Hydra training/inference config (architecture, mel spec settings, tokenizer). |
pip install git+https://github.com/SWivid/F5-TTS.git1import torch
2from huggingface_hub import hf_hub_download
3from hydra.utils import get_class
4from omegaconf import OmegaConf
5from f5_tts.infer.utils_infer import infer_process, load_model, load_vocoder, preprocess_ref_audio_text
6
7repo_id = "multilingual-tts/F5-TTS-OpenBible-Gamo"
8ckpt = hf_hub_download(repo_id, "model_last.pt")
9vocab = hf_hub_download(repo_id, "vocab.txt")
10config = hf_hub_download(repo_id, "F5-TTS_OpenBible_Gamo.yaml")
11
12device = "cuda" if torch.cuda.is_available() else "cpu"
13
14model_cfg = OmegaConf.load(config)
15model_cls = get_class(f"f5_tts.model.{model_cfg.model.backbone}")
16
17vocoder = load_vocoder(vocoder_name="vocos", is_local=False, device=device)
18model = load_model(
19 model_cls, model_cfg.model.arch, ckpt,
20 mel_spec_type="vocos", vocab_file=vocab, use_ema=True, device=device,
21)
22
23# Supply your own clean reference clip — 5–10 s, single speaker and its transcription.
24ref_audio = "/path/to/your-gamo-clip.wav"
25ref_text = "Exact transcription of the clip"
26gen_text = "..." # text to synthesise in Gamo
27
28ref_audio_proc, ref_text_proc = preprocess_ref_audio_text(ref_audio, ref_text)
29wav, sr, _ = infer_process(
30 ref_audio_proc, ref_text_proc, gen_text, model, vocoder,
31 mel_spec_type="vocos", device=device,
32)davidguzmanr/open-bible-resources, config Gamo