Skip to main content

Common API for reading and writing soundfiles. * Uses installed packages if found (scikits.audiolab) * Implements reading uncompressed formats correctly in any format. * The data is independent of the encoding. All data is presented as float64 * Bitdepth is handled automatically depending on the the actual data

Project description

SNDFILE.IO

A simple module providing a unified API to read and write sound-files to and from numpy arrays. If no extra modules are installed, it uses only standard modules and numpy to read and write uncompressed formats (WAV, AIFF).

If other modules are installed (scikits.audiolab, for example), then they are used.

Even without third-party packages, it has certain advantages over the built-in modules wave and aifc

  • support for PCM16, PCM24, PCM32 and FLOAT32

  • unified output format, independent of encoding (always float64)

  • unified API for all backends

API

sndread

  • it will read ALL the samples and return a Sample (a tuplet data, samplerate)

  • Data will always be as a numpy.float64, between -1 and 1, independently of bit-rate

sndread_chunked

  • will read chunks of frames, avoiding the allocation of all the samples in memory

sndinfo

  • return SndInfo, a namedtuple with all the information of the sound-file

sndwrite

  • write the samples.

  • samples need to be a numpy.float64 array with data between -1 and 1

sndwrite_chunked

  • allows you to write to the file as samples become available

Dependencies

Mandatory:
  • numpy

Optional:
  • scikits.audiolab

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

sndfileio-0.7.tar.gz (10.1 kB view details)

Uploaded Source

Built Distribution

sndfileio-0.7.macosx-10.6-intel.exe (74.3 kB view details)

Uploaded Source

File details

Details for the file sndfileio-0.7.tar.gz.

File metadata

  • Download URL: sndfileio-0.7.tar.gz
  • Upload date:
  • Size: 10.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No

File hashes

Hashes for sndfileio-0.7.tar.gz
Algorithm Hash digest
SHA256 bc244b42e6b23ab4804b8714ebc284410a137dd7b5d86e46f486e7681cce1f91
MD5 fd741ac06110ee5550dcecaabf18bf9f
BLAKE2b-256 f891748858dba44e01ed79dd56313e27f4681c2d055f238ed1e55ba01cd25b82

See more details on using hashes here.

File details

Details for the file sndfileio-0.7.macosx-10.6-intel.exe.

File metadata

File hashes

Hashes for sndfileio-0.7.macosx-10.6-intel.exe
Algorithm Hash digest
SHA256 78e19ce480d24f9196b32cb155779f179841bc5bb8b12ef411509e87153d6f05
MD5 97f039c6133daef3cc0f966c017ce6e1
BLAKE2b-256 be741da42bb47390fb64a5469a75e778a27f7e0b37d44ea04d2ca762f908c857

See more details on using hashes here.

Supported by

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