hi, 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. Is it that during encoding speex_bits_write will return a lesser number if the audio at byte_ptr contains silence? thanx, Rahul -- Rahul Arvind Jadhav Web: http://rahuljadhav.tripod.com <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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
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@xiph.org' containing only the word 'unsubscribe' in the body. No subject is needed. Unsubscribe messages sent to the list will be ignored/filtered.
> 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).> 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> -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 190 bytes Desc: Ceci est une partie de message numériquement signée Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20030415/ffbda525/signature-0001.pgp