Skip to content

Commit

Permalink
Fix KaldiFatalError inheritance (#23)
Browse files Browse the repository at this point in the history
  • Loading branch information
mmcauliffe authored Oct 3, 2024
1 parent 9ab07cc commit c0af5aa
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 2 additions & 3 deletions extensions/util/util.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ void init_util(py::module &_m) {
PYBIND11_CONSTINIT static py::gil_safe_call_once_and_store<py::object> exc_storage;

exc_storage.call_once_and_store_result(
[&]() { return py::exception<KaldiFatalError>(m, "KaldiFatalError"); });
[&]() { return py::exception<KaldiFatalError>(m, "KaldiFatalError", PyExc_RuntimeError); });

py::register_exception_translator([](std::exception_ptr p) {
try {
Expand All @@ -88,8 +88,7 @@ void init_util(py::module &_m) {
py::set_error(exc_storage.get_stored(), e.KaldiMessage());
}
});
//py::register_exception<KaldiFatalError>(m, "PyKaldiFatalError", PyExc_RuntimeError);
//py::register_local_exception<KaldiFatalError>(m, "PyKaldiFatalError", PyExc_RuntimeError);

pybind_basic_vector_holder<int32>(m, "IntVectorHolder");
py::class_<std::istream>(m, "istream");
{
Expand Down
1 change: 1 addition & 0 deletions kalpy/gmm/align.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c0af5aa

Please sign in to comment.