Spaces:
Running
Running
Updated app
Browse files
app.py
CHANGED
|
@@ -1,15 +1,10 @@
|
|
| 1 |
"""
|
| 2 |
π Audiobook Generator β English Source to Multi-Language Audio
|
| 3 |
-
Powered by Qwen3.5-Omni-Plus via DashScope API
|
| 4 |
|
| 5 |
Two modes:
|
| 6 |
1. Translation + TTS: Translate English text to target language, then generate speech
|
| 7 |
2. Direct TTS: Generate speech from English text directly
|
| 8 |
|
| 9 |
-
Deploy as a Hugging Face Space:
|
| 10 |
-
1. Create a new Space (SDK: Gradio)
|
| 11 |
-
2. Upload app.py and requirements.txt
|
| 12 |
-
3. Add DASHSCOPE_API_KEY as a Space Secret
|
| 13 |
"""
|
| 14 |
|
| 15 |
import os
|
|
@@ -600,7 +595,6 @@ And he would smile β that slow, careful smile that seemed to cost him somethin
|
|
| 600 |
DESCRIPTION = """
|
| 601 |
# π Audiobook Generator
|
| 602 |
### English Text β Multi-Language Audiobook
|
| 603 |
-
**Powered by Qwen3.5-Omni-Plus**
|
| 604 |
|
| 605 |
Paste or upload English text and get a professionally narrated audiobook in any of **36 languages**.
|
| 606 |
The AI translates and narrates with expressive, audiobook-quality speech.
|
|
@@ -701,15 +695,11 @@ with gr.Blocks(
|
|
| 701 |
# ββ Footer ββ
|
| 702 |
gr.Markdown(
|
| 703 |
"---\n"
|
| 704 |
-
"**How it works:** Your text is split into chunks, each sent to Qwen3.5-Omni-Plus "
|
| 705 |
-
"for translation (if needed) + speech synthesis, then assembled into a single MP3 audiobook.\n\n"
|
| 706 |
"**Supported languages (36):** Arabic, Bengali, Cantonese, Chinese, Czech, Danish, Dutch, "
|
| 707 |
"English, Filipino, Finnish, French, German, Greek, Hebrew, Hindi, Hungarian, Indonesian, "
|
| 708 |
"Italian, Japanese, Korean, Malay, Norwegian, Persian, Polish, Portuguese, Romanian, Russian, "
|
| 709 |
"Spanish, Swahili, Swedish, Tamil, Thai, Turkish, Ukrainian, Urdu, Vietnamese\n\n"
|
| 710 |
-
|
| 711 |
-
"API via [DashScope](https://www.alibabacloud.com/help/en/model-studio/)"
|
| 712 |
-
)
|
| 713 |
|
| 714 |
if __name__ == "__main__":
|
| 715 |
demo.launch()
|
|
|
|
| 1 |
"""
|
| 2 |
π Audiobook Generator β English Source to Multi-Language Audio
|
|
|
|
| 3 |
|
| 4 |
Two modes:
|
| 5 |
1. Translation + TTS: Translate English text to target language, then generate speech
|
| 6 |
2. Direct TTS: Generate speech from English text directly
|
| 7 |
|
|
|
|
|
|
|
|
|
|
|
|
|
| 8 |
"""
|
| 9 |
|
| 10 |
import os
|
|
|
|
| 595 |
DESCRIPTION = """
|
| 596 |
# π Audiobook Generator
|
| 597 |
### English Text β Multi-Language Audiobook
|
|
|
|
| 598 |
|
| 599 |
Paste or upload English text and get a professionally narrated audiobook in any of **36 languages**.
|
| 600 |
The AI translates and narrates with expressive, audiobook-quality speech.
|
|
|
|
| 695 |
# ββ Footer ββ
|
| 696 |
gr.Markdown(
|
| 697 |
"---\n"
|
|
|
|
|
|
|
| 698 |
"**Supported languages (36):** Arabic, Bengali, Cantonese, Chinese, Czech, Danish, Dutch, "
|
| 699 |
"English, Filipino, Finnish, French, German, Greek, Hebrew, Hindi, Hungarian, Indonesian, "
|
| 700 |
"Italian, Japanese, Korean, Malay, Norwegian, Persian, Polish, Portuguese, Romanian, Russian, "
|
| 701 |
"Spanish, Swahili, Swedish, Tamil, Thai, Turkish, Ukrainian, Urdu, Vietnamese\n\n"
|
| 702 |
+
)
|
|
|
|
|
|
|
| 703 |
|
| 704 |
if __name__ == "__main__":
|
| 705 |
demo.launch()
|