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)
Built Distribution
Close
Hashes for AudioFeaturizer-2.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | db94c8458c1e77d42e9311b53d34aaf0f7f04181fb59a2c76c3bdb44d665b088 |
|
MD5 | dc1d7f5b0d709f0c27825cb47f1bf386 |
|
BLAKE2b-256 | 3cf53fd57d5a621a22b9e03f91c22e956a88ceaf57cc13c14a9dcd1d41ca65b6 |