Simple JNI wrapper for the webrtc-vad using jni-rs.
repositories {
maven("https://repo.plasmoverse.com/releases")
}
dependencies {
implementation("com.plasmoverse:vad-jni-rust:$version")
}
// Creates a new VAD instance
Vad vad = Vad.create(48_000, VadMode.QUALITY);
// Checks if provided frame is voice
boolean isVoiceSegment = vad.isVoiceSegment(frame);
// Closes the VAD, releasing allocated resources
vad.close();