thanks for the reply Jim. I'm actually well aware of the packaging, setup and teardown of sessions,and have the audio interface part figured out and implemented (Port Audio).<br><br>The speexclient.c encapsulate audiocapture,encoding,sending and decoding. for my purposes now i've implemented my code more modular. first so i could understand each piece of the software involved and so i could come up with the best way i want to put it all together later.<br><br>unless i'm missing something-and tell me if i am-my question still stands: "packet is larger than the allocated buffer, truncating input" is the error mesg<br>i'm getting. I'll check out the speex_encoder_ctl(enc_state,SPEEX_GET_FRAME_SIZE,&frame_size); function to capture this. but i wanted to know if there was something i was overlooking.<br><br><br><br><br><b><i>Jim Crichton <jim.crichton@comcast.net></i></b> wrote:<blockquote class="replbq" style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px;
padding-left: 5px;"> For a streaming application like VOIP, you collect 20 ms of samples, feed <br>this through the encoder, stick it in an RTP packet, and send if over the <br>network. On the receive side you feed packets through a jitter buffer to <br>the decoder, and then copy the output audio to your output device. Speex <br>runs efficiently on most compilers, so the real-time requirement is not a <br>big deal, as long as you know how to do this with your operating system (if <br>you have one).<br><br>You do not need Ogg containers for something like this, just search the <br>archives for RTP references and you will find much more.<br><br>Look at the SpeexClient application provided in the source tree, and at the <br>testenc examples in the libspeex directory. The Speex part of things is <br>pretty easy (thanks to Jean-Marc). It is the audio interface for your <br>specific platform and the call setup protocals (e.g. SIP) where the real <br>work is.<br><br>If you
identify the specific hardware/software platform that you plan to <br>use, then someone may be able to point you to examples for the audio <br>interface software.<br><br>- Jim<br><br>----- Original Message ----- <br>From: <alex@gorex.com.hk><br>To: "Greg" <caroundw5h@yahoo.com><br>Cc: <greg@mytantrum.com>; <speex-dev@xiph.org>; "Jean-Marc Valin" <br><jean-marc.valin@usherbrooke.ca><br>Sent: Thursday, May 24, 2007 11:30 PM<br>Subject: Re: [Speex-dev] Re: compatibility issues.<br><br><br>> HI,<br>> I am also working on VOIP application.<br>> Now the speexenc.exe is used to encode a wav/raw file. However, in real <br>> time<br>> voice communication, the voice keep recording from the microphone and how <br>> can<br>> we employ speex to compress the voice and send over the network?<br>><br>> Thanks<br>> Quoting Greg <caroundw5h@yahoo.com>:<br>><br>>> okay that questioned is answered, thank you.<br>>><br>>> I am interested in
using speex in a VOIP application. do i need to put it <br>>> in<br>>> into<br>>> the ogg contianer format in order to encode/decode and send it? or will <br>>> it<br>>> work<br>>> "as is"? if the latter then:<br>>><br>>> "the packet is larger than the allocated buffer" message: whats your<br>>> recomendaton for fixing that? i was thinking simply getting the size of <br>>> the<br>>> frame<br>>> and using the speex_bits_init_buffer() function to create a bigger <br>>> buffer.<br>>> However i<br>>> want to keep latency in mind and make them as small as possible.<br>>><br>>> i apologise if the questions seem simple but i've working at this for <br>>> sevreal<br>>> days<br>>> and i'm a little stump. a indication in the right direction would be <br>>> helpful.<br>>><br>>> thank you in advance,<br>>>
greg<br>>><br>>><br>>><br>>><br>>><br>>> Jean-Marc Valin <jean-marc.valin@usherbrooke.ca> wrote: > does this have<br>>> anything to do with the message on the example code:<br>>> > "the packing used is not compatible with speexenc/speexdec" i know it<br>>> > may sound stupid but it is my first time using speex lib. as well i<br>>> > had assumed this was so and tweaked the decoder code to decode the<br>>> > same file that the example encode code made, but i get a "packet is<br>>> > larger than allocated buffer could not resize buffer, truncating<br>>> > input" message.<br>>><br>>> Well, the note says it all. It's just not compatible. speexenc/dec pack<br>>> Speex data into an Ogg container, while the sampleenc/dec code just<br>>> creates an incompatible ad-hoc format just to demonstrate how to use<br>>> Speex (without bothering with the heavy Ogg
code).<br>>><br>>> Jean-Marc<br>>><br>>><br>>><br>>> ---------------------------------<br>>> Building a website is a piece of cake.<br>>> Yahoo! Small Business gives you all the tools to get online.<br>><br>><br>><br>> _______________________________________________<br>> Speex-dev mailing list<br>> Speex-dev@xiph.org<br>> http://lists.xiph.org/mailman/listinfo/speex-dev<br>> <br><br><br></jean-marc.valin@usherbrooke.ca></caroundw5h@yahoo.com></jean-marc.valin@usherbrooke.ca></speex-dev@xiph.org></greg@mytantrum.com></caroundw5h@yahoo.com></alex@gorex.com.hk></blockquote><br><p> 
<hr size=1><a href="
http://us.rd.yahoo.com/evt=49981/*http://advision.webevents.yahoo.com/mailbeta/features_spam.html">Sucker-punch spam</a> with award-winning protection.<br> Try the <a href="
http://us.rd.yahoo.com/evt=49981/*http://advision.webevents.yahoo.com/mailbeta/features_spam.html">free Yahoo! Mail Beta.</a>