Spaces:
Runtime error
Runtime error
Better voices
Browse files
app.py
CHANGED
|
@@ -63,8 +63,8 @@ CUDA_AVAILABLE = torch.cuda.is_available()
|
|
| 63 |
kmodel = KModel(repo_id='hexgrad/Kokoro-82M').to("cuda" if CUDA_AVAILABLE else "cpu").eval()
|
| 64 |
kpipeline = KPipeline(lang_code="a") # English voices
|
| 65 |
|
| 66 |
-
MALE_VOICE = "
|
| 67 |
-
FEMALE_VOICE = "
|
| 68 |
|
| 69 |
# Pre‑warm voices to avoid first‑call latency
|
| 70 |
for v in (MALE_VOICE, FEMALE_VOICE):
|
|
@@ -126,10 +126,11 @@ If you do not specify any source materials below, the podcast will be about the
|
|
| 126 |
fn=generate_podcast,
|
| 127 |
inputs=[
|
| 128 |
gr.Textbox(
|
| 129 |
-
label="🔗 Type a Webpage URL to discuss
|
|
|
|
| 130 |
),
|
| 131 |
gr.File(
|
| 132 |
-
label="
|
| 133 |
file_types=[".pdf"],
|
| 134 |
file_count="single",
|
| 135 |
),
|
|
@@ -137,13 +138,14 @@ If you do not specify any source materials below, the podcast will be about the
|
|
| 137 |
],
|
| 138 |
outputs=[
|
| 139 |
gr.Audio(
|
| 140 |
-
label="Listen to your podcast 🔊",
|
| 141 |
format="wav",
|
| 142 |
streaming=True,
|
| 143 |
),
|
| 144 |
],
|
| 145 |
theme=gr.themes.Soft(),
|
| 146 |
submit_btn="Generate podcast 🎙️",
|
|
|
|
| 147 |
# examples=UI_EXAMPLES,
|
| 148 |
# cache_examples=UI_CACHE_EXAMPLES,
|
| 149 |
)
|
|
|
|
| 63 |
kmodel = KModel(repo_id='hexgrad/Kokoro-82M').to("cuda" if CUDA_AVAILABLE else "cpu").eval()
|
| 64 |
kpipeline = KPipeline(lang_code="a") # English voices
|
| 65 |
|
| 66 |
+
MALE_VOICE = "am_daniel"
|
| 67 |
+
FEMALE_VOICE = "af_emma"
|
| 68 |
|
| 69 |
# Pre‑warm voices to avoid first‑call latency
|
| 70 |
for v in (MALE_VOICE, FEMALE_VOICE):
|
|
|
|
| 126 |
fn=generate_podcast,
|
| 127 |
inputs=[
|
| 128 |
gr.Textbox(
|
| 129 |
+
label="🔗 Type a Webpage URL to discuss it (Optional)",
|
| 130 |
+
placeholder="The URL you want to discuss the content for.",
|
| 131 |
),
|
| 132 |
gr.File(
|
| 133 |
+
label="Upload a PDF as discussion material (Optional)",
|
| 134 |
file_types=[".pdf"],
|
| 135 |
file_count="single",
|
| 136 |
),
|
|
|
|
| 138 |
],
|
| 139 |
outputs=[
|
| 140 |
gr.Audio(
|
| 141 |
+
label="Listen to your podcast! 🔊",
|
| 142 |
format="wav",
|
| 143 |
streaming=True,
|
| 144 |
),
|
| 145 |
],
|
| 146 |
theme=gr.themes.Soft(),
|
| 147 |
submit_btn="Generate podcast 🎙️",
|
| 148 |
+
# clear_btn=gr.Button("🗑️"),
|
| 149 |
# examples=UI_EXAMPLES,
|
| 150 |
# cache_examples=UI_CACHE_EXAMPLES,
|
| 151 |
)
|