Skip to main content

Takes audio as input and returns computed features as a dataframe

Project description

AudioFeaturizer

AudioFeaturizer is a python package that uses librosa under the hood and extracts features from audio and returns it into a pandas dataframe. It also has a spectrogram generation function which generates spectrogram of the audio file path which is passed.

Installation

You can install the AudioFeaturizer from PyPI:

pip install AudioFeaturizer

The reader is supported on Python 3.7 and above.

How to Use

For Extracting Features from single file

>>> from AudioFeaturizer.audio_featurizer import *
>>> audio_process(r'D:\PYTHON_FILES\audio-ml\genres\classical\classical.00000.wav')
   chroma_stft      rmse  spectral_centroid  spectral_bandwidth  ...    mfcc17    mfcc18    mfcc19    mfcc20
0     0.252391  0.036255        1505.299012         1558.952849  ... -0.303796  1.778557  0.890328 -0.837884

[1 rows x 26 columns]
>>>

For Displaying Spectrogram

from AudioFeaturizer.audio_featurizer import *

spectrogram_plot(r'D:\PYTHON_FILES\audio-ml\genres\classical\classical.00000.wav')

For Processing a list of files

In[0]: from AudioFeaturizer.audio_featurizer import audio_process_list
       audio_process_list([r"D:\PYTHON_FILES\audio classification\Man Out Of Town.wav",
                           r"D:\PYTHON_FILES\audio classification\Trumpet Tune.wav"])

Out[0]: 
   chroma_stft      rmse  spectral_centroid  ...    mfcc18    mfcc19    mfcc20
0     0.407153  0.201064        2507.575812  ... -2.347450 -5.120735  3.309853
1     0.276051  0.030480        1467.355071  ... -2.594764 -4.458375  1.309751
[2 rows x 26 columns]

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

AudioFeaturizer-2.2.0.tar.gz (19.6 kB view hashes)

Uploaded Source

Built Distribution

AudioFeaturizer-2.2.0-py3-none-any.whl (4.6 kB view hashes)

Uploaded Python 3

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