Skip to main content

Simplified Python Audio-Features Extraction.

Project description

Spafe

Simplified Python Audio Features Extraction

Build Status docs.rs License Python codecov codebeat badge PyPI version anaconda Downloads DOI

Table of Contents

Structure

spafe aims to simplify feature extractions from mono audio files. Spafe includes various computations related to filter banks, spectrograms, frequencies and cepstral features . The library has the following structure:

Filter banks

  • Bark filter banks
  • Gammatone filter banks
  • Linear filter banks
  • Mel filter banks

Spectrograms

  • Bark spectrogram
  • CQT spectrogram
  • Erb spectrogram
  • Mel spectrogram

Features

  • Bark Frequency Cepstral Coefficients (BFCCs)
  • Constant Q-transform Cepstral Coefficients (CQCCs)
  • Gammatone Frequency Cepstral Coefficients (GFCCs)
  • Linear Frequency Cepstral Coefficients (LFCCs)
  • Linear Prediction Components (LPCs)
  • Mel Frequency Cepstral Coefficients (MFCCs)
  • Inverse Mel Frequency Cepstral Coefficients (IMFCCs)
  • Magnitude based Spectral Root Cepstral Coefficients (MSRCCs)
  • Normalized Gammachirp Cepstral Coefficients (NGCCs)
  • Power-Normalized Cepstral Coefficients (PNCCs)
  • Phase based Spectral Root Cepstral Coefficients (PSRCCs)
  • Perceptual Linear Prediction Coefficents (PLPs)
  • Rasta Perceptual Linear Prediction Coefficents (RPLPs)

The theory behind features computed using spafe can be summmarized in the following graph:

Frequencies

  • Dominant frequencies
  • Fundamental frequencies

Installation

Dependencies

spafe requires:

if you want to use the visualization module/ functions of spafe, you will need to install:

Installation guide

Once you have the Dependencies installed, use one of the following install options.

Install from PyPI

  • To freshly install spafe:
pip install spafe
  • To update an existing installation:
pip install -U spafe

Install from Anaconda

  • Spafe is also available on anaconda:
conda install spafe

Install from source

  • You can build spafe from source, by following:
git clone git@github.com:SuperKogito/spafe.git
cd spafe
python setup.py install

Why use Spafe?

Unlike most existing audio feature extraction libraries (python_speech_features, SpeechPy, surfboard and Bob), Spafe provides more options for spectral features extraction algorithms, notably:

  • Bark Frequency Cepstral Coefficients (BFCCs)
  • Constant Q-transform Cepstral Coefficients (CQCCs)
  • Gammatone Frequency Cepstral Coefficients (GFCCs)
  • Power-Normalized Cepstral Coefficients (PNCCs)
  • Phase based Spectral Root Cepstral Coefficients (PSRCCs)

Most existing libraries and to their credits provide great implementations for features extraction but are unfortunately limited to the Mel Frequency Features (MFCC) and at best have Bark frequency and linear predictive coefficients additionally. Librosa for example includes great implementation of various algorithms (only MFCC and LPC are included), based on the Short Time Fourrier Transform (STFT), which is theoretically more accurate but slower than the Discret Fourrier Transform used in Spafe's implementation.

How to use

Various examples on how to use spafe are present in the documentation https://superkogito.github.io/spafe.

<!> Please make sure you are referring to the correct documentation version.

Contributing

Contributions are welcome and encouraged. To learn more about how to contribute to spafe please refer to the Contributing guidelines

Citing

  • If you want to cite spafe as a software used in your work, please cite the version used as indexed at Zenodo: DOI

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

spafe-0.3.1.tar.gz (50.1 kB view details)

Uploaded Source

Built Distributions

spafe-0.3.1-py3.8.egg (201.4 kB view details)

Uploaded Source

spafe-0.3.1-py3-none-any.whl (93.4 kB view details)

Uploaded Python 3

File details

Details for the file spafe-0.3.1.tar.gz.

File metadata

  • Download URL: spafe-0.3.1.tar.gz
  • Upload date:
  • Size: 50.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.13

File hashes

Hashes for spafe-0.3.1.tar.gz
Algorithm Hash digest
SHA256 dc8281af23bd192f5f3681fae2dbf4818ee668752076d10adced05f30a8e56be
MD5 ea913684d151968445200118439753b8
BLAKE2b-256 a4d557e0cef4a1716180451420a06e5393f2c7113b9f1d5dbad7d0551cec3986

See more details on using hashes here.

Provenance

File details

Details for the file spafe-0.3.1-py3.8.egg.

File metadata

  • Download URL: spafe-0.3.1-py3.8.egg
  • Upload date:
  • Size: 201.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.13

File hashes

Hashes for spafe-0.3.1-py3.8.egg
Algorithm Hash digest
SHA256 eaf21520134038f616de4778c8755ff8c2a104635397aebe4c8d935df6f91f08
MD5 f77dda2c71f78c718965de36aaf6060b
BLAKE2b-256 09a470fdb7c8b50cda49b0c0f73c61634a25ed971efc590af328d413a6f23b46

See more details on using hashes here.

Provenance

File details

Details for the file spafe-0.3.1-py3-none-any.whl.

File metadata

  • Download URL: spafe-0.3.1-py3-none-any.whl
  • Upload date:
  • Size: 93.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.8.13

File hashes

Hashes for spafe-0.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 6e6ab2374022ea8bab637595fc85dbcd044a770ffff2ad4366f9b1acf4566daf
MD5 379730e00fabd43b4a4588fc17788e46
BLAKE2b-256 97cf0bc358d014c5c0ffb7b045d48cb8e0383b0a22382cd6bd86da0cbb84b1d3

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page