Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
@@ -33,7 +33,7 @@ def text2speech(text, no, sample):
|
|
33 |
if sample is None:
|
34 |
sample = "sampleaudio/abraham.wav"
|
35 |
if len(text) > 0:
|
36 |
-
epoch_time = str(
|
37 |
tts = TTS("tts_models/multilingual/multi-dataset/xtts_v2")
|
38 |
wav = tts.tts_to_file(text=text, file_path="output-"+epoch_time+".wav", speaker_wav=sample, language="en").to(device)
|
39 |
return wav
|
|
|
33 |
if sample is None:
|
34 |
sample = "sampleaudio/abraham.wav"
|
35 |
if len(text) > 0:
|
36 |
+
epoch_time = str(int(time.time()))
|
37 |
tts = TTS("tts_models/multilingual/multi-dataset/xtts_v2")
|
38 |
wav = tts.tts_to_file(text=text, file_path="output-"+epoch_time+".wav", speaker_wav=sample, language="en").to(device)
|
39 |
return wav
|