Skip to content

Commit

Permalink
fix(demo): the raw text should be printed in the error message, not t…
Browse files Browse the repository at this point in the history
…he normalized text
  • Loading branch information
roedoejet committed Nov 14, 2024
1 parent 7b68fac commit dbc2282
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions everyvoice/demo/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,14 +48,14 @@ def synthesize_audio(
norm_text = normalize_text(text)
if allowlist and norm_text not in allowlist:
raise gr.Error(
f"Oops, the word {norm_text} is not allowed to be synthesized by this model. Please contact the model owner."
f"Oops, the word {text} is not allowed to be synthesized by this model. Please contact the model owner."
)
if denylist:
norm_words = norm_text.split()
for word in norm_words:
if word in denylist:
raise gr.Error(
f"Oops, the word {norm_text} is not allowed to be synthesized by this model. Please contact the model owner."
f"Oops, the word {text} is not allowed to be synthesized by this model. Please contact the model owner."
)
if language is None:
raise gr.Error("Language is not selected. Please select a language.")
Expand Down

0 comments on commit dbc2282

Please sign in to comment.