stftpitchshift
STFT based pitch and timbre shifting
Decision gist · record as of 2026-08-14
Yes, if you need STFT-based pitch shifting with formant preservation. The library is stable, permissively licensed, has low install friction, and no known vulnerabilities. The aging maintenance status (last release December 2023) is a minor concern for long-term support but not a blocker for current use. Install if you're building audio processing tools or need precise spectral pitch control.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires audio data as a list or array-like object; no built-in file I/O in the library itself, though the command-line tool handles .wav files.
- Low friction install via pip with only three runtime dependencies (click, matplotlib, numpy).
- Repository is aging but not abandoned—last commit September 2025, 194 stars, no recent releases since December 2023.
License · maintenance · safety
MIT (permissive) — MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions.
last release 2023-12-12 (976 days) · last repo commit 2025-09-13 · 194 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 80,775 downloads/mo, #14,273 on PyPI
Alternatives
Verify before relying
pip install stftpitchshift
from stftpitchshift import StftPitchShift
pitchshifter = StftPitchShift(1024, 256, 44100)
x = [0] * 44100
y = pitchshifter.shiftpitch(x, 1)- Real-time performance characteristics and latency for interactive applications.
- Accuracy of formant preservation across different voice types and frequencies.
- Poly pitch shifting quality when combining many simultaneous pitch shifts.
What it is and what it does
stftpitchshift is a Python library that shifts the pitch and timbre of audio signals using STFT-based spectral analysis. It implements the instantaneous frequency estimation technique (vocoder) to decompose audio into magnitude and frequency components, then resamples those components according to a pitch shift factor. The library also includes formant preservation via cepstral analysis to reduce the Mickey Mouse effect that occurs when pitch-shifting vocal audio.
The package comes as both a library for embedding in Python projects and a command-line tool for batch processing .wav files. It depends on click for CLI support, numpy for numerical operations, and matplotlib for visualization. The core algorithm is inspired by Stephan M. Bernsee's smbPitchShift and supports mono pitch shifting, polyphonic pitch shifting (multiple simultaneous pitch shifts in a single frame), and optional RMS normalization.
Use it for
- Shift vocal recordings to different keys without changing playback speed.
- Correct pitch issues in recorded audio or apply creative pitch effects.
- Preserve vocal formants while shifting pitch to avoid unnatural-sounding results.
- Combine multiple pitch shifts simultaneously in a single STFT frame for harmonic synthesis.
- Batch-process .wav files from the command line with configurable window sizes and overlap.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes, if you need STFT-based pitch shifting with formant preservation.
The library is stable, permissively licensed, has low install friction, and no known vulnerabilities. The aging maintenance status (last release December 2023) is a minor concern for long-term support but not a blocker for current use. Install if you're building audio processing tools or need precise spectral pitch control.
Install
stftpitchshift on PyPI
Before you install
Low friction install via pip with only three runtime dependencies (click, matplotlib, numpy). Repository is aging but not abandoned—last commit September 2025, 194 stars, no recent releases since December 2023.
Requires audio data as a list or array-like object; no built-in file I/O in the library itself, though the command-line tool handles .wav files.
License in practice
MIT license is permissive; you can use, modify, and distribute this package freely with minimal restrictions.
Quickstart
pip install stftpitchshift
from stftpitchshift import StftPitchShift
pitchshifter = StftPitchShift(1024, 256, 44100)
x = [0] * 44100
y = pitchshifter.shiftpitch(x, 1)
Verify before relying
- Real-time performance characteristics and latency for interactive applications.
- Accuracy of formant preservation across different voice types and frequencies.
- Poly pitch shifting quality when combining many simultaneous pitch shifts.
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesclickmatplotlibnumpy |
| Maintenance | Aging 976 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 80,775 / month, #14,273 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersIntended Audience :: EducationIntended Audience :: Other AudienceIntended Audience :: Science/ResearchLicense :: OSI Approved :: MIT LicenseProgramming Language :: C++Programming Language :: Python :: 3Topic :: Artistic SoftwareTopic :: EducationTopic :: Multimedia :: Sound/AudioTopic :: Multimedia :: Sound/Audio :: AnalysisTopic :: Multimedia :: Sound/Audio :: Sound SynthesisTopic :: Scientific/EngineeringTopic :: Software Development :: Libraries |
Evidence: stftpitchshift-2.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “pitch shifting audio”
- stftpitchshiftShifts the pitch and timbre of audio signals using Short-Time Fourier…
- python-stretchPitch-shifts and time-stretches audio using the Signalsmith Stretch…
- pyrubberbandProvides Python wrappers for time-stretching and pitch-shifting audio…
Give your agent the search over MCP, or paste the wish link into any chat.
More Libraries packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.
Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
See also python-stretch · basic-pitch · pyrubberband · audiomentations · sox · pyworld · torchcrepe · torchfcpe · vocos