Add C++ and Python API for Kokoro 1.0 multilingual TTS model (#1795)
This commit is contained in:
@@ -16,13 +16,17 @@ void PybindOfflineTtsKokoroModelConfig(py::module *m) {
|
||||
py::class_<PyClass>(*m, "OfflineTtsKokoroModelConfig")
|
||||
.def(py::init<>())
|
||||
.def(py::init<const std::string &, const std::string &,
|
||||
const std::string &, const std::string &,
|
||||
const std::string &, const std::string &, float>(),
|
||||
py::arg("model"), py::arg("voices"), py::arg("tokens"),
|
||||
py::arg("data_dir"), py::arg("length_scale") = 1.0)
|
||||
py::arg("lexicon") = "", py::arg("data_dir"),
|
||||
py::arg("dict_dir") = "", py::arg("length_scale") = 1.0)
|
||||
.def_readwrite("model", &PyClass::model)
|
||||
.def_readwrite("voices", &PyClass::voices)
|
||||
.def_readwrite("tokens", &PyClass::tokens)
|
||||
.def_readwrite("lexicon", &PyClass::lexicon)
|
||||
.def_readwrite("data_dir", &PyClass::data_dir)
|
||||
.def_readwrite("dict_dir", &PyClass::dict_dir)
|
||||
.def_readwrite("length_scale", &PyClass::length_scale)
|
||||
.def("__str__", &PyClass::ToString)
|
||||
.def("validate", &PyClass::Validate);
|
||||
|
||||
Reference in New Issue
Block a user