orctom / vad4j

VAD for Java
20 stars 5 forks source link

vad4j

A Java wrapper for VAD (voice activity detector) of https://github.com/dpirch/libfvad.

Usage

<dependency>
  <groupId>com.orctom</groupId>
  <artifactId>vad4j</artifactId>
  <version>1.0</version>
</dependency>
// use built-in threshold
try (VAD vad = new VAD()) {
  boolean isSpeech = vad.isSpeech(pcm);
  LOGGER.info("is speech: {}", isSpeech);
}

// or use threshold of your choise
try (VAD vad = new VAD()) {
  float score = vad.speechProbability(pcm);
  boolean isSpeech = score >= VAD.THRESHOLD;
  LOGGER.info("is speech: {}", isSpeech);
}

Notice