Support Android (#59)
This commit is contained in:
@@ -21,13 +21,12 @@ static void PybindOnlineRecognizerConfig(py::module *m) {
|
||||
using PyClass = OnlineRecognizerConfig;
|
||||
py::class_<PyClass>(*m, "OnlineRecognizerConfig")
|
||||
.def(py::init<const FeatureExtractorConfig &,
|
||||
const OnlineTransducerModelConfig &, const std::string &,
|
||||
const EndpointConfig &, bool>(),
|
||||
py::arg("feat_config"), py::arg("model_config"), py::arg("tokens"),
|
||||
const OnlineTransducerModelConfig &, const EndpointConfig &,
|
||||
bool>(),
|
||||
py::arg("feat_config"), py::arg("model_config"),
|
||||
py::arg("endpoint_config"), py::arg("enable_endpoint"))
|
||||
.def_readwrite("feat_config", &PyClass::feat_config)
|
||||
.def_readwrite("model_config", &PyClass::model_config)
|
||||
.def_readwrite("tokens", &PyClass::tokens)
|
||||
.def_readwrite("endpoint_config", &PyClass::endpoint_config)
|
||||
.def_readwrite("enable_endpoint", &PyClass::enable_endpoint)
|
||||
.def("__str__", &PyClass::ToString);
|
||||
|
||||
@@ -14,13 +14,14 @@ void PybindOnlineTransducerModelConfig(py::module *m) {
|
||||
using PyClass = OnlineTransducerModelConfig;
|
||||
py::class_<PyClass>(*m, "OnlineTransducerModelConfig")
|
||||
.def(py::init<const std::string &, const std::string &,
|
||||
const std::string &, int32_t, bool>(),
|
||||
const std::string &, const std::string &, int32_t, bool>(),
|
||||
py::arg("encoder_filename"), py::arg("decoder_filename"),
|
||||
py::arg("joiner_filename"), py::arg("num_threads"),
|
||||
py::arg("debug") = false)
|
||||
py::arg("joiner_filename"), py::arg("tokens"),
|
||||
py::arg("num_threads"), py::arg("debug") = false)
|
||||
.def_readwrite("encoder_filename", &PyClass::encoder_filename)
|
||||
.def_readwrite("decoder_filename", &PyClass::decoder_filename)
|
||||
.def_readwrite("joiner_filename", &PyClass::joiner_filename)
|
||||
.def_readwrite("tokens", &PyClass::tokens)
|
||||
.def_readwrite("num_threads", &PyClass::num_threads)
|
||||
.def_readwrite("debug", &PyClass::debug)
|
||||
.def("__str__", &PyClass::ToString);
|
||||
|
||||
Reference in New Issue
Block a user