Search code examples
javalistenermicrophonejavasoundvoice-recognition

How to implement Voice Activity Detection in Java?


I need to implement a voice activity detection algorithm in Java so that I can know when to start and/or stop recording audio. I am looking for an algorithm that can take either a byte[], a target-data-line, or an audio file as input. Also, a solution would preferably not use external dependencies.


Solution

  • Give a look at TarsosDSP as source of inspiration: It is so far the best open source Java library to deal with Audio Detection. It is purely written in Java and briefly provides:

    SoundDetection
    PitchDetection
    PercussionDetection
    Audio Time Stretching
    Pitch Shifting
    IIR- filters

    Check also the official paper and manual for a better grasp on the topic.