Hi, I've enocded and decoded a file using speexencexe/speexdec.exe respectively. However when i use the example code to encode a file and use speexdec.exe to decode it; not only do i get a file that is 3kb larger than if i had encoded it with the .exe but also I get a "this doesn't look like a speex file" message, and it is unable to decode it. I've checked around and it seems that all thats supposed to happen is the decoder should read the speex string on the encoded file to validate its type. 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. not sure if they are related so thats why i'm going back to the drawing board and coming here. thanks greg --------------------------------- Looking for a deal? Find great prices on flights and hotels with Yahoo! FareChase. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20070524/de84208e/attachment.htm
> 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
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. -------------- next part -------------- An HTML attachment was scrubbed... URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20070524/fe893250/attachment.html