Fix splitting sentences for MeloTTS (#1186)

This commit is contained in:
Fangjun Kuang
2024-07-29 17:04:45 +08:00
committed by GitHub
parent b1711ecaa1
commit 86b4c9f535

View File

@@ -103,7 +103,8 @@ class MeloTtsLexicon::Impl {
this_sentence.tones.insert(this_sentence.tones.end(), ids.tones.begin(),
ids.tones.end());
if (w == "." || w == "!" || w == "?" || w == ",") {
if (w == "." || w == "!" || w == "?" || w == "," || w == "" ||
w == "" || w == "" || w == "") {
ans.push_back(std::move(this_sentence));
this_sentence = {};
}