added warning if user forget prompt
Browse files
app.py
CHANGED
@@ -124,6 +124,9 @@ def infer(prompt, input_wav_file, clean_audio, hidden_numpy_audio):
|
|
124 |
NEW INFERENCE:
|
125 |
βββββββ
|
126 |
""")
|
|
|
|
|
|
|
127 |
if clean_audio is True :
|
128 |
print("We want to clean audio sample")
|
129 |
# Extract the file name without the extension
|
@@ -202,6 +205,9 @@ def infer_from_c(prompt, c_name):
|
|
202 |
NEW INFERENCE:
|
203 |
βββββββ
|
204 |
""")
|
|
|
|
|
|
|
205 |
print(f"USING VOICE LIBRARY: {c_name}")
|
206 |
# Split the text into sentences based on common punctuation marks
|
207 |
sentences = re.split(r'(?<=[.!?])\s+', prompt)
|
|
|
124 |
NEW INFERENCE:
|
125 |
βββββββ
|
126 |
""")
|
127 |
+
if prompt === "":
|
128 |
+
gr.Warning("Do not forget to provide a tts prompt !")
|
129 |
+
|
130 |
if clean_audio is True :
|
131 |
print("We want to clean audio sample")
|
132 |
# Extract the file name without the extension
|
|
|
205 |
NEW INFERENCE:
|
206 |
βββββββ
|
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
|
213 |
sentences = re.split(r'(?<=[.!?])\s+', prompt)
|