STFT-based pitch and timbre shifting library for audio processing, supporting real-time and file-based transformations. Version 2.0 includes major API changes, improved latency, and WebAssembly support. Released under the MIT license.
pip install stftpitchshiftVerified import paths — ran on the pinned version, not inferred.
Load an audio file, apply pitch shifting, and save the result.
Update code to use `PitchShift().shiftpitch(audio, samplerate, factor)` instead of `stft(...)`.
Use `TimbreShift().shifttimbre(audio, samplerate, factor)` for timbre shifting.
Convert audio to mono and float32 before processing: `audio = audio.mean(axis=1) if audio.ndim > 1 else audio; audio = audio.astype(np.float32)`.
Use the new `PitchShift` and `TimbreShift` classes.