[speex-dev] rgding VAD

Jelle Foks jelle at foks.8m.com
Wed Apr 16 09:28:41 PDT 2003



On Tue, 2003-04-15 at 11:31, Jean-Marc Valin wrote:
> >     How do i detect whether there is silence in media using speex?
> >     Is there any API which decides that the audio data only contains 
> > silence?
> >     Basically i will have PCM linear data, I want to know whether it is 
> > complete silence.
> 
> Well, the best way is probably to turn VAD *and* DTX on. Then when
> there's silence, the speex_encode function will return zero, which means
> you don't have to transmit the frame (normally, it returns 1).

If the decoder returns sample values of '0' when it detects a nonspeech
event, the end user will be inclined think the connection is broken,
because then also the background noise suddenly stops.

In other speech codecs, when the VAD detects nonspeech, the decoder
inserts 'comfort noise', so that the end user doesn't suddenly hear a
complete silence, but rather a continuation of the background noise.

Jelle.

> >     Is it that during encoding speex_bits_write will return a lesser 
> > number if the audio at byte_ptr contains silence?
> 
> You could do it that way but you may run into problems at low bit-rate
> VBR modes, where the same mode can be used for silence or low-volume
> speech.
> 
> 	Jean-Marc
> 
> -- 
> Jean-Marc Valin, M.Sc.A.
> LABORIUS (http://www.gel.usherb.ca/laborius)
> Université de Sherbrooke, Québec, Canada
> 

<p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'speex-dev-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the Speex-dev mailing list