Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -134,7 +134,7 @@ async def main(
|
|
134 |
onnx_models = detect_onnx_models(models_path)
|
135 |
lan.load_language(speaker)
|
136 |
if len(text_input) == 0:
|
137 |
-
|
138 |
# speaker_selection = widgets.Dropdown(
|
139 |
# options=[],
|
140 |
# description=f'{lan.translate(lang, "Select speaker")}:',
|
@@ -163,9 +163,9 @@ async def main(
|
|
163 |
# temp_audio_file = os.path.join(temp_dir, "generated_audio.mp3")
|
164 |
|
165 |
# Check if text_input is more than 200 characters
|
166 |
-
|
167 |
# Truncate text_input to 200 characters
|
168 |
-
|
169 |
|
170 |
# Rename the audio file based on the text input
|
171 |
renamed_audio_file = os.path.join(temp_dir, f"{text_input}.mp3")
|
|
|
134 |
onnx_models = detect_onnx_models(models_path)
|
135 |
lan.load_language(speaker)
|
136 |
if len(text_input) == 0:
|
137 |
+
text_input = "1, 2, 3. This is a test. Enter some text to generate."
|
138 |
# speaker_selection = widgets.Dropdown(
|
139 |
# options=[],
|
140 |
# description=f'{lan.translate(lang, "Select speaker")}:',
|
|
|
163 |
# temp_audio_file = os.path.join(temp_dir, "generated_audio.mp3")
|
164 |
|
165 |
# Check if text_input is more than 200 characters
|
166 |
+
if len(text_input) > 200:
|
167 |
# Truncate text_input to 200 characters
|
168 |
+
text_input = text_input[:200]
|
169 |
|
170 |
# Rename the audio file based on the text input
|
171 |
renamed_audio_file = os.path.join(temp_dir, f"{text_input}.mp3")
|