resample / upsample sound frames from 8Khz to 48Khz (Java/Android)

后端 未结 4 2140
被撕碎了的回忆
被撕碎了的回忆 2021-01-18 15:30

The application that I am trying to develop for andriod, records frames at 48Khz (PCM 16bits & mono) and sends them to the network. Also, there is an incoming stream of

4条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-18 16:03

    I was unable to make most libraries work (https://github.com/hutm/JSSRC, https://github.com/simingweng/android-pcm-resample, https://github.com/ashqal/android-libresample). They all have problems either in the resulting audio or just failed to convert from 48000Hz to 44100Hz (that's what I needed).

    This one though works perfectly: https://github.com/JorenSix/TarsosDSP

    That's a big pure-Java library that works on Android (no javax.sound dependencies) and that is capable of many things, but if you just take the FilterKit, Resampler and SampelBuffers classes in package be.tarsos.dsp.resample, it works extremely well and is easy to use.

提交回复
热议问题