Update app.py
Browse files
app.py
CHANGED
|
@@ -17,11 +17,11 @@ tts = load_tts_model()
|
|
| 17 |
|
| 18 |
# Celebrity voices (example list, you may want to expand or modify this)
|
| 19 |
celebrity_voices = {
|
| 20 |
-
"
|
| 21 |
"Scarlett Johansson": "path/to/scarlett_johansson_sample.wav",
|
| 22 |
"David Attenborough": "path/to/david_attenborough_sample.wav",
|
| 23 |
}
|
| 24 |
-
|
| 25 |
def tts_generate(text, voice, language):
|
| 26 |
with tempfile.NamedTemporaryFile(delete=False, suffix=".wav") as temp_audio:
|
| 27 |
temp_audio_path = temp_audio.name
|
|
|
|
| 17 |
|
| 18 |
# Celebrity voices (example list, you may want to expand or modify this)
|
| 19 |
celebrity_voices = {
|
| 20 |
+
"morgan": "./voices/morgan.mp3",
|
| 21 |
"Scarlett Johansson": "path/to/scarlett_johansson_sample.wav",
|
| 22 |
"David Attenborough": "path/to/david_attenborough_sample.wav",
|
| 23 |
}
|
| 24 |
+
@spaces.GPU(enable_queue=True)
|
| 25 |
def tts_generate(text, voice, language):
|
| 26 |
with tempfile.NamedTemporaryFile(delete=False, suffix=".wav") as temp_audio:
|
| 27 |
temp_audio_path = temp_audio.name
|