Skip to main content

Extract MFCC, spectral, and pitch features from audio files

Project description

audiofeatures

audiofeatures is a lightweight Python library for extracting features from .wav audio files using librosa. It can extract MFCCs, spectral features, and pitch for machine learning or audio analysis tasks.


Features

  • Extract MFCC mean and standard deviation (13 coefficients)
  • Compute Zero Crossing Rate (ZCR)
  • Compute RMS energy
  • Compute Spectral features: centroid, bandwidth, rolloff, contrast
  • Compute pitch mean and standard deviation
  • Returns results as a pandas DataFrame

Installation

pip install audiofeatures

Usage

Extract audio features from a single file

from audiofeatures import extract_audio_features

df = extract_audio_features("sample.wav")
print(df.head())

Example Output

The extract_audio_features() function returns a pandas DataFrame with columns like:

mfcc_mean_1, mfcc_mean_2, ..., mfcc_std_13,
zcr, rms, spec_centroid, spec_bandwidth, spec_rolloff, spec_contrast,
pitch_mean, pitch_std

Dependencies

  • librosa
  • numpy
  • pandas

License

MIT License


Author

Dhyan Sudheer

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

audiofeatures-0.1.6.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

audiofeatures-0.1.6-py3-none-any.whl (2.6 kB view details)

Uploaded Python 3

File details

Details for the file audiofeatures-0.1.6.tar.gz.

File metadata

  • Download URL: audiofeatures-0.1.6.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for audiofeatures-0.1.6.tar.gz
Algorithm Hash digest
SHA256 d815b607d6005025722ede0182079e8b00e046183cad3407e10c1fa7b9dab43a
MD5 ccb93a55e985a445e150d22063a291e0
BLAKE2b-256 acc5a6be6391c4b588d0bf91162b36efa8baba26014c488d73ca336475358a97

See more details on using hashes here.

File details

Details for the file audiofeatures-0.1.6-py3-none-any.whl.

File metadata

  • Download URL: audiofeatures-0.1.6-py3-none-any.whl
  • Upload date:
  • Size: 2.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.5

File hashes

Hashes for audiofeatures-0.1.6-py3-none-any.whl
Algorithm Hash digest
SHA256 a57e8dfc523005643d57d40421c844fc387fe3e5934d853b0d3b007c3a9ad3c8
MD5 b4dcd1e8a349722e69f068acb946f57a
BLAKE2b-256 63b45a272dcd1fe1c506925d0d50db406b1444689855ac09d7f679237fdea4fc

See more details on using hashes here.

Supported by

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