From 86b4c9f5359de154c5d04229712da9a73245d865 Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Mon, 29 Jul 2024 17:04:45 +0800 Subject: [PATCH] Fix splitting sentences for MeloTTS (#1186) --- sherpa-onnx/csrc/melo-tts-lexicon.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/sherpa-onnx/csrc/melo-tts-lexicon.cc b/sherpa-onnx/csrc/melo-tts-lexicon.cc index 561aaa276..fb39de8d2 100644 --- a/sherpa-onnx/csrc/melo-tts-lexicon.cc +++ b/sherpa-onnx/csrc/melo-tts-lexicon.cc @@ -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 = {}; }