For a streaming application like VOIP, you collect 20 ms of samples, feed this through the encoder, stick it in an RTP packet, and send if over the network. On the receive side you feed packets through a jitter buffer to the decoder, and then copy the output audio to your output device. Speex runs efficiently on most compilers, so the real-time requirement is not a big deal, as long as you know how to do this with your operating system (if you have one). You do not need Ogg containers for something like this, just search the archives for RTP references and you will find much more. Look at the SpeexClient application provided in the source tree, and at the testenc examples in the libspeex directory. The Speex part of things is pretty easy (thanks to Jean-Marc). It is the audio interface for your specific platform and the call setup protocals (e.g. SIP) where the real work is. If you identify the specific hardware/software platform that you plan to use, then someone may be able to point you to examples for the audio interface software. - Jim ----- Original Message ----- From: <alex@gorex.com.hk> To: "Greg" <caroundw5h@yahoo.com> Cc: <greg@mytantrum.com>; <speex-dev@xiph.org>; "Jean-Marc Valin" <jean-marc.valin@usherbrooke.ca> Sent: Thursday, May 24, 2007 11:30 PM Subject: Re: [Speex-dev] Re: compatibility issues.> HI, > I am also working on VOIP application. > Now the speexenc.exe is used to encode a wav/raw file. However, in real > time > voice communication, the voice keep recording from the microphone and how > can > we employ speex to compress the voice and send over the network? > > Thanks > Quoting Greg <caroundw5h@yahoo.com>: > >> okay that questioned is answered, thank you. >> >> I am interested in using speex in a VOIP application. do i need to put it >> in >> into >> the ogg contianer format in order to encode/decode and send it? or will >> it >> work >> "as is"? if the latter then: >> >> "the packet is larger than the allocated buffer" message: whats your >> recomendaton for fixing that? i was thinking simply getting the size of >> the >> frame >> and using the speex_bits_init_buffer() function to create a bigger >> buffer. >> However i >> want to keep latency in mind and make them as small as possible. >> >> i apologise if the questions seem simple but i've working at this for >> sevreal >> days >> and i'm a little stump. a indication in the right direction would be >> helpful. >> >> thank you in advance, >> greg >> >> >> >> >> >> Jean-Marc Valin <jean-marc.valin@usherbrooke.ca> wrote: > does this have >> anything to do with the message on the example code: >> > "the packing used is not compatible with speexenc/speexdec" i know it >> > may sound stupid but it is my first time using speex lib. as well i >> > had assumed this was so and tweaked the decoder code to decode the >> > same file that the example encode code made, but i get a "packet is >> > larger than allocated buffer could not resize buffer, truncating >> > input" message. >> >> Well, the note says it all. It's just not compatible. speexenc/dec pack >> Speex data into an Ogg container, while the sampleenc/dec code just >> creates an incompatible ad-hoc format just to demonstrate how to use >> Speex (without bothering with the heavy Ogg code). >> >> Jean-Marc >> >> >> >> --------------------------------- >> Building a website is a piece of cake. >> Yahoo! Small Business gives you all the tools to get online. > > > > _______________________________________________ > Speex-dev mailing list > Speex-dev@xiph.org > http://lists.xiph.org/mailman/listinfo/speex-dev >
I plan to setup linux server and in client side, XP and Linux. Also, in order to collect the voice, I plan to use portaudio to collect, say 20ms as you suggested sample and feed to the speex encoder. For easier implementation, I don't use OGG container, and just encode then send to the spread network to the client. Hope this work. Can you advise any potential problems by this approach? Thanks ----- Original Message ----- From: "Jim Crichton" <jim.crichton@comcast.net> To: <alex@gorex.com.hk> Cc: <greg@mytantrum.com>; <speex-dev@xiph.org> Sent: Friday, May 25, 2007 10:31 PM Subject: Re: [Speex-dev] Re: compatibility issues.> For a streaming application like VOIP, you collect 20 ms of samples, feed > this through the encoder, stick it in an RTP packet, and send if over the > network. On the receive side you feed packets through a jitter buffer to > the decoder, and then copy the output audio to your output device. Speex > runs efficiently on most compilers, so the real-time requirement is not a > big deal, as long as you know how to do this with your operating system > (if you have one). > > You do not need Ogg containers for something like this, just search the > archives for RTP references and you will find much more. > > Look at the SpeexClient application provided in the source tree, and at > the testenc examples in the libspeex directory. The Speex part of things > is pretty easy (thanks to Jean-Marc). It is the audio interface for your > specific platform and the call setup protocals (e.g. SIP) where the real > work is. > > If you identify the specific hardware/software platform that you plan to > use, then someone may be able to point you to examples for the audio > interface software. > > - Jim > > ----- Original Message ----- > From: <alex@gorex.com.hk> > To: "Greg" <caroundw5h@yahoo.com> > Cc: <greg@mytantrum.com>; <speex-dev@xiph.org>; "Jean-Marc Valin" > <jean-marc.valin@usherbrooke.ca> > Sent: Thursday, May 24, 2007 11:30 PM > Subject: Re: [Speex-dev] Re: compatibility issues. > > >> HI, >> I am also working on VOIP application. >> Now the speexenc.exe is used to encode a wav/raw file. However, in real >> time >> voice communication, the voice keep recording from the microphone and how >> can >> we employ speex to compress the voice and send over the network? >> >> Thanks >> Quoting Greg <caroundw5h@yahoo.com>: >> >>> okay that questioned is answered, thank you. >>> >>> I am interested in using speex in a VOIP application. do i need to put >>> it in >>> into >>> the ogg contianer format in order to encode/decode and send it? or will >>> it >>> work >>> "as is"? if the latter then: >>> >>> "the packet is larger than the allocated buffer" message: whats your >>> recomendaton for fixing that? i was thinking simply getting the size of >>> the >>> frame >>> and using the speex_bits_init_buffer() function to create a bigger >>> buffer. >>> However i >>> want to keep latency in mind and make them as small as possible. >>> >>> i apologise if the questions seem simple but i've working at this for >>> sevreal >>> days >>> and i'm a little stump. a indication in the right direction would be >>> helpful. >>> >>> thank you in advance, >>> greg >>> >>> >>> >>> >>> >>> Jean-Marc Valin <jean-marc.valin@usherbrooke.ca> wrote: > does this have >>> anything to do with the message on the example code: >>> > "the packing used is not compatible with speexenc/speexdec" i know it >>> > may sound stupid but it is my first time using speex lib. as well i >>> > had assumed this was so and tweaked the decoder code to decode the >>> > same file that the example encode code made, but i get a "packet is >>> > larger than allocated buffer could not resize buffer, truncating >>> > input" message. >>> >>> Well, the note says it all. It's just not compatible. speexenc/dec pack >>> Speex data into an Ogg container, while the sampleenc/dec code just >>> creates an incompatible ad-hoc format just to demonstrate how to use >>> Speex (without bothering with the heavy Ogg code). >>> >>> Jean-Marc >>> >>> >>> >>> --------------------------------- >>> Building a website is a piece of cake. >>> Yahoo! Small Business gives you all the tools to get online. >> >> >> >> _______________________________________________ >> Speex-dev mailing list >> Speex-dev@xiph.org >> http://lists.xiph.org/mailman/listinfo/speex-dev >> > > > > > > -- > No virus found in this incoming message. > Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: > 269.8.0/817 - Release Date: 2007/5/24 _U__ 04:01 >
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). 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. 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 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. Jim Crichton <jim.crichton@comcast.net> wrote: For a streaming application like VOIP, you collect 20 ms of samples, feed this through the encoder, stick it in an RTP packet, and send if over the network. On the receive side you feed packets through a jitter buffer to the decoder, and then copy the output audio to your output device. Speex runs efficiently on most compilers, so the real-time requirement is not a big deal, as long as you know how to do this with your operating system (if you have one). You do not need Ogg containers for something like this, just search the archives for RTP references and you will find much more. Look at the SpeexClient application provided in the source tree, and at the testenc examples in the libspeex directory. The Speex part of things is pretty easy (thanks to Jean-Marc). It is the audio interface for your specific platform and the call setup protocals (e.g. SIP) where the real work is. If you identify the specific hardware/software platform that you plan to use, then someone may be able to point you to examples for the audio interface software. - Jim ----- Original Message ----- From: To: "Greg" Cc: ; ; "Jean-Marc Valin" Sent: Thursday, May 24, 2007 11:30 PM Subject: Re: [Speex-dev] Re: compatibility issues.> HI, > I am also working on VOIP application. > Now the speexenc.exe is used to encode a wav/raw file. However, in real > time > voice communication, the voice keep recording from the microphone and how > can > we employ speex to compress the voice and send over the network? > > Thanks > Quoting Greg : > >> okay that questioned is answered, thank you. >> >> I am interested in using speex in a VOIP application. do i need to put it >> in >> into >> the ogg contianer format in order to encode/decode and send it? or will >> it >> work >> "as is"? if the latter then: >> >> "the packet is larger than the allocated buffer" message: whats your >> recomendaton for fixing that? i was thinking simply getting the size of >> the >> frame >> and using the speex_bits_init_buffer() function to create a bigger >> buffer. >> However i >> want to keep latency in mind and make them as small as possible. >> >> i apologise if the questions seem simple but i've working at this for >> sevreal >> days >> and i'm a little stump. a indication in the right direction would be >> helpful. >> >> thank you in advance, >> greg >> >> >> >> >> >> Jean-Marc Valin wrote: > does this have >> anything to do with the message on the example code: >> > "the packing used is not compatible with speexenc/speexdec" i know it >> > may sound stupid but it is my first time using speex lib. as well i >> > had assumed this was so and tweaked the decoder code to decode the >> > same file that the example encode code made, but i get a "packet is >> > larger than allocated buffer could not resize buffer, truncating >> > input" message. >> >> Well, the note says it all. It's just not compatible. speexenc/dec pack >> Speex data into an Ogg container, while the sampleenc/dec code just >> creates an incompatible ad-hoc format just to demonstrate how to use >> Speex (without bothering with the heavy Ogg code). >> >> Jean-Marc >> >> >> >> --------------------------------- >> Building a website is a piece of cake. >> Yahoo! Small Business gives you all the tools to get online. > > > > _______________________________________________ > Speex-dev mailing list > Speex-dev@xiph.org > http://lists.xiph.org/mailman/listinfo/speex-dev >--------------------------------- Sucker-punch spam with award-winning protection. Try the free Yahoo! Mail Beta. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20070525/1cd23a3d/attachment.html
Hi, For the openSpeak project we use PortAudio V19 & speex. So if you want some code examples, you can look an pick in our SVN (its GPL). ATM we are having some problems with PortAudio v19 (it might still be buggy somehow, it seems not to support the 32-kHz sampling rate used by speex ultra-wide-band mode) so if you want something stable you'd better use v18. And of course, if you have suggestions about our code, feedback is most welcome. -Fran?ois NB : openSpeak project home page : http://www.openspeak- project.org/ , SVN : http://openspeak.svn.sourceforge.net/viewvc/ openspeak/branches/0.1/ Le 25 mai 07 ? 16:58, ALEX NG a ?crit :> I plan to setup linux server and in client side, XP and Linux. > Also, in order to collect the voice, I plan to use portaudio to > collect, say 20ms as you suggested sample and feed to the speex > encoder. For easier implementation, I don't use OGG container, and > just encode then send to the spread network to the client. > Hope this work. Can you advise any potential problems by this > approach? > Thanks > ----- Original Message ----- From: "Jim Crichton" > <jim.crichton@comcast.net> > To: <alex@gorex.com.hk> > Cc: <greg@mytantrum.com>; <speex-dev@xiph.org> > Sent: Friday, May 25, 2007 10:31 PM > Subject: Re: [Speex-dev] Re: compatibility issues. > > >> For a streaming application like VOIP, you collect 20 ms of >> samples, feed this through the encoder, stick it in an RTP packet, >> and send if over the network. On the receive side you feed >> packets through a jitter buffer to the decoder, and then copy the >> output audio to your output device. Speex runs efficiently on >> most compilers, so the real-time requirement is not a big deal, as >> long as you know how to do this with your operating system (if you >> have one). >> >> You do not need Ogg containers for something like this, just >> search the archives for RTP references and you will find much more. >> >> Look at the SpeexClient application provided in the source tree, >> and at the testenc examples in the libspeex directory. The Speex >> part of things is pretty easy (thanks to Jean-Marc). It is the >> audio interface for your specific platform and the call setup >> protocals (e.g. SIP) where the real work is. >> >> If you identify the specific hardware/software platform that you >> plan to use, then someone may be able to point you to examples for >> the audio interface software. >> >> - Jim >> >> ----- Original Message ----- From: <alex@gorex.com.hk> >> To: "Greg" <caroundw5h@yahoo.com> >> Cc: <greg@mytantrum.com>; <speex-dev@xiph.org>; "Jean-Marc Valin" >> <jean-marc.valin@usherbrooke.ca> >> Sent: Thursday, May 24, 2007 11:30 PM >> Subject: Re: [Speex-dev] Re: compatibility issues. >> >> >>> HI, >>> I am also working on VOIP application. >>> Now the speexenc.exe is used to encode a wav/raw file. However, >>> in real time >>> voice communication, the voice keep recording from the microphone >>> and how can >>> we employ speex to compress the voice and send over the network? >>> >>> Thanks >>> Quoting Greg <caroundw5h@yahoo.com>: >>> >>>> okay that questioned is answered, thank you. >>>> >>>> I am interested in using speex in a VOIP application. do i need >>>> to put it in >>>> into >>>> the ogg contianer format in order to encode/decode and send it? >>>> or will it >>>> work >>>> "as is"? if the latter then: >>>> >>>> "the packet is larger than the allocated buffer" message: whats >>>> your >>>> recomendaton for fixing that? i was thinking simply getting the >>>> size of the >>>> frame >>>> and using the speex_bits_init_buffer() function to create a >>>> bigger buffer. >>>> However i >>>> want to keep latency in mind and make them as small as possible. >>>> >>>> i apologise if the questions seem simple but i've working at >>>> this for sevreal >>>> days >>>> and i'm a little stump. a indication in the right direction >>>> would be helpful. >>>> >>>> thank you in advance, >>>> greg >>>> >>>> >>>> >>>> >>>> >>>> Jean-Marc Valin <jean-marc.valin@usherbrooke.ca> wrote: > does >>>> this have >>>> anything to do with the message on the example code: >>>> > "the packing used is not compatible with speexenc/speexdec" i >>>> know it >>>> > may sound stupid but it is my first time using speex lib. as >>>> well i >>>> > had assumed this was so and tweaked the decoder code to decode >>>> the >>>> > same file that the example encode code made, but i get a >>>> "packet is >>>> > larger than allocated buffer could not resize buffer, truncating >>>> > input" message. >>>> >>>> Well, the note says it all. It's just not compatible. speexenc/ >>>> dec pack >>>> Speex data into an Ogg container, while the sampleenc/dec code just >>>> creates an incompatible ad-hoc format just to demonstrate how to >>>> use >>>> Speex (without bothering with the heavy Ogg code). >>>> >>>> Jean-Marc >>>> >>>> >>>> >>>> --------------------------------- >>>> Building a website is a piece of cake. >>>> Yahoo! Small Business gives you all the tools to get online. >>> >>> >>> >>> _______________________________________________ >>> Speex-dev mailing list >>> Speex-dev@xiph.org >>> http://lists.xiph.org/mailman/listinfo/speex-dev >>> >> >> >> >> >> >> -- >> No virus found in this incoming message. >> Checked by AVG Free Edition. Version: 7.5.467 / Virus Database: >> 269.8.0/817 - Release Date: 2007/5/24 _U__ 04:01 > > _______________________________________________ > Speex-dev mailing list > Speex-dev@xiph.org > http://lists.xiph.org/mailman/listinfo/speex-devFran?ois Guerraz kubrick@fgv6.net -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20070525/3dd81dc8/attachment.htm
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). 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. 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 i'm getting. whats the board's recommendation for fixing this. Jim Crichton <jim.crichton@comcast.net> wrote: For a streaming application like VOIP, you collect 20 ms of samples, feed this through the encoder, stick it in an RTP packet, and send if over the network. On the receive side you feed packets through a jitter buffer to the decoder, and then copy the output audio to your output device. Speex runs efficiently on most compilers, so the real-time requirement is not a big deal, as long as you know how to do this with your operating system (if you have one). You do not need Ogg containers for something like this, just search the archives for RTP references and you will find much more. Look at the SpeexClient application provided in the source tree, and at the testenc examples in the libspeex directory. The Speex part of things is pretty easy (thanks to Jean-Marc). It is the audio interface for your specific platform and the call setup protocals (e.g. SIP) where the real work is. If you identify the specific hardware/software platform that you plan to use, then someone may be able to point you to examples for the audio interface software. - Jim ----- Original Message ----- From: To: "Greg" Cc: ; ; "Jean-Marc Valin" Sent: Thursday, May 24, 2007 11:30 PM Subject: Re: [Speex-dev] Re: compatibility issues.> HI, > I am also working on VOIP application. > Now the speexenc.exe is used to encode a wav/raw file. However, in real > time > voice communication, the voice keep recording from the microphone and how > can > we employ speex to compress the voice and send over the network? > > Thanks > Quoting Greg : > >> okay that questioned is answered, thank you. >> >> I am interested in using speex in a VOIP application. do i need to put it >> in >> into >> the ogg contianer format in order to encode/decode and send it? or will >> it >> work >> "as is"? if the latter then: >> >> "the packet is larger than the allocated buffer" message: whats your >> recomendaton for fixing that? i was thinking simply getting the size of >> the >> frame >> and using the speex_bits_init_buffer() function to create a bigger >> buffer. >> However i >> want to keep latency in mind and make them as small as possible. >> >> i apologise if the questions seem simple but i've working at this for >> sevreal >> days >> and i'm a little stump. a indication in the right direction would be >> helpful. >> >> thank you in advance, >> greg >> >> >> >> >> >> Jean-Marc Valin wrote: > does this have >> anything to do with the message on the example code: >> > "the packing used is not compatible with speexenc/speexdec" i know it >> > may sound stupid but it is my first time using speex lib. as well i >> > had assumed this was so and tweaked the decoder code to decode the >> > same file that the example encode code made, but i get a "packet is >> > larger than allocated buffer could not resize buffer, truncating >> > input" message. >> >> Well, the note says it all. It's just not compatible. speexenc/dec pack >> Speex data into an Ogg container, while the sampleenc/dec code just >> creates an incompatible ad-hoc format just to demonstrate how to use >> Speex (without bothering with the heavy Ogg code). >> >> Jean-Marc >> >> >> >> --------------------------------- >> Building a website is a piece of cake. >> Yahoo! Small Business gives you all the tools to get online. > > > > _______________________________________________ > Speex-dev mailing list > Speex-dev@xiph.org > http://lists.xiph.org/mailman/listinfo/speex-dev >--------------------------------- Choose the right car based on your needs. Check out Yahoo! Autos new Car Finder tool. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20070629/03b904c7/attachment.html
sorry about the duplication of the thread here guys. mistake on my part. please disregard Greg <caroundw5h@yahoo.com> wrote: 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). 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. 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 i'm getting. whats the board's recommendation for fixing this. Jim Crichton <jim.crichton@comcast.net> wrote: For a streaming application like VOIP, you collect 20 ms of samples, feed this through the encoder, stick it in an RTP packet, and send if over the network. On the receive side you feed packets through a jitter buffer to the decoder, and then copy the output audio to your output device. Speex runs efficiently on most compilers, so the real-time requirement is not a big deal, as long as you know how to do this with your operating system (if you have one). You do not need Ogg containers for something like this, just search the archives for RTP references and you will find much more. Look at the SpeexClient application provided in the source tree, and at the testenc examples in the libspeex directory. The Speex part of things is pretty easy (thanks to Jean-Marc). It is the audio interface for your specific platform and the call setup protocals (e.g. SIP) where the real work is. If you identify the specific hardware/software platform that you plan to use, then someone may be able to point you to examples for the audio interface software. - Jim ----- Original Message ----- From: To: "Greg" Cc: ; ; "Jean-Marc Valin" Sent: Thursday, May 24, 2007 11:30 PM Subject: Re: [Speex-dev] Re: compatibility issues.> HI, > I am also working on VOIP application. > Now the speexenc.exe is used to encode a wav/raw file. However, in real > time > voice communication, the voice keep recording from the microphone and how > can > we employ speex to compress the voice and send over the network? > > Thanks > Quoting Greg : > >> okay that questioned is answered, thank you. >> >> I am interested in using speex in a VOIP application. do i need to put it >> in >> into >> the ogg contianer format in order to encode/decode and send it? or will >> it >> work >> "as is"? if the latter then: >> >> "the packet is larger than the allocated buffer" message: whats your >> recomendaton for fixing that? i was thinking simply getting the size of >> the >> frame >> and using the speex_bits_init_buffer() function to create a bigger >> buffer. >> However i >> want to keep latency in mind and make them as small as possible. >> >> i apologise if the questions seem simple but i've working at this for >> sevreal >> days >> and i'm a little stump. a indication in the right direction would be >> helpful. >> >> thank you in advance, >> greg >> >> >> >> >> >> Jean-Marc Valin wrote: > does this have >> anything to do with the message on the example code: >> > "the packing used is not compatible with speexenc/speexdec" i know it >> > may sound stupid but it is my first time using speex lib. as well i >> > had assumed this was so and tweaked the decoder code to decode the >> > same file that the example encode code made, but i get a "packet is >> > larger than allocated buffer could not resize buffer, truncating >> > input" message. >> >> Well, the note says it all. It's just not compatible. speexenc/dec pack >> Speex data into an Ogg container, while the sampleenc/dec code just >> creates an incompatible ad-hoc format just to demonstrate how to use >> Speex (without bothering with the heavy Ogg code). >> >> Jean-Marc >> >> >> >> --------------------------------- >> Building a website is a piece of cake. >> Yahoo! Small Business gives you all the tools to get online. > > > > _______________________________________________ > Speex-dev mailing list > Speex-dev@xiph.org > http://lists.xiph.org/mailman/listinfo/speex-dev >--------------------------------- Choose the right car based on your needs. Check out Yahoo! Autos new Car Finder tool. _______________________________________________ Speex-dev mailing list Speex-dev@xiph.org http://lists.xiph.org/mailman/listinfo/speex-dev --------------------------------- Luggage? GPS? Comic books? Check out fitting gifts for grads at Yahoo! Search. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20070629/18a7dc7e/attachment.htm