swipe
swipe copied to clipboard
Reason for coupling file reading and algorithm?
Currently, the algorithm is coupled to reading audio files, while I actually see no reason for that.
In my mind, swipe() should accept an array of floats and process them, and reading files should be placed into main().
That way, the Python wrapper would be more useful when used with NumPy, where you very often already have read the audio file into memory.
Okay. Do you want to refactor? FWIW I think many Python users are unfamiliar with loading a wave file into a numpy vector, so an illustrative example will be needed.
On Tue, Mar 26, 2019 at 4:57 AM Nils Werner [email protected] wrote:
Currently, the algorithm is coupled to reading audio files https://github.com/kylebgorman/swipe/blob/master/swipe.c#L362, while I actually see no reason for that.
In my mind, swipe() should accept an array of floats and process them, and reading files should be placed into main().
That way, the Python wrapper would be more useful when used with NumPy, where you very often already have read the audio file into memory.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/kylebgorman/swipe/issues/12, or mute the thread https://github.com/notifications/unsubscribe-auth/AAJuOecd16QGMAcnWfOM-QCKYVwRuDQsks5vaeDbgaJpZM4cK55h .