Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -22,13 +22,17 @@ pipeline = KPipeline(lang_code='a') # 'a' stands for American English
|
|
22 |
|
23 |
@tool
|
24 |
def text_to_speech_kokoro(text: str, voice: str = 'af_heart', speed: float = 1.0) -> str:
|
25 |
-
"""
|
26 |
-
|
27 |
-
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
|
|
|
|
|
|
|
|
32 |
Returns:
|
33 |
str: The path to the generated audio file.
|
34 |
"""
|
|
|
22 |
|
23 |
@tool
|
24 |
def text_to_speech_kokoro(text: str, voice: str = 'af_heart', speed: float = 1.0) -> str:
|
25 |
+
"""
|
26 |
+
Convert text to speech using the Kokoro-82M model.
|
27 |
+
|
28 |
+
Parameters:
|
29 |
+
text (str):
|
30 |
+
The text to be converted to speech.
|
31 |
+
voice (str, optional):
|
32 |
+
The voice to use for speech synthesis. Defaults to 'af_heart'.
|
33 |
+
speed (float, optional):
|
34 |
+
The speed of the speech. Defaults to 1.0.
|
35 |
+
|
36 |
Returns:
|
37 |
str: The path to the generated audio file.
|
38 |
"""
|