Add C++ support for streaming NeMo CTC models. (#857)

This commit is contained in:
Fangjun Kuang
2024-05-10 16:26:43 +08:00
committed by GitHub
parent 1eb60e8711
commit 46e4e5b7ac
22 changed files with 782 additions and 41 deletions

View File

@@ -0,0 +1,22 @@
// sherpa-onnx/python/csrc/online-nemo-ctc-model-config.cc
//
// Copyright (c) 2024 Xiaomi Corporation
#include "sherpa-onnx/python/csrc/online-nemo-ctc-model-config.h"
#include <string>
#include <vector>
#include "sherpa-onnx/csrc/online-nemo-ctc-model-config.h"
namespace sherpa_onnx {
void PybindOnlineNeMoCtcModelConfig(py::module *m) {
using PyClass = OnlineNeMoCtcModelConfig;
py::class_<PyClass>(*m, "OnlineNeMoCtcModelConfig")
.def(py::init<const std::string &>(), py::arg("model"))
.def_readwrite("model", &PyClass::model)
.def("__str__", &PyClass::ToString);
}
} // namespace sherpa_onnx