An open API service indexing awesome lists of open source software.

https://github.com/nils-werner/stft

Spectrogram calculation for NumPy
https://github.com/nils-werner/stft

audio-analysis fft scipy signal-processing stft

Last synced: about 1 month ago
JSON representation

Spectrogram calculation for NumPy

Awesome Lists containing this project

README

        

STFT
====

[![Build Status](https://travis-ci.org/nils-werner/stft.svg?branch=master)](https://travis-ci.org/nils-werner/stft)
[![Docs Status](https://readthedocs.org/projects/stft/badge/?version=latest)](https://stft.readthedocs.org/en/latest/)

This is a package for calculating the short time fourier transform (spectrogram) or any
other transform in a lapped and windowed fashion.

Installation
------------

You can install this library using `pip`:

pip install stft

Usage
-----

Loading a file and calculating the spectrogram, its inverse and saving the
result.

import stft
import scipy.io.wavfile as wav

fs, audio = wav.read('input.wav')
specgram = stft.spectrogram(audio)
output = stft.ispectrogram(specgram)
wav.write('output.wav', fs, output)