[Speex-dev] Encoding/Decoding doubts

Jozsef Vass jozsef_vass at yahoo.com
Thu Jul 16 11:05:31 PDT 2009


Flash player encodes speex at 16 kHz, mono, 16 bit. Fields in the format byte should be ignored if the format is speex. You can set the quality by Microphone.encodeQuality (default 6). You can also set the number of speex frames per tc message using Microphone.framesPerPacket.

Flash player can only decode speex at 16 kHz, so make sure you have the proper sample rate.

Jozsef

> 
> Message: 2
> Date: Sun, 12 Jul 2009 18:36:28 +0100
> From: Daniel Rosado <dsrosado at gmail.com>
> Subject: [Speex-dev] Encoding/Decoding doubts
> To: speex-dev at xiph.org
> Message-ID:
>     <8e6ec0160907121036q29a45285x7964fcb5c6cace2b at mail.gmail.com>
> Content-Type: text/plain; charset="iso-8859-1"
> 
> 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



      


More information about the Speex-dev mailing list