0

python的模块“wave”给了我一个十六进制字节列表,我可以像数字一样读取。假设我的样本的频率是 11025。在那些指定这个的字节中是否有一个“标题”?我知道我可以使用 wave 方法来获取频率,但我想谈谈 .wav 文件结构。它有一个标题?如果我得到这些字节,我怎么知道哪些是音乐,哪些是信息?如果我可以在扬声器中以 0 到 255 的强度每秒 11025 次播放这些数字,我可以像在文件中一样播放声音吗?

谢谢!

4

1 回答 1

1

.wav files are actually RIFF files under the hood. The WAVE section contains both the format information and the waveform data. Reading the codec, sample rate, sample size, and sample polarity from the format information will allow you to play the waveform data assuming you support the codec used.

于 2013-06-14T05:01:36.263 回答