Begin to support CTC models (#119)
Please see https://k2-fsa.github.io/sherpa/onnx/pretrained_models/offline-ctc/nemo/index.html for a list of pre-trained CTC models from NeMo.
This commit is contained in:
@@ -31,7 +31,6 @@ static void PybindOfflineRecognitionResult(py::module *m) { // NOLINT
|
||||
"timestamps", [](const PyClass &self) { return self.timestamps; });
|
||||
}
|
||||
|
||||
|
||||
static void PybindOfflineFeatureExtractorConfig(py::module *m) {
|
||||
using PyClass = OfflineFeatureExtractorConfig;
|
||||
py::class_<PyClass>(*m, "OfflineFeatureExtractorConfig")
|
||||
@@ -42,7 +41,6 @@ static void PybindOfflineFeatureExtractorConfig(py::module *m) {
|
||||
.def("__str__", &PyClass::ToString);
|
||||
}
|
||||
|
||||
|
||||
void PybindOfflineStream(py::module *m) {
|
||||
PybindOfflineFeatureExtractorConfig(m);
|
||||
PybindOfflineRecognitionResult(m);
|
||||
@@ -55,7 +53,7 @@ void PybindOfflineStream(py::module *m) {
|
||||
self.AcceptWaveform(sample_rate, waveform.data(), waveform.size());
|
||||
},
|
||||
py::arg("sample_rate"), py::arg("waveform"), kAcceptWaveformUsage)
|
||||
.def_property_readonly("result", &PyClass::GetResult);
|
||||
.def_property_readonly("result", &PyClass::GetResult);
|
||||
}
|
||||
|
||||
} // namespace sherpa_onnx
|
||||
|
||||
Reference in New Issue
Block a user