Skip to content

Commit

Permalink
Fix splitting sentences for MeloTTS (#1186)
Browse files Browse the repository at this point in the history
  • Loading branch information
csukuangfj authored Jul 29, 2024
1 parent b1711ec commit 86b4c9f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sherpa-onnx/csrc/melo-tts-lexicon.cc
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {};
}
Expand Down

0 comments on commit 86b4c9f

Please sign in to comment.