com.orctom:vad4j

WebRTC VAD for Java

License

License

GroupId

GroupId

com.orctom
ArtifactId

ArtifactId

vad4j
Last Version

Last Version

1.0
Release Date

Release Date

Type

Type

jar
Description

Description

WebRTC VAD for Java
Project URL

Project URL

https://github.com/orctom/vad4j/
Source Code Management

Source Code Management

https://github.com/orctom/vad4j/

Download vad4j

How to add to project

<!-- https://jarcasting.com/artifacts/com.orctom/vad4j/ -->
<dependency>
    <groupId>com.orctom</groupId>
    <artifactId>vad4j</artifactId>
    <version>1.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.orctom/vad4j/
implementation 'com.orctom:vad4j:1.0'
// https://jarcasting.com/artifacts/com.orctom/vad4j/
implementation ("com.orctom:vad4j:1.0")
'com.orctom:vad4j:jar:1.0'
<dependency org="com.orctom" name="vad4j" rev="1.0">
  <artifact name="vad4j" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.orctom', module='vad4j', version='1.0')
)
libraryDependencies += "com.orctom" % "vad4j" % "1.0"
[com.orctom/vad4j "1.0"]

Dependencies

compile (2)

Group / Artifact Type Version
net.java.dev.jna : jna jar 4.5.0
org.slf4j : slf4j-api jar 1.7.25

test (4)

Group / Artifact Type Version
ch.qos.logback : logback-classic jar 1.1.11
com.google.guava : guava jar 23.0
junit : junit jar 4.12
org.hamcrest : hamcrest-library jar 1.3

Project Modules

There are no modules declared in this project.

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

  • It's not thread-safe. Multiply instances of VAD should be created to calculate vad concurrently.
  • Don't forget to close()

Versions

Version
1.0