Views
No views yet
model.pt: Model checkpointvocab.txt: Vocabulary file1from huggingface_hub import hf_hub_download
2from f5_tts.api import F5TTS
3
4# Download files
5model_path = hf_hub_download(repo_id="coutMinh/f5tts-vietnamese-finetuned", filename="model.pt")
6vocab_path = hf_hub_download(repo_id="coutMinh/f5tts-vietnamese-finetuned", filename="vocab.txt")
7
8# Load model
9tts = F5TTS(model_type="F5TTS_Base", ckpt_file=model_path, vocab_file=vocab_path)
10
11# Generate
12wav, sr, _ = tts.infer(
13 ref_audio="reference.wav",
14 ref_text="Text tham chiếu",
15 gen_text="Text cần tạo"
16)