Add Python API for source separation (#2283)

This commit is contained in:
Fangjun Kuang
2025-06-05 20:44:26 +08:00
committed by GitHub
parent 6f0fac2064
commit d57e4f84de
20 changed files with 599 additions and 23 deletions

View File

@@ -59,14 +59,14 @@ void PybindOfflineRecognizer(py::module *m) {
return self.CreateStream(hotwords);
},
py::arg("hotwords"), py::call_guard<py::gil_scoped_release>())
.def("decode_stream", &PyClass::DecodeStream,
.def("decode_stream", &PyClass::DecodeStream, py::arg("s"),
py::call_guard<py::gil_scoped_release>())
.def(
"decode_streams",
[](const PyClass &self, std::vector<OfflineStream *> ss) {
self.DecodeStreams(ss.data(), ss.size());
},
py::call_guard<py::gil_scoped_release>());
py::arg("ss"), py::call_guard<py::gil_scoped_release>());
}
} // namespace sherpa_onnx