ygutierrez commited on
Commit
7d0b1b7
·
verified ·
1 Parent(s): 5fc2200

Create api

Browse files
Files changed (1) hide show
  1. api +8 -0
api ADDED
@@ -0,0 +1,8 @@
 
 
 
 
 
 
 
 
 
1
+ from TTS.api import TTS
2
+ tts = TTS("tts_models/multilingual/multi-dataset/xtts_v2", gpu=True)
3
+
4
+ # generate speech by cloning a voice using default settings
5
+ 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.",
6
+ file_path="output.wav",
7
+ speaker_wav="/path/to/target/speaker.wav",
8
+ language="en")