Hi, What kind of latency is expected using 8,16,32 khz? I am trying to do a realtime stream server, and I am having latency above>500ms ( I capture the sound using the mic, encode it and send it to theclient). I am using ALSA system, a SB128 PCI and a 800Mhz P3 . What can I do to lower the latency? I tried a test : arecord -t raw | speexenc - - | speexdec - and I found that I also have a 500 ms latency. <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.
Hi, Speex's latency at 8khz is 20 ms. Which is under the latency of most cards. If you are using alsa-driver with oss-emulation in your program, you have to use the SNDCTL_DSP_SUBDIVIDE to divide the size of capture and playback buffers. The common size (supported by all alsa drivers) at 8000 Hz is 512 bytes (32ms). Simon Le ven 21/03/2003 à 15:22, Rolando Martins a écrit :> Hi, > What kind of latency is expected using 8,16,32 khz? > I am trying to do a realtime stream server, and I am having latency above > >500ms ( I capture the sound using the mic, encode it and send it to the > client). > I am using ALSA system, a SB128 PCI and a 800Mhz P3 . What can I do to lower > the latency? > > I tried a test : arecord -t raw | speexenc - - | speexdec - and I found that > I also have a 500 ms latency. > > > --- >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.-- Simon Morlat <simon.morlat@linphone.org> --- >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.
> What kind of latency is expected using 8,16,32 khz?Depending on the sampling rate, the latency is 30-36 ms (frame size is 20 ms).> I am trying to do a realtime stream server, and I am having latency above > >500ms ( I capture the sound using the mic, encode it and send it to the > client). > I am using ALSA system, a SB128 PCI and a 800Mhz P3 . What can I do to lower > the latency? > > I tried a test : arecord -t raw | speexenc - - | speexdec - and I found that > I also have a 500 ms latency.There are likely 3 problems with your setup: 1) arecord might have a big latency (probably reads the audio big chunks at a time) 2) speexenc/speexdec has a larger latency than the codec itself (which you get using libspeex) because of the packets/pages in the Ogg file. 3) The pipes all do some buffering which probably causes additional latency. 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: 242 bytes Desc: signature.asc Url : http://lists.xiph.org/pipermail/speex-dev/attachments/20030321/575d0495/signature-0001.pgp
tu as raison! merci d'y avoir pensé o:) ----- Original Message ----- From: "Rolando Martins" <rolando.martins@ent.efacec.pt> To: <speex-dev@xiph.org> Sent: Friday, March 21, 2003 3:22 PM Subject: [speex-dev] Speex latency <p>> Hi,> What kind of latency is expected using 8,16,32 khz? > I am trying to do a realtime stream server, and I am having latency above > >500ms ( I capture the sound using the mic, encode it and send it to the > client). > I am using ALSA system, a SB128 PCI and a 800Mhz P3 . What can I do tolower> the latency? > > I tried a test : arecord -t raw | speexenc - - | speexdec - and I foundthat> I also have a 500 ms latency. > > > --- >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. >--- >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.