Klio Audio

latest release: 0.1.0 (What’s new?)

Current Status

Klio is currently under rapid development. This means that APIs and features will evolve. It is recommended that teams who adopt Klio today upgrade their installation as new releases become available, as backwards compatibility is not yet guaranteed.

klio-audio is an optional library with helper transforms related to processing audio, including downloading from GCS into memory, loading into numpy via librosa, generate various spectrograms, among others.

Installation

To make use of klio-audio, add klio[audio] in your job-requirements.txt file so that it is installed in your job’s Docker image.

As the klio-audio library is not meant to be installed directly, check out the installation guide for how to setup installation. There is also the user guide and the API documentation for more information.


klio_audio.decorators Module

handle_binary

Decorator to handle the required loading/unloading of binary data.

klio_audio.transforms.audio Module

LoadAudio

Load audio into memory as a numpy.ndarray.

GetSTFT

Calculate Short-time Fourier transform from a numpy.ndarray.

GetSpec

Generate a dB-scaled spectrogram from a numpy.ndarray.

GetMelSpec

Generate a spectrogram from a numpy.ndarray using the mel scale.

GetMFCC

Calculate MFCCs from a numpy.ndarray.

SpecToPlot

Generate a matplotlib figure of the spectrogram of a numpy.ndarray.

MelSpecToPlot

Generate a matplotlib figure of the mel spectrogram of a a numpy.ndarray.

MFCCToPlot

Generate a matplotlib figure of the MFCCs as a numpy.ndarray.

WaveformToPlot

Generate a matplotlib figure of the wave form of a numpy.ndarray.

klio_audio.transforms.io Module

GcsLoadBinary

Download binary file from GCS into memory.

GcsUploadPlot

Upload a matplotlib figure to GCS.