Java的采样率转换 [英] Java Sampling Rate Conversion

查看:1978
本文介绍了Java的采样率转换的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在我的Java code,我想44100赫兹的WAV文件转换为8000 Hz的WAV文件。我知道,我必须低通滤波器,然后抽取(+插值)(DSP的理论),但我不想从头开始实现它。

In my Java code, I would like to convert a WAV file of 44100 Hz to a WAV file of 8000 Hz. I know that I have to low-pass filter and then decimate (+interpolate) (the DSP theory) but I do not want to implement it from scratch.

我要寻找一个库,可以有效地做到这一点。你知道有什么?

I am looking for a library that can efficiently do it. Do you know any?

我能够从缓冲区中读取wav文件到一个缓冲区,也写入wav文件到文件,如果它会更容易。

I am able to read wav files into a buffer and also write wav files from buffer to file if it will make it easier.

推荐答案

您应该看看 FMJ 。它提供了ffmpeg的一个包装,可以处理各种转换工作(包括音频重采样)非常有效。

You should look at FMJ. It provides a wrapper for ffmpeg which can handle all sorts of conversion work (including audio resampling) very efficiently.

这篇关于Java的采样率转换的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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