Support Chinese vits models (#368)

This commit is contained in:
Fangjun Kuang
2023-10-18 10:19:10 +08:00
committed by GitHub
parent 9efe69720d
commit 1ee79e3ff5
16 changed files with 326 additions and 62 deletions

View File

@@ -0,0 +1,21 @@
// sherpa-onnx/csrc/utfcpp-test.cc
//
// Copyright (c) 2023 Xiaomi Corporation
#include <cctype>
#include <string>
#include "gtest/gtest.h"
#include "sherpa-onnx/csrc/text-utils.h"
namespace sherpa_onnx {
TEST(UTF8, Case1) {
std::string hello = "你好, 早上好!世界. hello!。Hallo";
std::vector<std::string> ss = SplitUtf8(hello);
for (const auto &s : ss) {
std::cout << s << "\n";
}
}
} // namespace sherpa_onnx