Skip to main content

Memory map WAVE or raw audio files

Project description

🌊 Memory map WAVE files into numpy arrays 🌊

The actual samples from a WAVE file appear as entries in a numpy array.

See documentation for numpy.memmap

If you open the file in ‘r+’ mode, you can even rewrite the samples on disk that way.

API

Class wavemap.RawMap

(wavemap.py, 57-118)

“Memory map raw audio data from a disk file into a numpy matrix

wavemap.RawMap.__new__()

wavemap.RawMap.__new__(
     cls,
     filename,
     dtype,
     channels,
     offset=0,
     length=None,
     mode='r',
     shape=None,
     order=None,
     always_2d=False,
     warn=<function warn at 0x10ea177b8>,
)

(wavemap.py, 60-114)

Create and return a new object. See help(type) for accurate signature.

Class wavemap.WaveReadMap

(wavemap.py, 120-168)

“Memory-map an existing wave file into a numpy matrix

wavemap.WaveReadMap.__new__()

wavemap.WaveReadMap.__new__(
     cls,
     filename,
     mode='r',
     order=None,
     always_2d=False,
     warn=<function warn at 0x10ea177b8>,
)

(wavemap.py, 123-168)

Create and return a new object. See help(type) for accurate signature.

Class wavemap.WaveWriteMap

(wavemap.py, 170-256)

“Memory-map a new wave file

wavemap.WaveWriteMap.__new__()

wavemap.WaveWriteMap.__new__(
     cls,
     filename,
     dtype,
     shape,
     sample_rate,
     length=None,
     warn=<function warn at 0x10ea177b8>,
)

(wavemap.py, 183-256)

Create and return a new object. See help(type) for accurate signature.

wavemap.WaveMap(filename, mode='r', *args, **kwargs)

(wavemap.py, 262-271)

Return an instance of WaveReadMap or WaveWriteMap, depending on mode.

See the documentation of these classes for full signatures.

(automatically generated by doks on 2020-12-27T18:47:05.833215)

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

wavemap-0.9.1.tar.gz (6.9 kB view hashes)

Uploaded Source

Built Distribution

wavemap-0.9.1-py3-none-any.whl (6.0 kB view hashes)

Uploaded Python 3

Supported by

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