Replies: 1 comment
-
Thanks for reaching out. Can you show an example of a Also, can you explain how does |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
First off, let me say, I love Lhotse. :)
However, I have some problems with the feature extractor API. Usually everything in Lhotse is quite sampling rate agnostic. the
Recording
class saves the sampling rate per recording, and even theextract
function of theFeatureExtractor
expects the sampling rate per sample.But then, the
FeatureExtractor
also requires implementing theframe_shift
property, which sometimes depends on the sampling rate. In these cases the sampling rate is assumed to be the same for every sample that is ingested by theFeatureExtractor
, usually an entireCutSet
. Even in the examples and recipes in the code base, sometimes theframe_shift
depends on the sampling rate, (which results in it being assumed to be equal for every input to the Extractor) and sometimes it does not.I am just wondering if there is a better way to handle this. The
frame_shift
in its current form is heavily validated, but hardly explained and I don't see any immediate reason for it to exist anyways. I feel it is cumbersome and requires too much working against Lhotse's implementation of theFeatureExtractor
API than working with it.I am not sure what would be the optimal solution but from a cursory look through the code base, you could:
frame_shift
property and validation or only validate whenframe_shift
is actually implemented.sampling_rate
argument from theextract
method to the__init__
to make it clear that a fixed sampling rate is expected for the entire FeatureSet, which seems to be the case for most implementations I have seen so far anyway.Again, I really love Lhotse and wanted to leave this feedback on a little piece of the code somewhere. I hope it helps :)
Beta Was this translation helpful? Give feedback.
All reactions