[speex-dev] Raw Speex?

Steve Kann stevek at stevek.com
Wed Apr 28 15:36:16 PDT 2004

Gervase Markham wrote:

> Hi,
> I want to take a .wav and generate a bytestream that I can feed direct 
> to speex_decode(). The speexenc program appears to produce it wrapped 
> up in an ogg stream, and it doesn't have any sort of "raw" mode. I've 
> tried hacking on it to remove the ogg parts, but I must have got it 
> wrong, as my decode dies after decoding 160 bytes (which I believe is 
> one frame) with an error about a corrupted stream. How can I turn a 
> .wav into a stream of raw speex data?
> Also, the above question leads to the following request for 
> clarification: when decoding, is the "frame size" for a particular 
> codec the amount of bytes that will get written to the output buffer 
> per call? Or is it the amount of data you have to give to each call to 
> speex_bits_read_from()? Or both? Or neither?

<p>Each frame is generally 160 samples, which is 320 bytes, which is 20ms 
at 8khz.   (For narrow-band).  The encoded size will depend on what 
settings you use, but it will always be much less than that (like 1/10 
the size).

So, your 160 byte encoded frame sounds awfully large..

[I'm guessing this has nothing to do with Mozilla :)]



--- >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 at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.

More information about the Speex-dev mailing list