Release Python GIL in C++ class constructor (#493)
This commit is contained in:
@@ -24,7 +24,8 @@ void PybindVoiceActivityDetector(py::module *m) {
|
||||
using PyClass = VoiceActivityDetector;
|
||||
py::class_<PyClass>(*m, "VoiceActivityDetector")
|
||||
.def(py::init<const VadModelConfig &, float>(), py::arg("config"),
|
||||
py::arg("buffer_size_in_seconds") = 60)
|
||||
py::arg("buffer_size_in_seconds") = 60,
|
||||
py::call_guard<py::gil_scoped_release>())
|
||||
.def(
|
||||
"accept_waveform",
|
||||
[](PyClass &self, const std::vector<float> &samples) {
|
||||
|
||||
Reference in New Issue
Block a user