Search code examples
android-activitydetectionvoicesox

Using SoX vad without an audio device


I am trying to use the SoX vad (voice activity detection) feature to analyze a wav file to determine if it contains speech (unsurprisingly.) However, I am using it on the command line on a Linux server that has no audio device. I would expect that I should be able run the command and capture the output somehow, but it seems like the vad feature is dependent on using the "play" command and that appears to be dependent on an audio device.

Is there a way that I can do this without an audio device?


Solution

  • Works here, how did you run it? Here's what I did:

    sox infile.wav outfile.wav vad
    

    outfile.wav is trimmed at the front until voice is detected.