fffiloni commited on
Commit
160dd2e
β€’
1 Parent(s): 952f074

added warning if user forget prompt

Browse files
Files changed (1) hide show
  1. app.py +6 -0
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)