added warnings
Browse files
app.py
CHANGED
@@ -73,7 +73,7 @@ def load_hidden_mic(audio_in):
|
|
73 |
except OSError as e:
|
74 |
print(f"Error: {folder_path} - {e.strerror}")
|
75 |
else:
|
76 |
-
print(f"OK, the folder a raw recorded sample does not exist: {folder_path}")
|
77 |
|
78 |
if os.path.exists(second_folder_path):
|
79 |
try:
|
@@ -82,7 +82,7 @@ def load_hidden_mic(audio_in):
|
|
82 |
except OSError as e:
|
83 |
print(f"Error: {second_folder_path} - {e.strerror}")
|
84 |
else:
|
85 |
-
print(f"Ok, the
|
86 |
|
87 |
return audio_in
|
88 |
|
@@ -207,6 +207,7 @@ NEW INFERENCE:
|
|
207 |
""")
|
208 |
if prompt == "":
|
209 |
gr.Warning("Do not forget to provide a tts prompt !")
|
|
|
210 |
|
211 |
print(f"USING VOICE LIBRARY: {c_name}")
|
212 |
# Split the text into sentences based on common punctuation marks
|
@@ -223,9 +224,14 @@ NEW INFERENCE:
|
|
223 |
|
224 |
else:
|
225 |
prompt = prompt
|
226 |
-
|
227 |
-
print(f"Generating audio from prompt with {c_name} ;)")
|
228 |
|
|
|
|
|
|
|
|
|
|
|
|
|
229 |
tts.tts_to_file(text=prompt,
|
230 |
file_path="output.wav",
|
231 |
voice_dir="examples/library/",
|
|
|
73 |
except OSError as e:
|
74 |
print(f"Error: {folder_path} - {e.strerror}")
|
75 |
else:
|
76 |
+
print(f"OK, the folder for a raw recorded sample does not exist: {folder_path}")
|
77 |
|
78 |
if os.path.exists(second_folder_path):
|
79 |
try:
|
|
|
82 |
except OSError as e:
|
83 |
print(f"Error: {second_folder_path} - {e.strerror}")
|
84 |
else:
|
85 |
+
print(f"Ok, the folder for a cleaned recorded sample does not exist: {second_folder_path}")
|
86 |
|
87 |
return audio_in
|
88 |
|
|
|
207 |
""")
|
208 |
if prompt == "":
|
209 |
gr.Warning("Do not forget to provide a tts prompt !")
|
210 |
+
print("Warning about prompt sent to user")
|
211 |
|
212 |
print(f"USING VOICE LIBRARY: {c_name}")
|
213 |
# Split the text into sentences based on common punctuation marks
|
|
|
224 |
|
225 |
else:
|
226 |
prompt = prompt
|
227 |
+
|
|
|
228 |
|
229 |
+
if c_name == "":
|
230 |
+
gr.Warning("Voice character is not properly selected. Please ensure that the name of the chosen voice is specified in the Voice Name input.")
|
231 |
+
print("Warning about Voice Name sent to user")
|
232 |
+
else:
|
233 |
+
print(f"Generating audio from prompt with {c_name} ;)")
|
234 |
+
|
235 |
tts.tts_to_file(text=prompt,
|
236 |
file_path="output.wav",
|
237 |
voice_dir="examples/library/",
|