Release Python GIL in C++ class constructor (#493)
This commit is contained in:
@@ -48,7 +48,8 @@ void PybindOfflineTts(py::module *m) {
|
||||
|
||||
using PyClass = OfflineTts;
|
||||
py::class_<PyClass>(*m, "OfflineTts")
|
||||
.def(py::init<const OfflineTtsConfig &>(), py::arg("config"))
|
||||
.def(py::init<const OfflineTtsConfig &>(), py::arg("config"),
|
||||
py::call_guard<py::gil_scoped_release>())
|
||||
.def_property_readonly("sample_rate", &PyClass::SampleRate)
|
||||
.def(
|
||||
"generate",
|
||||
|
||||
Reference in New Issue
Block a user