Add C++ runtime and Python API for NeMo Canary models (#2352)
This commit is contained in:
@@ -19,7 +19,8 @@ static void PybindOfflineRecognizerConfig(py::module *m) {
|
||||
const std::string &, int32_t, const std::string &, float,
|
||||
float, const std::string &, const std::string &,
|
||||
const HomophoneReplacerConfig &>(),
|
||||
py::arg("feat_config"), py::arg("model_config"),
|
||||
py::arg("feat_config") = FeatureExtractorConfig(),
|
||||
py::arg("model_config") = OfflineModelConfig(),
|
||||
py::arg("lm_config") = OfflineLMConfig(),
|
||||
py::arg("ctc_fst_decoder_config") = OfflineCtcFstDecoderConfig(),
|
||||
py::arg("decoding_method") = "greedy_search",
|
||||
@@ -61,6 +62,8 @@ void PybindOfflineRecognizer(py::module *m) {
|
||||
py::arg("hotwords"), py::call_guard<py::gil_scoped_release>())
|
||||
.def("decode_stream", &PyClass::DecodeStream, py::arg("s"),
|
||||
py::call_guard<py::gil_scoped_release>())
|
||||
.def("set_config", &PyClass::SetConfig, py::arg("config"),
|
||||
py::call_guard<py::gil_scoped_release>())
|
||||
.def(
|
||||
"decode_streams",
|
||||
[](const PyClass &self, std::vector<OfflineStream *> ss) {
|
||||
|
||||
Reference in New Issue
Block a user