Add HLG decoding for streaming CTC models (#731)
This commit is contained in:
23
sherpa-onnx/python/csrc/online-ctc-fst-decoder-config.cc
Normal file
23
sherpa-onnx/python/csrc/online-ctc-fst-decoder-config.cc
Normal file
@@ -0,0 +1,23 @@
|
||||
// sherpa-onnx/python/csrc/online-ctc-fst-decoder-config.cc
|
||||
//
|
||||
// Copyright (c) 2024 Xiaomi Corporation
|
||||
|
||||
#include "sherpa-onnx/python/csrc/online-ctc-fst-decoder-config.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
#include "sherpa-onnx/csrc/online-ctc-fst-decoder-config.h"
|
||||
|
||||
namespace sherpa_onnx {
|
||||
|
||||
void PybindOnlineCtcFstDecoderConfig(py::module *m) {
|
||||
using PyClass = OnlineCtcFstDecoderConfig;
|
||||
py::class_<PyClass>(*m, "OnlineCtcFstDecoderConfig")
|
||||
.def(py::init<const std::string &, int32_t>(), py::arg("graph") = "",
|
||||
py::arg("max_active") = 3000)
|
||||
.def_readwrite("graph", &PyClass::graph)
|
||||
.def_readwrite("max_active", &PyClass::max_active)
|
||||
.def("__str__", &PyClass::ToString);
|
||||
}
|
||||
|
||||
} // namespace sherpa_onnx
|
||||
Reference in New Issue
Block a user