Spaces:
No application file
No application file
Download app.py from dijj/text-speech: direct link, hf CLI and curl.
- Browser
- Download file 523 Bytes
-
https://huggingface.co/spaces/dijj/text-speech/resolve/main/app.py
- Command line
-
hf download hf://spaces/dijj/text-speech/app.py
-
curl -L -o app.py https://huggingface.co/spaces/dijj/text-speech/resolve/main/app.py
523 Bytes
| from TTS.tts.configs.xtts_config import XttsConfig | |
| from TTS.tts.models.xtts import Xtts | |
| config = XttsConfig() | |
| config.load_json("/path/to/xtts/config.json") | |
| model = Xtts.init_from_config(config) | |
| model.load_checkpoint(config, checkpoint_dir="/path/to/xtts/", eval=True) | |
| model.cuda() | |
| outputs = model.synthesize( | |
| "It took me quite a long time to develop a voice and now that I have it I am not going to be silent.", | |
| config, | |
| speaker_wav="/data/TTS-public/_refclips/3.wav", | |
| gpt_cond_len=3, | |
| language="en", | |
| ) | |