Views
No views yet
epoch_2nd_00049.pth: Checkpoint del modelo (2.1GB)config_spanish_ft.yml: Configuración del modeloreference_audio.wav: Audio de referencia para clonación de voz (916KB)1pip install -U "huggingface_hub[cli]"
2huggingface-cli download FenixDS/styletts2-spanish-ft --local-dir styletts2-spanish-ftconfig/default.yaml:1tts:
2 provider: styletts2
3 config_path: styletts2-spanish-ft/config_spanish_ft.yml
4 checkpoint_path: styletts2-spanish-ft/epoch_2nd_00049.pth
5 reference_audio: styletts2-spanish-ft/reference_audio.wav
6 alpha: 0.3
7 beta: 0.5
8 diffusion_steps: 4
9 embedding_scale: 21import torch
2from styletts2 import tts
3
4# Cargar modelo
5model = tts.StyleTTS2(
6 config_path="styletts2-spanish-ft/config_spanish_ft.yml",
7 checkpoint_path="styletts2-spanish-ft/epoch_2nd_00049.pth"
8)
9
10# Generar voz
11text = "Hola, este es un ejemplo de síntesis de voz en español."
12reference_audio = "styletts2-spanish-ft/reference_audio.wav"
13
14audio = model.inference(
15 text=text,
16 ref_audio=reference_audio,
17 alpha=0.3,
18 beta=0.5,
19 diffusion_steps=4,
20 embedding_scale=2
21)