obspy.io.wav.core._write_wav
- _write_wav(stream, filename, framerate=7000, rescale=False, width=None, **kwargs)[source]
Writes a audio WAV file from given ObsPy Stream object. The seismogram is squeezed to audible frequencies.
The generated WAV sound file is as a result really short. The data are written uncompressed as signed 4-byte integers.
Warning
This function should NOT be called directly, it registers via the the
write()
method of an ObsPyStream
object, call this instead.- Parameters:
stream (
Stream
) – The ObsPy Stream object to write.filename (str) – Name of the audio WAV file to write.
framerate (int, optional) – Sample rate of WAV file to use. This this will squeeze the seismogram (default is 7000).
rescale (bool, optional) – Maximum to maximal representable number
width (int, optional) – dtype to write, 1 for ‘<u1’, 2 for ‘<i2’ or 4 for ‘<i4’. tries to autodetect width from data, uses 4 otherwise