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
“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>,
)
Create and return a new object. See help(type) for accurate signature.
Class wavemap.WaveReadMap
“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>,
)
Create and return a new object. See help(type) for accurate signature.
Class wavemap.WaveWriteMap
“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>,
)
Create and return a new object. See help(type) for accurate signature.
wavemap.WaveMap(filename, mode='r', *args, **kwargs)
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.