This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

UNKNOWN

Project Description

Usage

Zounds is a dataflow library for building directed acyclic graphs that transform audio. It uses the featureflow library to define the processing pipelines.

For example, here’s the definition of a pipeline that computes a sliding short-time fourier transform of some audio, and then computes spectrograms on the bark and chroma scales.

import featureflow as ff
import zounds

windowing = zounds.HalfLapped()
samplerate = zounds.SR44100()


class Settings(ff.PersistenceSettings):
    id_provider = ff.UuidProvider()
    key_builder = ff.StringDelimitedKeyBuilder()
    database = ff.FileSystemDatabase(path='data', key_builder=key_builder)


class AudioGraph(ff.BaseModel):

    meta = ff.JSONFeature(
        zounds.MetaData,
        encoder=zounds.AudioMetaDataEncoder,
        store=True)

    raw = ff.ByteStreamFeature(
        ff.ByteStream,
        chunksize=2 * 44100 * 30 * 2,
        needs=meta,
        store=False)

    ogg = zounds.OggVorbisFeature(
        zounds.OggVorbis,
        needs=raw,
        store=True)

    pcm = zounds.ConstantRateTimeSeriesFeature(
        zounds.AudioStream,
        needs=raw,
        store=False)

    resampled = zounds.ConstantRateTimeSeriesFeature(
        zounds.Resampler,
        needs=pcm,
        samplerate=samplerate,
        store=False)

    windowed = zounds.ConstantRateTimeSeriesFeature(
        zounds.SlidingWindow,
        needs=resampled,
        wscheme=zounds.HalfLapped(),
        wfunc=zounds.OggVorbisWindowingFunc(),
        store=False)

    fft = zounds.ConstantRateTimeSeriesFeature(
        zounds.FFT,
        needs=windowed,
        store=False)

    bark = zounds.ConstantRateTimeSeriesFeature(
        zounds.BarkBands,
        needs=fft,
        store=True)

    chroma = zounds.ConstantRateTimeSeriesFeature(
        zounds.Chroma,
        needs=fft,
        store=True)

    bfcc = zounds.ConstantRateTimeSeriesFeature(
        zounds.BFCC,
        needs=fft,
        store=True)


class Document(AudioGraph, Settings):
    pass

Data can be processed, and later retrieved as follows:

>>> _id = doc = Document.process(meta='https://example.com/audio.wav')
>>> doc = Document(_id)
>>> doc.chroma.shape
(321, 12)

Installation

Libsndfile Issues

Installation currently requires you to build lbiflac and libsndfile from source, because of an outstanding issue that will be corrected when the apt package is updated to libsndfile 1.0.26. Download and run this script to handle this step.

Numpy and Scipy

The Anaconda python distribution is highly recommended.

Zounds

Finally, just:

pip install zounds
Release History

Release History

This version
History Node

0.20.11

History Node

0.20.10

History Node

0.20.9

History Node

0.19.9

History Node

0.18.9

History Node

0.17.9

History Node

0.16.9

History Node

0.15.9

History Node

0.14.9

History Node

0.13.9

History Node

0.11.9

History Node

0.10.9

History Node

0.10.8

History Node

0.10.7

History Node

0.9.7

History Node

0.8.7

History Node

0.8.6

History Node

0.8.5

History Node

0.8.4

History Node

0.7.4

History Node

0.6.4

History Node

0.5.4

History Node

0.4.4

History Node

0.4.3

History Node

0.4.2

History Node

0.4.1

History Node

0.3.1

History Node

0.3.0

History Node

0.2.9

History Node

0.2.8

History Node

0.2.7

History Node

0.1.6

History Node

0.1.3

History Node

0.1.2

History Node

0.1.1

History Node

0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
zounds-0.20.11.tar.gz (78.8 kB) Copy SHA256 Checksum SHA256 Source Mar 5, 2017

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting