-
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
Allow multiple inputs #74
Comments
It's also an interesting question from the interface design perspective. model(signal, sampling_rate, input_1='high') The problem might be how to map the actual name of the input to the variable name as we cannot use stuff like Another solution would be that you provide a dictionary instead of the signal, then we can directly use the input names, e.g. model({'signal': signal, 'state': 0.34}, sampling_rate) Other ideas? |
Or a combination of the two solutions and we provide a dict for all inputs that don't get the signal: model(signal, sampling_rate, inputs={'state': 0.34}) |
I would be in favor of the second suggestion, with the dictionary as input.
Which is already rather close to the dict approach. |
I'm slightly more in favor of: model(signal, sampling_rate, inputs={'state': 0.34}) but I see your point that it does not cover the case, where we don't have an input signal. So maybe we go indeed with model({'signal': signal, 'state': 0.34}, sampling_rate) In the implementation we would provide a default for sampling rate, e.g. |
I am also not fixed on my suggestion.
I guess it's closer to our current solution and as we are focused on audio I also can't think of a case, where we would not start from a signal or something like a spectrogram derived from a signal.
Sounds great!
I also can't think of a case, where 2 different signals with 2 different sampling rates would be processed, by the same model. |
Currently audonnx.Model only takes a signal as input.
https://github.com/audeering/audonnx/blob/main/audonnx/core/model.py#L198-L209
For some models, however, it might be necessary to provide additional information.
E.g. in the case of an LSTM model, we would like to provide the last hidden state and the memory state as additional input.
This is currently impossible as all additional inputs are derived directly from the signal.
It would be great if we could provide an option to enable additional model inputs along side the signal.
The text was updated successfully, but these errors were encountered: