• Stars
    star
    451
  • Rank 96,968 (Top 2 %)
  • Language
    Python
  • License
    BSD 3-Clause "New...
  • Created about 5 years ago
  • Updated 5 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

🔉 spafe: Simplified Python Audio Features Extraction

Spafe

Simplified Python Audio Features Extraction

Build Status docs.rs License Python codecov codebeat badge PyPI version anaconda Downloads DOI 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 [email protected]: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, please cite the version used as indexed in Zenodo:

    Ayoub Malek, Hadrien Titeux, Stefano Borzì, Christian Heider Nielsen, Fabian-Robert Stöter, Hervé BREDIN, & Kevin Mattheus Moerman. (2023). SuperKogito/spafe: v0.3.2 (v0.3.2). Zenodo. https://doi.org/10.5281/zenodo.7686438

    DOI

  • You can also site spafe's paper as follows:

    Malek, A., (2023). Spafe: Simplified python audio features extraction. Journal of Open Source Software, 8(81), 4739, https://doi.org/10.21105/joss.04739

    DOI

More Repositories

1

SER-datasets

A collection of datasets for the purpose of emotion recognition/detection in speech.
HTML
287
star
2

Voice-based-gender-recognition

🔉 👦 👧Voice based gender recognition using Mel-frequency cepstrum coefficients (MFCC) and Gaussian mixture models (GMM)
Python
200
star
3

pydiogment

📣 Python library for audio augmentation
Python
83
star
4

Voice-based-speaker-identification

🔉 👦 👧 👩 👨 Speaker identification using voice MFCCs and GMM
Python
52
star
5

CoinMarketCapScraper

a small python scraper to scrape historical data from the CoinMarketCap website and convert it to csv files . This is an initial step for a data mining process to develop a predictive model of cryptocurrencies prices.
CSS
18
star
6

sphinxcontrib-pdfembed

Sphinx extension to embedd a pdf file viewer in documentation webpages
Python
18
star
7

SuperKogito.github.io

💬 🔗 personal blog & website
Jupyter Notebook
7
star
8

Port-scanner

A light weight port scanner with a small gui using python 3 and tkinter.
Python
5
star
9

conky-cryptoTrio

A conky theme displaying real-time prices of Bitcoin (BTC), Ethereum (ETH), Litecoin (LTC).
Shell
5
star
10

Texhide

A light-weight stenographic gui-tool to hide secret messages in images.
Python
4
star
11

Morse-coder

Morse code generator and player with a gui interface.
Python
3
star
12

COVID-19-study

A study of COVID-19 in Tunisia and Germany (scripts can be used for other countries.)
Jupyter Notebook
3
star
13

conky-cryptoList

A conky theme displaying a list of Top10 crypto-currenciences on Coinmarketcap and their associated price and 24h-change.
Shell
3
star
14

pyvimaps

Simple top layer geodata vizualization/mapping library.
Python
3
star
15

ReadTex

Text to speech converter and player based on google api.
Python
2
star
16

SuperKogito

my profile readme
2
star
17

Diabetes-detection-using-machine-learning

Diabetes detection using machine learning
Python
2
star
18

chai3d_haptic_multiplayer_pingpong

Implementation of a multiplayer (TCP / UDP) pingpong game played with haptic device (Novint Falcon)
C++
2
star
19

ASR-datasets

a collection of ASR-datasets
CSS
2
star
20

fastft

Implementation of [Librosa](https://github.com/librosa/librosa) like [STFT](https://en.wikipedia.org/wiki/Short-time_Fourier_transform) using [FFTW](https://www.fftw.org/)
C
2
star
21

Cryptos

Just a light AES-128bits encrypter and hash-generator (SHA-256) with a gui interface (tkinter).
Python
2
star
22

maps-of-tunisia

A collection of data geovisualization for Tunisia
JavaScript
2
star
23

Crypto_implementations_example

various cryptographic implementations example using Contiki Os on TI cc2650 sensortag
C
2
star
24

Job-interviews-and-technical-tasks

A collection of job interviews and technical tasks I went through.
Python
1
star