最終更新:2021-04-19 (月) 04:51:07 (19d)  

scipy.io.wavfile
Top / scipy.io.wavfile

https://docs.scipy.org/doc/scipy/reference/io.html#module-scipy.io.wavfile

read(filename[, mmap])

  • 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 formatMinMaxNumPy dtype
    32-bit floating-point-1.0+1.0float32
    32-bit integer PCM-2147483648+2147483647int32
    24-bit integer PCM-2147483648+2147483392int32
    16-bit integer PCM-32768+32767int16
    8-bit integer PCM0255uint8

write(filename, rate, data)

WavFileWarning?