scipy.io.wavfile.Read返回说明
我知道我可以通过https://docs.scipy.org/doc/scipy/referency/generated/scipy.io.wavfile.read.html
读取它,但我太愚蠢了,无法理解它。
from scipy.io.wavfile import read
sample_rate, data = read("./drive/MyDrive/PSD.wav")
print(len(data))
print(data)
数据
的长度数组的什么表示?我有输出1500000
,但是它是什么意思或使用了什么单位? sample_rate是488000,我想我了解这一点,但我不确定。
当我打印数据时,它给了我输出,
[[ 0 0]
[ 0 0]
[ 0 0]
...
[-25 -25]
[ 18 18]
[ -4 -4]]
我知道它已经离开通道和右通道,但是什么是振幅单元?
I know I can read it at https://docs.scipy.org/doc/scipy/reference/generated/scipy.io.wavfile.read.html
, but I'm too stupid to understand it.
from scipy.io.wavfile import read
sample_rate, data = read("./drive/MyDrive/PSD.wav")
print(len(data))
print(data)
What representation of length array of data
? I have output 1500000
but what does it mean or what unit it used? And sample_rate is 488000, I think I understand about it but I'm not sure.
And when I printed the data it gave me output
[[ 0 0]
[ 0 0]
[ 0 0]
...
[-25 -25]
[ 18 18]
[ -4 -4]]
I know it has left channel and right channel, but what is amplitude units?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
如果您有两个列数组,则意味着您的Wave文件具有两个通道(立体声,左/右)。采样率每秒给出样本数量,因此采样周期为
(1 / sampe_rate)< / code>。
你也可以绘制它
If you have a two columns arrays it means your wave file has two channels (stereo, left/right). The sample rate gives the number of samples per second, so the sampling period is
(1 / sample_rate)
.You could plot it as well