fast-short-time-fft
Fast Short-Time FFT — 7× faster than scipy.signal.ShortTimeFFT, bit-identical.
Vectorized, CPU-only (pocketfft, no GPU). One batched rfft per signal vs per-slice Python loop.
from fast_short_time_fft import FastShortTimeFFT
import numpy as np
SFT = FastShortTimeFFT(win=np.hanning(256), hop=64, fs=8000) # same API as scipy
Sx = SFT.stft(x) # (129, p_num) — exact as scipy, 7× faster
# or
from fast_short_time_fft import stft
Sx = stft(x, win=np.hanning(256), hop=64, fs=8000)
For 1k wavs (8kHz, avg 2s, 250k frames): 0.66s vs scipy 3.3s (median, incl. I/O).
Repo: https://github.com/yonikremer/fast-short-time-fft
Install
pip install fast-short-time-fft
CLI
fast-stft sounds/*.wav --hop 64 --mfft 256 --workers 6
Why faster
Scipy loops for p in 250k: rfft(x_*win) in Python (10µs overhead per 256-pt FFT). This batches all p_num frames per file: pad → as_strided view → frames*win → rfft(workers=6).T — 1k Python calls vs 250k, one AVX *win, one batched C FFT with 6 threads. Same pad/win/rfft math → max err 0.
License
MIT
Metadata
Release files for fast-short-time-fft 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| fast_short_time_fft-0.1.0.tar.gz | 5.0 kB | Without provenance | Details for fast_short_time_fft-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| fast_short_time_fft-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for fast_short_time_fft-0.1.0-py3-none-any.whl |
Total release size: 10.8 kB
Release files / fast_short_time_fft-0.1.0.tar.gz
| Download URL | fast_short_time_fft-0.1.0.tar.gz |
|---|---|
| Size | 5.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
381ec46ce46e5631da958bbaa41b326f70024300441e5ea58cefb5ed614f1789
|
|
BLAKE2b-256 checksum How to use checksums |
da83c180a992ed42230435f1d08214abab1a03fd8430232427cf1a83e9ade7f0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.0
|
Release files / fast_short_time_fft-0.1.0-py3-none-any.whl
| Download URL | fast_short_time_fft-0.1.0-py3-none-any.whl |
|---|---|
| Size | 5.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2d212fcb14a40e002dc8b0305c867d8123b6a0e74fc835e16e114ad5e9e7e957
|
|
BLAKE2b-256 checksum How to use checksums |
22e99b46634e48fe1e7ec8da047630ff13f92f2155126e483021711349a36ec7
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.0
|
Security for fast-short-time-fft 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.