From 15c63d43c6016b81ffd895b05ea341c8ce088ab7 Mon Sep 17 00:00:00 2001 From: Michael McAuliffe Date: Thu, 3 Oct 2024 09:10:59 -0700 Subject: [PATCH] Fix KaldiFatalError inheritance --- extensions/util/util.cpp | 5 ++--- kalpy/gmm/align.py | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/extensions/util/util.cpp b/extensions/util/util.cpp index 19818c3..f0b296b 100644 --- a/extensions/util/util.cpp +++ b/extensions/util/util.cpp @@ -79,7 +79,7 @@ void init_util(py::module &_m) { PYBIND11_CONSTINIT static py::gil_safe_call_once_and_store exc_storage; exc_storage.call_once_and_store_result( - [&]() { return py::exception(m, "KaldiFatalError"); }); + [&]() { return py::exception(m, "KaldiFatalError", PyExc_RuntimeError); }); py::register_exception_translator([](std::exception_ptr p) { try { @@ -88,8 +88,7 @@ void init_util(py::module &_m) { py::set_error(exc_storage.get_stored(), e.KaldiMessage()); } }); - //py::register_exception(m, "PyKaldiFatalError", PyExc_RuntimeError); - //py::register_local_exception(m, "PyKaldiFatalError", PyExc_RuntimeError); + pybind_basic_vector_holder(m, "IntVectorHolder"); py::class_(m, "istream"); { diff --git a/kalpy/gmm/align.py b/kalpy/gmm/align.py index 105e58d..dce97ba 100644 --- a/kalpy/gmm/align.py +++ b/kalpy/gmm/align.py @@ -104,6 +104,7 @@ def align_utterances( logger.warning(f"Skipping {utterance_id} due to missing training graph") continue try: + logger.debug(f"Processing {utterance_id}") alignment = self.align_utterance(training_graph, feats, utterance_id) if alignment is None: yield utterance_id, None