开发者

How to play a wav file on high frequency?

Do you have any idea on converting my wav audio d开发者_运维技巧ata to high frequency playback. I am creating a module that plays a melody wav file in 16-20khz frequency.

any idea?

-tong


There are several different ways of doing this and it will depend whether you have any temporal information that you want to preserve, or whether you can just effectively increase the sample rate so that the frequency is scaled up (and the duration scaled down).

You didn't mention anything about OS, programming language, sound API, etc, so it's impossible to give specific solutions, but if your sound API allows you to change the playback rate than you may just be able to scale this up by a suitable factor. If not then you will need to resample the sound to achieve the same effect. There are plenty of third party libraries out there for resampling (upsampling/downsampling).

If you need to preserve temporal information then things get a little trickier and you'll need to look at pitch shifting algorithms, e.g. phase vocoder.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜