Requirement:Flash Player 10 or above. Recomemded flash player version (10,0,22,87 ) or above.
What is speex :Speex is a new audio codec introduced in flash player 10 and above. It overcomes many limitations of old Nellymoser codec. This new codec will provide better audio quality using less bandwidth. Speex can be used for both kind of communication , through Flash Media Server or P2P.Speex is opensource so it can be decoded or converted to any format unlike nellymoser .
Speex Description: Speex encoder and decoder are present in flash player 10 and above. Speex compression is controlled by setting encodeQuality. Encode quality can be set using 11 quality levels 0(Lowest) - 10(Highest).Default value is 6. Speex encoder for flash works in constant bit-rate (CBR) . Speex is designed for Voice over IP (VoIP) which means it provides high quality speech at low bit rate.
Speex vs NellyMoser comparison
P2P and Speex: This codec can be used for P2P audio. For implementing P2P in application currently Adobe Labs Stratus beta service can be used which allow developers to begin building applications . The new protocol RTMFP and UDP can be used with Stratus only .Future version next to FMS 3.5 is likely to come with its support.
Code to use Speex in Flex AS3:
//Create netstream with your fms connection
ns = new NetStream(your fms connection here );
//Give file name stream and for recording pass record
activeMic = Microphone.getMicrophone();
//set codec to speex to use codec as speex for audio
activeMic.codec = "Speex"
//rate from 0 to 10 are supported in Speex. 0 is lowest quality and 10 is the highest quality.
activeMic.encodeQuality = 6;
Speex Quality , Bandwidth and filesize table
|Quality (encodeQuality)||Required bandwidth in kbps||Per minute file size in KB|