Fangjun Kuang
Committed by GitHub

Fix initialize TTS in Python. (#1664)

@@ -23,8 +23,10 @@ void PybindOfflineTtsModelConfig(py::module *m) { @@ -23,8 +23,10 @@ void PybindOfflineTtsModelConfig(py::module *m) {
23 .def(py::init<const OfflineTtsVitsModelConfig &, 23 .def(py::init<const OfflineTtsVitsModelConfig &,
24 const OfflineTtsMatchaModelConfig &, int32_t, bool, 24 const OfflineTtsMatchaModelConfig &, int32_t, bool,
25 const std::string &>(), 25 const std::string &>(),
26 - py::arg("vits"), py::arg("matcha"), py::arg("num_threads") = 1,  
27 - py::arg("debug") = false, py::arg("provider") = "cpu") 26 + py::arg("vits") = OfflineTtsVitsModelConfig{},
  27 + py::arg("matcha") = OfflineTtsMatchaModelConfig{},
  28 + py::arg("num_threads") = 1, py::arg("debug") = false,
  29 + py::arg("provider") = "cpu")
28 .def_readwrite("vits", &PyClass::vits) 30 .def_readwrite("vits", &PyClass::vits)
29 .def_readwrite("matcha", &PyClass::matcha) 31 .def_readwrite("matcha", &PyClass::matcha)
30 .def_readwrite("num_threads", &PyClass::num_threads) 32 .def_readwrite("num_threads", &PyClass::num_threads)