diff --git a/.flake8 b/.flake8 index 8285441..eb09e54 100644 --- a/.flake8 +++ b/.flake8 @@ -5,6 +5,7 @@ exclude = .git, build, build_release, + cmake/cmake_extension.py, kaldifeat/python/kaldifeat/__init__.py ignore = diff --git a/kaldifeat/python/kaldifeat/__init__.py b/kaldifeat/python/kaldifeat/__init__.py index 60c6443..ea39003 100644 --- a/kaldifeat/python/kaldifeat/__init__.py +++ b/kaldifeat/python/kaldifeat/__init__.py @@ -10,5 +10,7 @@ from _kaldifeat import ( from .fbank import Fbank, OnlineFbank from .mfcc import Mfcc, OnlineMfcc +from .offline_feature import OfflineFeature +from .online_feature import OnlineFeature from .plp import OnlinePlp, Plp from .spectrogram import Spectrogram diff --git a/kaldifeat/python/kaldifeat/online_feature.py b/kaldifeat/python/kaldifeat/online_feature.py index cf687cf..2acf67f 100644 --- a/kaldifeat/python/kaldifeat/online_feature.py +++ b/kaldifeat/python/kaldifeat/online_feature.py @@ -91,5 +91,15 @@ class OnlineFeature(object): """ self.computer.input_finished() + @property + def dim(self) -> int: + """Return the feature dimension of this extractor""" + return self.computer.dim + + @property + def frame_shift_in_seconds(self) -> int: + """Return frame shift in seconds of this extractor""" + return self.computer.frame_shift_in_seconds + def __getstate__(self): return self.opts.as_dict()