JVM library for noise reduction written in Kotlin based on the ML model Silero
-
Stretch to change the speed of audio without changing the pitch
-
Voice Activity Detection to extract speech from audio
-
Speech recognition to transcribe audio to text
-
Speech generation to generate voice audio from text
-
Text generation to generate text from prompt
Attempts to reduce background noise along with various artefacts such as reverb, clipping, high/lowpass filters etc., while trying to preserve and/or enhance speech.
- Reduces noise in PCM audio data
- Supports any sampling rate and number of channels due to resampling and downmixing
-
Download latest release
-
Add library dependency
dependencies { implementation(file("/path/to/jar")) }
- Add ONNX dependency
dependencies { implementation("ai.djl.pytorch:pytorch-native-cpu:2.5.1:win-x86_64") }
See the example module for implementation details
- Call
process
to denoise the input data
-
Create an instance
NoiseReduction.Silero.create()
-
Call
inputSizeForMillis
to get the input data size for N milliseconds -
Call
minimumInputSize
to get the audio producer buffer size for real-time reduction -
Call
process
passing the input data, sample rate, and number of channels as arguments -
Call
reset
to reset the internal state - for example when the audio source changes -
Call
close
to release resources
- JVM version 9 or higher
This project is licensed under the Apache License 2.0