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.