#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.

Stars
947
License
MIT
Last commit
May 2026
Last release
May 2026
Language
Python
Stars, last 28 weeks+2
16 May 2026: 945 stars23 May 2026: 945 stars30 May 2026: 945 stars6 Jun 2026: 945 stars13 Jun 2026: 945 stars20 Jun 2026: 945 stars27 Jun 2026: 945 stars4 Jul 2026: 946 stars11 Jul 2026: 947 stars18 Jul 2026: 947 stars25 Jul 2026: 947 stars1 Aug 2026: 947 stars8 Aug 2026: 947 stars15 Aug 2026: 947 stars22 Aug 2026: 947 stars29 Aug 2026: 947 stars5 Sept 2026: 947 stars12 Sept 2026: 947 stars19 Sept 2026: 947 stars26 Sept 2026: 947 stars3 Oct 2026: 947 stars10 Oct 2026: 947 stars17 Oct 2026: 947 stars24 Oct 2026: 947 stars31 Oct 2026: 947 stars7 Nov 2026: 947 stars14 Nov 2026: 947 stars21 Nov 2026: 947 stars28 Nov 2026: 947 stars

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
Also in ML frameworks and libraries
RankProjectScore
#392pmdarimaPython auto-ARIMA time series forecasting library with a scikit-learn style API1.7k starsMITno commits in a year22 out of 100
#393hazmPython library for Persian text normalization, tokenization, tagging and parsing1.4k starsMIT22 out of 100
#395deep-person-reidPyTorch library for training and evaluating person re-identification models5k starsMIT21 out of 100
#396hierarchical-localizationPython toolbox for 6-DoF visual localization and Structure-from-Motion Live demo ↗ (opens in a new tab)4.3k starsApache-2.021 out of 100
#397dgl-keTrains knowledge graph embeddings on CPU, GPU or clusters, built on DGL1.3k starsApache-2.021 out of 100