21
$\begingroup$

As follow up to my previous question I was wondering if there are any speech detection libraries in existence. By speech detection I mean passing in an audio buffer and getting back an index of where speech starts and stops. So if I have 10 seconds of audio sampling at 44kHz, I would expect an array of numbers such as:

44000
88000
123000
190334
...

This would indicate for example that speech starts one second in and then finishes at the two second point, etc.

What I'm not looking for is speech recognition which writes out text from spoken word. This unfortunately is what I see a lot of when I google 'speech detection'.

It would be great if the library was in C, C++ or even Objective-C as I'm writing an app for the iPhone.

Thanks!

$\endgroup$
5
  • 1
    $\begingroup$ You might find your answer in one of these answer: dsp.stackexchange.com/questions/912/… $\endgroup$
    – Geerten
    May 16, 2012 at 9:39
  • 1
    $\begingroup$ This is very similar, except singing instead of speech: dsp.stackexchange.com/q/2367/29 $\endgroup$
    – endolith
    May 16, 2012 at 14:01
  • 1
    $\begingroup$ Also relevant: dsp.stackexchange.com/a/1543/29 "voice activity detection" $\endgroup$
    – endolith
    May 16, 2012 at 14:09
  • 1
    $\begingroup$ You should look into onset/offset detection. Its an active field with many applications in music, speech and radar signal processing. $\endgroup$
    – CyberMen
    May 16, 2012 at 15:09
  • $\begingroup$ I have the same question after 10 years. My area of expertise is not on DSP or VAD so I'm having hard time finding required resources. Could somebody please point Github repos where I can run the application/library, try giving audio source and in return get the indexes/markers of human voice ? $\endgroup$ Jan 8, 2023 at 11:56

4 Answers 4

14
$\begingroup$

In my answer to your that question, I had mentioned that Voice Activity Detection is a standard feature for codecs like G.729 and such others.

You should look for reference encoders and decoders for algorithms that applies this.

One such example is - http://www.voiceage.com/openinit_g729.php

Another possible source is Speex codec. Which implements VAD

BTW: You should google "Voice Activity Detection" or "Talk Spurt" rather than "Speech Detection".

$\endgroup$
6
$\begingroup$

There are open source implementations in the Sphinx and Freeswitch projects. I think they are all energy based detectors do won't need any kind model.

Sphinx 4 (Java but it should be easy to port to C/C++)

PocketSphinx

Freeswitch

Answer taken from Stackoverflow question.

$\endgroup$
4
$\begingroup$

Voice Activity Detection using Adaptive Threshold is very easy and handy to implement on any platform

Here you can have a algorithm which is Adaptive Energy based

Small addition to above algorithm when you are calculating for very first time go for taking Mean of Energy and mark as Emin

in this the frame you pass is divided in to sub-frames and further you can examine each sub-frame for its activity

you can overcome further problems with overlapped frames

$\endgroup$
1
  • $\begingroup$ I'm trying to implement the method in the paper but get lost when the Min_E is zero due to noise suppression. In that case, the Thresh_E would be -INF from the equation. Even taking log1p(Min_E), the Thresh_E would be zero such that it is very easy to misclassify voiced frames because of non-zero energy. Any good suggestions or am I misunderstand it? Equations: Thresh _ E Energy _ Pr imThresh*log(Min _ E) $\endgroup$
    – Farley
    Nov 29, 2015 at 0:29
2
$\begingroup$

How about LibVAD?

Seems like that does exactly what you're describing.

Disclosure: I'm the developer behind LibVAD

$\endgroup$
3
  • $\begingroup$ How does one get libVAD? $\endgroup$
    – todd
    Mar 31, 2016 at 14:18
  • $\begingroup$ By purchasing it. The website doesn't disclose a price until after you fill in a form, though. $\endgroup$ Oct 7, 2016 at 21:33
  • 2
    $\begingroup$ Link now goes to a malware site wanting visitors to update flash. $\endgroup$ Sep 11, 2018 at 20:09

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.