Add score function to speaker identification (#775)

This commit is contained in:
chiiyeh
2024-04-16 17:29:46 +08:00
committed by GitHub
parent 6bf2099781
commit aa2d695fd2
3 changed files with 32 additions and 0 deletions

View File

@@ -60,6 +60,14 @@ void PybindSpeakerEmbeddingManager(py::module *m) {
return self.Verify(name, v.data(), threshold);
},
py::arg("name"), py::arg("v"), py::arg("threshold"),
py::call_guard<py::gil_scoped_release>())
.def(
"score",
[](const PyClass &self, const std::string &name,
const std::vector<float> &v) -> float {
return self.Score(name, v.data());
},
py::arg("name"), py::arg("v"),
py::call_guard<py::gil_scoped_release>());
}