Code refactoring (#74)
* Don't reset model state and feature extractor on endpointing * support passing decoding_method from commandline * Add modified_beam_search to Python API * fix C API example * Fix style issues
This commit is contained in:
18
sherpa-onnx/python/csrc/display.cc
Normal file
18
sherpa-onnx/python/csrc/display.cc
Normal file
@@ -0,0 +1,18 @@
|
||||
// sherpa-onnx/python/csrc/display.cc
|
||||
//
|
||||
// Copyright (c) 2023 Xiaomi Corporation
|
||||
|
||||
#include "sherpa-onnx/python/csrc/display.h"
|
||||
|
||||
#include "sherpa-onnx/csrc/display.h"
|
||||
|
||||
namespace sherpa_onnx {
|
||||
|
||||
void PybindDisplay(py::module *m) {
|
||||
using PyClass = Display;
|
||||
py::class_<PyClass>(*m, "Display")
|
||||
.def(py::init<int32_t>(), py::arg("max_word_per_line") = 60)
|
||||
.def("print", &PyClass::Print, py::arg("idx"), py::arg("s"));
|
||||
}
|
||||
|
||||
} // namespace sherpa_onnx
|
||||
Reference in New Issue
Block a user