From dbc2282a34ebf70fb117d1b2ab3e463f820d74bd Mon Sep 17 00:00:00 2001 From: Aidan Pine Date: Thu, 14 Nov 2024 14:35:41 -0800 Subject: [PATCH] fix(demo): the raw text should be printed in the error message, not the normalized text --- everyvoice/demo/app.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/everyvoice/demo/app.py b/everyvoice/demo/app.py index 43ef0532..2ebe6819 100644 --- a/everyvoice/demo/app.py +++ b/everyvoice/demo/app.py @@ -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.")