From 531047f15517a9179a4f77aa415c77550bfc0fe1 Mon Sep 17 00:00:00 2001 From: Fangjun Kuang Date: Tue, 31 Dec 2024 12:43:22 +0800 Subject: [PATCH] Add missing files --- sherpa-onnx/csrc/jieba-lexicon.cc | 6 +++++- sherpa-onnx/python/sherpa_onnx/__init__.py | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/sherpa-onnx/csrc/jieba-lexicon.cc b/sherpa-onnx/csrc/jieba-lexicon.cc index 6bc9a4c97..9ea11f46f 100644 --- a/sherpa-onnx/csrc/jieba-lexicon.cc +++ b/sherpa-onnx/csrc/jieba-lexicon.cc @@ -133,7 +133,7 @@ class JiebaLexicon::Impl { std::vector> puncts = { {",", ","}, {".", "。"}, {"!", "!"}, {"?", "?"}, {":", ":"}, - {"\"", "“"}, {"\"", "”"}, {"'", "‘"}, {"'", "’"}, + {"\"", "“"}, {"\"", "”"}, {"'", "‘"}, {"'", "’"}, {";", ";"}, }; for (const auto &p : puncts) { @@ -149,6 +149,10 @@ class JiebaLexicon::Impl { if (!token2id_.count("、") && token2id_.count(",")) { token2id_["、"] = token2id_[","]; } + + if (!token2id_.count(";") && token2id_.count(",")) { + token2id_[";"] = token2id_[","]; + } } void InitLexicon(std::istream &is) { diff --git a/sherpa-onnx/python/sherpa_onnx/__init__.py b/sherpa-onnx/python/sherpa_onnx/__init__.py index 2d5e456dc..330c8d2df 100644 --- a/sherpa-onnx/python/sherpa_onnx/__init__.py +++ b/sherpa-onnx/python/sherpa_onnx/__init__.py @@ -20,6 +20,7 @@ OfflineStream, OfflineTts, OfflineTtsConfig, + OfflineTtsMatchaModelConfig, OfflineTtsModelConfig, OfflineTtsVitsModelConfig, OfflineZipformerAudioTaggingModelConfig,