我如何对音频文件(例如 .wav )进行采样,特别是将其导入到数组中并将其分成块。 (在 Lua 中)
我不太擅长编程,我需要对通过手机录制的音频文件进行采样,我知道移动设备会记录语音,并且有采样率,每个样本都有 8 位或 16 位样本大小。我需要 8khz 的 8 位样本大小。编程环境是 lua,但这并不重要,基本的事情是采样。任何帮助将不胜感激。我可以以 8khz 获取它,这不是问题,但我如何将它获取到数组中,以便我可以将它分开,简而言之,我如何在数组中采样音频 .wav 文件
am not that big on programming and i need to sample an audio file that is recorded via a mobile, i understand that the mobile device records the voice, and there are sample rates and each sample has a 8bit or 16 bit sample size. i need 8 bit sample size in 8khz. the programming environment is lua but that doesnt matter really the basic deal is sampling. Any help would be appreciated. I can get it in 8khz not a problem but how can i get it in an array so that i can divide it hence in short how do i sample an audio .wav file in an array
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
音频是什么格式?一个 wav 文件?如果是这样,您需要阅读 RIFF 标头。
然后只需将文件读入一个数组,其中每个元素都是一个样本。
what format is the audio in? a wav file? if so, you need to read the RIFF header.
Then just read the file into an array where each element is a sample.