Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -58,9 +58,10 @@ from supertonic import generate_speech, load_text_to_speech
|
|
| 58 |
|
| 59 |
os.environ["PROCESSED_RESULTS"] = f"{os.getcwd()}/proprocess_results"
|
| 60 |
|
|
|
|
| 61 |
def tts_from_text(text, tts_dir, voice_choice):
|
| 62 |
|
| 63 |
-
text_to_speech = load_text_to_speech(
|
| 64 |
output = generate_speech(text_to_speech , [text], tts_dir, voice_choice)[0]
|
| 65 |
return output
|
| 66 |
|
|
|
|
| 58 |
|
| 59 |
os.environ["PROCESSED_RESULTS"] = f"{os.getcwd()}/proprocess_results"
|
| 60 |
|
| 61 |
+
@spaces.GPU()
|
| 62 |
def tts_from_text(text, tts_dir, voice_choice):
|
| 63 |
|
| 64 |
+
text_to_speech = load_text_to_speech(True)
|
| 65 |
output = generate_speech(text_to_speech , [text], tts_dir, voice_choice)[0]
|
| 66 |
return output
|
| 67 |
|