Skip to main content

Python bindings for sox and libsox.

Project description

pysox - python bindings for libsox

Installation from source

Required prerequisite are the development libraries of sox at version 14.3.x, i.e. the header files and libraries to link against. Specifically you need sox.h in your include path and libsox.so and libsox.a in your link path. Pysox will not compile against any sox version prior to 14.3.0.

Then simply run:

python setup.py build

python setup.py install

Usage

See the examples included in the source, or the api doc at http://packages.python.org/pysox/

import pysox

#open an audio file
testwav = pysox.CSoxStream("test.wav")
#create an audio file with the same parameters as the input file
out = pysox.CSoxStream('out.wav', 'w', testwav.get_signal())

#create an effects chain using the signal and encoding parameters of our files
chain = pysox.CEffectsChain(testwav, out)
chain.add_effect(pysox.CEffect("vol",[b'18db']))
chain.flow_effects()
#cleanup
out.close()

Python 3

This package is compatible with python 3, tested on 2.6.6, 2.7.1, 3.0.1, 3.1.3 and 3.2. It is however not compatible with python 2.5 and prior.

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

pysox-0.3.5.alpha.tar.gz (33.3 kB view details)

Uploaded Source

File details

Details for the file pysox-0.3.5.alpha.tar.gz.

File metadata

  • Download URL: pysox-0.3.5.alpha.tar.gz
  • Upload date:
  • Size: 33.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for pysox-0.3.5.alpha.tar.gz
Algorithm Hash digest
SHA256 a91fc288d9e0457328cdd3f6e52c51b6e390c153d39d0982c939a23642b25074
MD5 58631218a59740e076735aa079701862
BLAKE2b-256 410226c87a6e3ae979d91b5602a26f4a10b6a6725ed906b07bbd1bbfffec1838

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page