Support Chinese polyphones in TTS (#409)

This commit is contained in:
Fangjun Kuang
2023-11-05 13:06:00 +08:00
committed by GitHub
parent 606cb26a62
commit 723e5265bb
2 changed files with 49 additions and 1 deletions

View File

@@ -7,6 +7,7 @@
#include <cstdint>
#include <iostream>
#include <regex>
#include <string>
#include <unordered_map>
#include <unordered_set>
@@ -79,6 +80,9 @@ class Lexicon {
Language language_;
bool debug_;
bool is_piper_;
// for Chinese polyphones
std::unique_ptr<std::regex> pattern_;
};
} // namespace sherpa_onnx