#394394th of 433 in ML frameworks and librariesFor voice, speech and music
kapre
Keras layers that compute STFT and mel-spectrograms on GPU inside the model
Run it:Vast.ai ↗ (opens in a new tab)Clore.ai ↗ (opens in a new tab)Affiliate links, no effect on a rank.
Watch puts kapre on your watch list: its new releases and known problems since your last visit. Kept in this browser, no account.kapre is on your watch list. Its new releases and problems show there.
- Stars
- 947
- License
- MIT
- Last commit
- May 2026
- Last release
- May 2026
- Language
- Python
945 on 16 May 2026947 on 28 Nov 2026
From GitHub's daily star counts.
Checked on GitHub.
Overview
Kapre provides Keras layers for audio preprocessing (STFT, inverse STFT, magnitude, decibel, mel-spectrogram, log-frequency spectrogram) so raw waveforms go straight into the model. DSP parameters such as n_fft become tunable hyperparameters, and deployment needs only the sampling rate. Layers are tested against Librosa and support channels_first and channels_last.
Who it is for: Keras/TensorFlow users building audio models from raw waveforms
Strengths
- STFT and InverseSTFT pair is invertible, with extra mel-spectrogram options beyond tf.signal
- Layers are tested against Librosa for STFT and decibel output
- Preprocessing lives inside the model, so deployment has fewer dependencies
- Supports multichannel input and both channels_first and channels_last formats
Weaknesses
- TensorFlow/Keras only; tested with TensorFlow 2.16-2.20
- Standard STFT layer is not TFLite compatible
- TFLite replacement layers are limited to batch size 1, so they cannot be used for training
- Covers audio time-frequency transforms only, not a general audio toolkit
What it needs
- GPU optional
- Needs TensorFlow 2.16-2.20, Python 3.9+
- Models: Keras, TensorFlow, TFLite (via STFTTflite and MagnitudeTflite)
What changed
From the release notes. No flag means the note does not say so, not that the upgrade is safe. Releases and problems by RSS
Also in ML frameworks and libraries
See all 433| Rank | Project | Score |
|---|---|---|
| #392 | pmdarimaPython auto-ARIMA time series forecasting library with a scikit-learn style API | 22 out of 100 |
| #393 | hazmPython library for Persian text normalization, tokenization, tagging and parsing | 22 out of 100 |
| #395 | deep-person-reidPyTorch library for training and evaluating person re-identification models | 21 out of 100 |
| #396 | hierarchical-localizationPython toolbox for 6-DoF visual localization and Structure-from-Motion | 21 out of 100 |
| #397 | dgl-keTrains knowledge graph embeddings on CPU, GPU or clusters, built on DGL | 21 out of 100 |