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.2.tar.gz (2.2 kB view details)

Uploaded Source

File details

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

File metadata

  • Download URL: audiofeatures-0.1.2.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.2.tar.gz
Algorithm Hash digest
SHA256 ac452fa9b7cb92c79f900f5a30562d41ee5911e8c1d42180528431ef5059c860
MD5 47c068ff0733b74522820d2cb79fa5c4
BLAKE2b-256 8bba6455b459c8b465a2a28a6cb2db680a26707f8182334f9fdfbe4af6a87f6c

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