Spaces:
No application file
No application file
Create app.py
Browse files
app.py
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from TTS.tts.configs.xtts_config import XttsConfig
|
| 2 |
+
from TTS.tts.models.xtts import Xtts
|
| 3 |
+
|
| 4 |
+
config = XttsConfig()
|
| 5 |
+
config.load_json("/path/to/xtts/config.json")
|
| 6 |
+
model = Xtts.init_from_config(config)
|
| 7 |
+
model.load_checkpoint(config, checkpoint_dir="/path/to/xtts/", eval=True)
|
| 8 |
+
model.cuda()
|
| 9 |
+
|
| 10 |
+
outputs = model.synthesize(
|
| 11 |
+
"It took me quite a long time to develop a voice and now that I have it I am not going to be silent.",
|
| 12 |
+
config,
|
| 13 |
+
speaker_wav="/data/TTS-public/_refclips/3.wav",
|
| 14 |
+
gpt_cond_len=3,
|
| 15 |
+
language="en",
|
| 16 |
+
)
|