diff --git a/web/__init__.py b/web/__init__.py index e0bf9ca..4afc920 100644 --- a/web/__init__.py +++ b/web/__init__.py @@ -94,7 +94,7 @@ def webApp(): embed, _, _ = encoder.embed_utterance(encoder_wav, return_partials=True) # Load input text - texts = request.form["text"].split("\n") + texts = filter(None, request.form["text"].split("\n")) punctuation = '!,。、,' # punctuate and split/clean text processed_texts = [] for text in texts: @@ -131,4 +131,4 @@ def webApp(): return app if __name__ == "__main__": - webApp() \ No newline at end of file + webApp()