-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature: add option to call process function on a sliding window #54
Comments
Yes, seems to make sense to provide this.
|
Yes, I'm also not happy with it. Any suggestions? |
I think we have two options for the name. It could reflect that the interface will do it for use, e.g. The problem you describe in: win_dur=1.0
hop_dur=0.5
interface = audinterface.Feature(
'mean',
process_func=mean,
process_func_args={
'win_dur': win_dur,
'hop_dur': hop_dur,
},
win_dur=win_dur * 2,
hop_dur=hop_dur * 2,
) will not be solved by it. We could try to hand the |
I am not sure we have to pass |
I think there will be processing functions that cannot be executed without their build sliding window approach and for those we have to hand over |
Ah that you mean! Right, when the function applies the sliding window I don't see a way we can avoid a possible mismatch. |
In #60 it is now implemented so that the |
Currently, when working with a sliding window, the user is responsible to handle the windowing. Unless in the case that a function from an external library is called that already implements a sliding window, this makes it quite inconvenient for a user to work with this feature. E.g. the following (not very efficient) code is needed to just calculate the mean over a sliding window:
And it's also easy to mess up, e.g. the following would work, but produce wrong timestamps:
I think it would be very convenient to offer an option that the windowing is handled internally so that the user only has to provide the actual processing code, e.g.:
The text was updated successfully, but these errors were encountered: