开发者

How do i sample an audio file say .wav , specifically import it in an array and divide it in chunks. (in Lua)

am n开发者_开发技巧ot 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


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜