-
Notifications
You must be signed in to change notification settings - Fork 80
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
v1.4.0 build api #106
Comments
I overall think it's fine. I really prefer having one access point to using pysox - the build function. The perhaps more worrying thing is that the |
I've looked a bit into the I think the |
We could possibly do both by adding some convenience functions that call build in different ways? For example, |
@pseeth yeah this is what I had in mind with option C. We'd need to keep I'm currently leaning towards "B" but I'll need to see how it looks under the hood. |
👀 |
Closed in #107 |
So far, in 1.4.0a0, we've overloaded the build API to support 4 cases:
status = tfm.build(input_filepath=..., output_filepath=...)
status, out, err = tfm.build(input_filepath=...)
status = tfm.build(input_array=..., sample_rate_in=..., output_filepath=...)
status, out, err = tfm.build(input_array=..., sample_rate_in=...)
The pros:
The cons:
Do we want to keep it this way? Some other alternatives:
A. write 4 separate functions. We keep
build
as file in-file out for backwards compatiblity and define 3 new functions for the other casesB. write 2 separate functions, one for file output and one for array output, keeping the input argument logic (e.g.
build
andbuild_array
, similar to @pseeth 's original PR) in order to support either file or array input for both functionsC. keep
build
as it is currently, and write 4 additional wrapper functions for each of the 4 cases that internally callbuild
... other ideas?
Would love to hear people's thoughts.
cc @pseeth @nicolamontecchio @psobot @carlthome @hadware @lostanlen
The text was updated successfully, but these errors were encountered: