A python wrapper for rubberband.
For now, this just provides lightweight wrappers for pitch-shifting and time-stretching.
All processing is done via the command-line through files on disk. In the future, this could be improved by directly wrapping the C library instead.
brew install https://gist.githubusercontent.com/faroit/b67c1708cdc1f9c4ddc9/raw/942bbedded22f05abab0d09b52383e7be4aee237/rubberband.rb >>> import soundfile as sf >>> import pyrubberband as pyrb >>> # Read mono wav file >>> y, sr = sf.read("test.wav") >>> # Play back at double speed >>> y_stretch = pyrb.time_stretch(y, sr, 2.0) >>> # Pass rbargs supported in Rubberband CLI. See(rubberband -h or https://breakfastquay.com/rubberband/usage.txt) >>> y_stretch = pyrb.time_stretch(y, sr, 2.0, rbargs={'-c':'5', '--no_transients':''})