[Speex-dev] Encoding/Decoding doubts

Daniel Rosado dsrosado at gmail.com
Sun Jul 12 10:36:28 PDT 2009


Hi,

I'm doing a VoIP related project where at some point i need to decode speex
data gathered from a flash client, and then encode it to ulaw or alaw pcm so
i can send it in rtp packets.
On the other way, i get rtp packets with ulaw and alaw pcm data, then i need
to decode them to linear pcm and feed the speex encoder, so i can send the
data to the flash player.

I'm using JSpeex, i know this is not JSpeex mailing list but i would really
apreciate some help.

There are some (a lot of) things i don't understand:

-In flash, i can set the sample rate and the quality of the speex data. If
the sample rate is 16KHz, the number of bits per sample, and consequently
the bitrate, will depend on the quality.
After i get the speex frame, i call init on the Decoder. There, i don't
understand what is the meaning of the sample rate if you already have to
pass the mode. How is it related?

Does the speex frame contain any info about the bitrate?

-I know that every flash packet has a header containing info about the audio
format, stereo or mono, bitrate, etc. But it seems to change over time...For
example, the number of channels.

-After decoding a speex frame, i'm supposed to get linear pcm at what sample
rate? The same as defined on the init? What about the number of bits per
sample?

-On the speex encoding part, the parameters needed on init are related to
the linear pcm frame i should pass to processData and it also indicates what
type of speex frame i will get?
What kind of pcm data can i use to feed the encoder?

Maybe some of the questions don't make much sense, but i can't get much info
on the subject.

Thanks in advance,

John
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.xiph.org/pipermail/speex-dev/attachments/20090712/ebb4f7f8/attachment.htm 


More information about the Speex-dev mailing list