正在显示
2 个修改的文件
包含
3 行增加
和
1 行删除
| @@ -15,7 +15,7 @@ void PybindOfflineLMConfig(py::module *m) { | @@ -15,7 +15,7 @@ void PybindOfflineLMConfig(py::module *m) { | ||
| 15 | py::class_<PyClass>(*m, "OfflineLMConfig") | 15 | py::class_<PyClass>(*m, "OfflineLMConfig") |
| 16 | .def(py::init<const std::string &, float, int32_t, const std::string &>(), | 16 | .def(py::init<const std::string &, float, int32_t, const std::string &>(), |
| 17 | py::arg("model"), py::arg("scale") = 0.5f, | 17 | py::arg("model"), py::arg("scale") = 0.5f, |
| 18 | - py::arg("lm_num_threads") = 1, py::arg("lm-provider") = "cpu") | 18 | + py::arg("lm_num_threads") = 1, py::arg("lm_provider") = "cpu") |
| 19 | .def_readwrite("model", &PyClass::model) | 19 | .def_readwrite("model", &PyClass::model) |
| 20 | .def_readwrite("scale", &PyClass::scale) | 20 | .def_readwrite("scale", &PyClass::scale) |
| 21 | .def_readwrite("lm_provider", &PyClass::lm_provider) | 21 | .def_readwrite("lm_provider", &PyClass::lm_provider) |
| @@ -156,6 +156,8 @@ class OfflineRecognizer(object): | @@ -156,6 +156,8 @@ class OfflineRecognizer(object): | ||
| 156 | lm_config = OfflineLMConfig( | 156 | lm_config = OfflineLMConfig( |
| 157 | model=lm, | 157 | model=lm, |
| 158 | scale=lm_scale, | 158 | scale=lm_scale, |
| 159 | + lm_num_threads=num_threads, | ||
| 160 | + lm_provider=provider, | ||
| 159 | ) | 161 | ) |
| 160 | 162 | ||
| 161 | recognizer_config = OfflineRecognizerConfig( | 163 | recognizer_config = OfflineRecognizerConfig( |
-
请 注册 或 登录 后发表评论