From b79e9d68e417e85583b1a1306dd6ad30fa1966af Mon Sep 17 00:00:00 2001
From: Alex Newton <35657483+Diaosi1111@users.noreply.github.com>
Date: Sun, 27 Feb 2022 10:55:00 +0800
Subject: [PATCH] =?UTF-8?q?=E8=BF=9E=E7=BB=AD=E6=8D=A2=E8=A1=8C=E9=80=A0?=
 =?UTF-8?q?=E6=88=90=E7=9A=84=E5=A4=9A=E4=BA=86=E4=B8=AANone=20(#405)?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

小问题,gui好像没有这个问题,自己测试web的时候直接调用的函数发现的这个情况
---
 web/__init__.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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()