Add Python API example for CED audio tagging. (#793)

This commit is contained in:
Fangjun Kuang
2024-04-19 18:33:18 +08:00
committed by GitHub
parent c1608b3524
commit 54bc504065
2 changed files with 122 additions and 3 deletions

View File

@@ -29,9 +29,9 @@ static void PybindAudioTaggingModelConfig(py::module *m) {
.def(py::init<>())
.def(py::init<const OfflineZipformerAudioTaggingModelConfig &,
const std::string &, int32_t, bool, const std::string &>(),
py::arg("zipformer"), py::arg("ced") = "",
py::arg("num_threads") = 1, py::arg("debug") = false,
py::arg("provider") = "cpu")
py::arg("zipformer") = OfflineZipformerAudioTaggingModelConfig{},
py::arg("ced") = "", py::arg("num_threads") = 1,
py::arg("debug") = false, py::arg("provider") = "cpu")
.def_readwrite("zipformer", &PyClass::zipformer)
.def_readwrite("num_threads", &PyClass::num_threads)
.def_readwrite("debug", &PyClass::debug)