AndroidResampler
Audio Resampler for Android using Oboe Resampler.
Install / Use
/learn @Nailik/AndroidResamplerREADME
Android Resampler
This is a simple Audio Resampler using Oboe Resampler in order to change Channel and SampleRate.
How to Use
- Add to dependencies
implementation("io.github.nailik:androidresampler:0.3")
- create the Configuration with input and output settings.
val configuration = ResamplerConfiguration(
quality = ResamplerQuality.BEST,
inputChannel = ResamplerChannel.STEREO,
inputSampleRate = 441800,
outputChannel = ResamplerChannel.MONO,
outputSampleRate = 16000
)
- create the resampler, this also creates the OboeAudioProcessor
val resampler = Resampler(configuration)
- to convert audio send in a
ByteArrayand you get back aByteArray - Note: in case of same input and output configuration the input
ByteArrayis just send back directly
val data: ByteArray = resampler.resample(recordedAudio)
- dispose the resampler when finished, note it cannot be used anymore afterwards
isDisposedcan be used to check if resampler was disposed already
resampler.dispose()
val isDisposed = resampler.isDisposed
Related Skills
node-connect
341.6kDiagnose OpenClaw node connection and pairing failures for Android, iOS, and macOS companion apps
frontend-design
84.6kCreate distinctive, production-grade frontend interfaces with high design quality. Use this skill when the user asks to build web components, pages, or applications. Generates creative, polished code that avoids generic AI aesthetics.
openai-whisper-api
341.6kTranscribe audio via OpenAI Audio Transcriptions API (Whisper).
commit-push-pr
84.6kCommit, push, and open a PR
