连续换行造成的多了个None (#405)

小问题,gui好像没有这个问题,自己测试web的时候直接调用的函数发现的这个情况
pull/470/head
Alex Newton 2022-02-27 10:55:00 +08:00 committed by GitHub
parent 0536874dec
commit b79e9d68e4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 2 deletions

View File

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