mirror of https://github.com/coqui-ai/TTS.git
docs(xtts): show manual inference with default speakers
This commit is contained in:
parent
9d5fc60a5d
commit
1f9dda65ad
|
@ -163,7 +163,8 @@ from TTS.api import TTS
|
|||
tts = TTS("tts_models/multilingual/multi-dataset/xtts_v2").to("cuda")
|
||||
|
||||
# generate speech by cloning a voice using default settings
|
||||
tts.tts_to_file(text="It took me quite a long time to develop a voice, and now that I have it I'm not going to be silent.",
|
||||
tts.tts_to_file(
|
||||
text="It took me quite a long time to develop a voice, and now that I have it I'm not going to be silent.",
|
||||
file_path="output.wav",
|
||||
speaker="Ana Florence",
|
||||
language="en",
|
||||
|
@ -230,6 +231,11 @@ out = model.inference(
|
|||
torchaudio.save("xtts.wav", torch.tensor(out["wav"]).unsqueeze(0), 24000)
|
||||
```
|
||||
|
||||
You can also use the Coqui speakers:
|
||||
|
||||
```python
|
||||
gpt_cond_latent, speaker_embedding = model.speaker_manager.speakers["Ana Florence"].values()
|
||||
```
|
||||
|
||||
#### Streaming manually
|
||||
|
||||
|
|
Loading…
Reference in New Issue