Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -6,6 +6,7 @@ import tempfile
|
|
| 6 |
# Set up the Kokoro pipeline (choose your language code)
|
| 7 |
pipeline = KPipeline(lang_code='a') # 'a' = American English, see docs for more
|
| 8 |
|
|
|
|
| 9 |
def kokoro_tts(text: str, voice: str = "af_heart", speed: float = 1.0) -> str:
|
| 10 |
"""
|
| 11 |
Generate speech audio from text using Kokoro TTS.
|
|
|
|
| 6 |
# Set up the Kokoro pipeline (choose your language code)
|
| 7 |
pipeline = KPipeline(lang_code='a') # 'a' = American English, see docs for more
|
| 8 |
|
| 9 |
+
@spaces.GPU
|
| 10 |
def kokoro_tts(text: str, voice: str = "af_heart", speed: float = 1.0) -> str:
|
| 11 |
"""
|
| 12 |
Generate speech audio from text using Kokoro TTS.
|