rework python api #28
Labels
ergonomics
python
anything related to the python api or where python code is needed
question
Further information is requested
When we initially created the code, we wanted the match the API of speechpy exactly, so that it would be a drop in replacement for it. With the shift to emulating librosa, this isn't possible, at least not without handling some of the logic python side, as certain patterns like specifying an optional preexisting output in the arguments would be painful to try to emulate in rust. There is also the issue that we're making use of interior mutablity patterns as certain functions require state, but it's only possible to have mutable references to longer lived objects(rust structs as python objects). It's likely to break if they tried to call these functions in multiple threads but I'm not exactly sure of the semantics of calling clone on a struct containing refcell.
so given that it we have 2 options:
the latter has a few advantages in terms of design rust side, whereas the former is closer to what is common for the existing python libraries providing this functionality
The text was updated successfully, but these errors were encountered: