读取.wav文件时返回的数据到底是什么? [英] What exactly is the data returned when reading a .wav file?

查看:194
本文介绍了读取.wav文件时返回的数据到底是什么?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用

rate, wavData = scipy.io.wavfile.read('test.wav')

wavData中的数据究竟代表什么?

what exactly does the data inside of wavData represent?

推荐答案

wavData是一个数字数组,每个数字代表一个音频信号样本.样本是时间间隔均匀分布的音频振幅的快照.因此,如果您返回的速率为48000,则wavData的前48000个元素将是价值1秒钟的音频信号.有关更多信息,请参阅Wikipedia上的PCM: https://en.wikipedia.org/wiki/Pulse-代码调制.

wavData is an array of numbers each representing a single sample of the audio signal. The samples are snapshots of the audio amplitude spaced evenly in time. So if your rate is returned as 48000 then the first 48000 elements of wavData would be 1 second worth of the audio signal. For more information read about PCM on wikipedia: https://en.wikipedia.org/wiki/Pulse-code_modulation.

这篇关于读取.wav文件时返回的数据到底是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆