最終更新:2021-04-19 (月) 04:51:07 (1100d)
scipy.io.wavfile
Top / scipy.io.wavfile
https://docs.scipy.org/doc/scipy/reference/io.html#module-scipy.io.wavfile
read(filename[, mmap])
- Open a WAV file.
- https://docs.scipy.org/doc/scipy/reference/generated/scipy.io.wavfile.read.html#scipy.io.wavfile.read
- Return the sample rate (in samples/sec) and data from an LPCM WAV file.
- rate:int
- Sample rate of WAV file.
- data] numpy array (numpy.ndarray)
- Data read from WAV file. Data-type is determined from the file; see Notes.
- Data is 1-D for 1-channel WAV, or 2-D of shape (Nsamples, Nchannels) otherwise.
- If a file-like input without a C-like file descriptor (e.g., io.BytesIO) is passed, this will not be writeable.
WAV format Min Max NumPy dtype 32-bit floating-point -1.0 +1.0 float32 32-bit integer PCM -2147483648 +2147483647 int32 24-bit integer PCM -2147483648 +2147483392 int32 16-bit integer PCM -32768 +32767 int16 8-bit integer PCM 0 255 uint8
write(filename, rate, data)
- Write a NumPy array as a WAV file.
- https://docs.scipy.org/doc/scipy/reference/generated/scipy.io.wavfile.write.html#scipy.io.wavfile.write