Use piper-phonemize to convert text to token IDs (#453)
This commit is contained in:
@@ -30,10 +30,14 @@ static void PybindOfflineTtsConfig(py::module *m) {
|
||||
using PyClass = OfflineTtsConfig;
|
||||
py::class_<PyClass>(*m, "OfflineTtsConfig")
|
||||
.def(py::init<>())
|
||||
.def(py::init<const OfflineTtsModelConfig &, const std::string &>(),
|
||||
py::arg("model"), py::arg("rule_fsts") = "")
|
||||
.def(py::init<const OfflineTtsModelConfig &, const std::string &,
|
||||
int32_t>(),
|
||||
py::arg("model"), py::arg("rule_fsts") = "",
|
||||
py::arg("max_num_sentences") = 2)
|
||||
.def_readwrite("model", &PyClass::model)
|
||||
.def_readwrite("rule_fsts", &PyClass::rule_fsts)
|
||||
.def_readwrite("max_num_sentences", &PyClass::max_num_sentences)
|
||||
.def("validate", &PyClass::Validate)
|
||||
.def("__str__", &PyClass::ToString);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user