首页 > 其他 > 详细

【scipy.io.wavfile】使用笔记

时间:2019-12-31 16:58:13      阅读:441      评论:0      收藏:0      [点我收藏+]

关于【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

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!