Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -23,6 +23,9 @@ We're **celebrating the release of the whisperspeech** at [the LAION community,
|
|
| 23 |
Input text with the language identifiers provided to create a multilingual speech. Optionally you can add an audiosample to make a voice print. Scroll down and try the api <3 Gradio.
|
| 24 |
"""
|
| 25 |
|
|
|
|
|
|
|
|
|
|
| 26 |
# Function to parse the multilingual input text
|
| 27 |
def parse_multilingual_text(input_text):
|
| 28 |
pattern = r"<(\w+)>\s(.*?)\s(?=<\w+>|$)"
|
|
@@ -72,8 +75,8 @@ with gr.Blocks() as demo:
|
|
| 72 |
output_audio = gr.Audio(label="Generated Speech")
|
| 73 |
generate_button = gr.Button("Try 🌟Collabora🌬️💬📝WhisperSpeech")
|
| 74 |
with gr.Row():
|
| 75 |
-
text_input = gr.Textbox(label="Enter multilingual text", placeholder="e.g., <en> Hello <fr> Bonjour <es> Hola"
|
| 76 |
-
speaker_input = gr.Audio(label="Upload or Record Speaker Audio (optional)", sources=["upload", "microphone"]
|
| 77 |
with gr.Accordion("Available Languages and Their Tags"):
|
| 78 |
language_list = "\n".join([f"{lang}: {LANGUAGES[lang]}" for lang in LANGUAGES])
|
| 79 |
gr.Markdown(language_list)
|
|
|
|
| 23 |
Input text with the language identifiers provided to create a multilingual speech. Optionally you can add an audiosample to make a voice print. Scroll down and try the api <3 Gradio.
|
| 24 |
"""
|
| 25 |
|
| 26 |
+
# text examples=["<en> Hello, how are you? <fr> Bonjour, comment ça va?", "<de> Guten Tag <it> Buongiorno <jp> こんにちは"]
|
| 27 |
+
# audio examples=["path/to/tonic.wav"]
|
| 28 |
+
|
| 29 |
# Function to parse the multilingual input text
|
| 30 |
def parse_multilingual_text(input_text):
|
| 31 |
pattern = r"<(\w+)>\s(.*?)\s(?=<\w+>|$)"
|
|
|
|
| 75 |
output_audio = gr.Audio(label="Generated Speech")
|
| 76 |
generate_button = gr.Button("Try 🌟Collabora🌬️💬📝WhisperSpeech")
|
| 77 |
with gr.Row():
|
| 78 |
+
text_input = gr.Textbox(label="Enter multilingual text", placeholder="e.g., <en> Hello <fr> Bonjour <es> Hola")
|
| 79 |
+
speaker_input = gr.Audio(label="Upload or Record Speaker Audio (optional)", sources=["upload", "microphone"])
|
| 80 |
with gr.Accordion("Available Languages and Their Tags"):
|
| 81 |
language_list = "\n".join([f"{lang}: {LANGUAGES[lang]}" for lang in LANGUAGES])
|
| 82 |
gr.Markdown(language_list)
|