Support getting word IDs for CTC HLG decoding. (#978)
This commit is contained in:
@@ -34,6 +34,8 @@ static void PybindOfflineRecognitionResult(py::module *m) { // NOLINT
|
||||
})
|
||||
.def_property_readonly("tokens",
|
||||
[](const PyClass &self) { return self.tokens; })
|
||||
.def_property_readonly("words",
|
||||
[](const PyClass &self) { return self.words; })
|
||||
.def_property_readonly(
|
||||
"timestamps", [](const PyClass &self) { return self.timestamps; });
|
||||
}
|
||||
|
||||
@@ -40,6 +40,9 @@ static void PybindOnlineRecognizerResult(py::module *m) {
|
||||
})
|
||||
.def_property_readonly(
|
||||
"segment", [](PyClass &self) -> int32_t { return self.segment; })
|
||||
.def_property_readonly(
|
||||
"words",
|
||||
[](PyClass &self) -> std::vector<int32_t> { return self.words; })
|
||||
.def_property_readonly(
|
||||
"is_final", [](PyClass &self) -> bool { return self.is_final; })
|
||||
.def("__str__", &PyClass::AsJsonString,
|
||||
|
||||
Reference in New Issue
Block a user