关于【Scipy文件输入/输出】可参考:https://blog.csdn.net/Dorisi_H_n_q/article/details/82584668
read
scipy.io.wavfile.
read
(filename, mmap=False)
Open a WAV file. Return the sample rate (in samples/sec) and data from a WAV file.
- Parameters
- filename [string or open file handle] Input wav file.
- mmap [bool, optional] Whether to read data as memory-mapped. Only to be used on real files (Default: False). New in version 0.12.0.
- Returns
- rate [int] Sample rate of wav file.
- data [numpy array] Data read from wav file. Data-type is determined from the file; see Notes.
write
scipy.io.wavfile.
write
(filename, rate, data)
Write a numpy array as a WAV file.
- filename [string or open file handle] Output wav file.
- rate [int] The sample rate (in samples/sec).
- data [ndarray] A 1-D or 2-D numpy array of either integer or float data-type.
【scipy.io.wavfile】使用笔记
原文:https://www.cnblogs.com/ytxwzqin/p/12124788.html