Speex is based on CELPand is designed to compress voice at bitratesranging from 2 to 44kbps.Some of Speex's features include:
Codec :Speex
Requirement:Flash Player 10 or above. Recomemded flash player version (10,0,22,87 ) or above.
Type:Open Source
What is speex :Speex is a new audio codec introduced in flash player 10 and above. It overcomes many limitations of oldNellymoser 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 settingencodeQuality. 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 LabsStratus beta service can be used which allow developers to begin building applications . The new protocolRTMFP and UDP can be used withStratus only .Future version next to FMS 3.5 is likely to come with its support.
Code to use Speex in Flex AS3:
//Create a fms connection first
ns = new NetStream(your fms connection here );
//Give name to file and record
ns.publish("testingSpeex", "record");
activeMic = Microphone.getMicrophone();
//set codec to speex
activeMic.codec = "Speex"
//rate from 0 to 10 are supported in Speex. 0 is lowest quality.
activeMic.encodeQuality = 6;
ns.attachAudio(Microphone.getMicrophone());
Speex Quality , Bandwidth and filesize table
|
||
Quality (encodeQuality) | Required bandwidth in kbps | Per minute file size in KB |
0 | 3.95 | 28.9 |
1 | 5.75 | 42.1 |
2 | 7.75 | 56.7 |
3 | 9.80 | 71.7 |
4 | 12.8 | 93.7 |
5 | 16.8 | 123.0 |
6 | 20.6 | 150.8 |
7 | 23.8 | 174.3 |
8 | 27.8 | 203.6 |
9 | 34.2 | 250.4 |
10 | 42.2 | 309.0 |
Speex vs Nellymoser
Nellymoser 是closed format codec, 而Speex 是opensource的.
对Flash Player的要求:
Nellymoser 可在Flash player 6及以上版本使用, Speex 要求Flash Player 10.
音频质量:
Speex做了优化,音频质量优于Nellymoser.
带宽要求:
Speex在比Nellymoser音频好的情况下,带宽要求反而更低。
编码质量:
Speex有11级 (0-10) 编码质量可选.Nellymoser有5级 (5,8,11,22,44)
License type: Nellymoser is closed format codec whereas Speex is opensource which means that files created using speex can be decoded or encoded without any licence requirement.
Flash Player Requirement: Nellymoser works from Flash player 6 onwards whereas Speex requires atleast Flash Player 10. Although speex works with flash player 10 but there is a audio disturbance bug on listener end which was fixed in version 10,0,22,87.So player 10,0,22,87 and above is recommended.
Quality: Speex is optimised for speech so better quality is expected from speex as compared to our old Nellymoser codec.
Bandwidth Requirement: Speex delivers better quality than Nellymoser using less bandwidth as compared to speex.our tests revealed that the quality with nellymoser becomes usable at 8(16kbps) where as in case of speex it is 3 (9.80 kbps).The highest quality in Speex uses 42.2 kbps thats half of the bandwidth being used by nellymoser which is 88.2
Encode Quality: Speex provides more flexibilityby giving 11 levels of quality to choose from (0-10).0 is lowest and 10 is highest audio quality. Nellymoser gives 5 settings(5,8,11,22,44) ,5 is lowest and 44 is highest quality.Remember more is the quality higher is the bandwidth requirement which may lead to choppy sound when sufficient bandwidth is not available.
Speex | Nellymoser | ||
Quality (encodeQuality) | Required bandwidth in kbps | Quality(mic.rate) | Required bandwidth in kbps |
0 | 3.95 | 5 | 11.025 |
1 | 5.75 | 8 | 16 |
2 | 7.75 | 11 | 22.05 |
3 | 9.80 | 22 | 44.1 |
4 | 12.8 | 44 | 88.2 |
5 | 16.8 | ||
6 | 20.6 | ||
7 | 23.8 | ||
8 | 27.8 | ||
9 | 34.2 | ||
10 | 42.2 |
Codec | Rate (kHz) | bitrate (kbps) | frame size (ms) | total delay (ms) | Robustness | license |
---|---|---|---|---|---|---|
CELT | 32-96 | 24-128 (mono) 40-160 (stereo) |
<5.8 (44.1 kHz) <5.3 (48 kHz) |
<8.7 (44.1 kHz) <8.0 (48 kHz) |
packet loss, bit errors | open-source/ free software |
G.722.1C (Siren14) | 32 | 24, 32, 48 | 20 | 40 | packet loss, bit errors | no charge, but not open-source |
AAC-LD | 16-48 | 16-128 | from 10 to 11.6 | from 20 to 50+ | packet loss | proprietary, MPEG |
Fraunhofer ULD | 32-48 | 48-192? | <10 | <10 | limited | proprietary, non-standard |
These are the results of MUSHRA tests comparing CELT with AAC-LD, G.722.1C and MP3, with 10 listeners. We used version 0.3.2 of the CELT codec with 5.8 ms frames (256 samples) and 2.9 ms (128 samples) look-ahead,for a total of 8.7 ms at 44.1 kHz. As for AAC-LD, we used Apple's implementation, which has 11.6 ms frames and 23.2 ms look-ahead, for a total of 34.8 ms delay at 44.1 kHz. The MP3 implementation is LAME in CBR more and is only included for reference purposes only.
The first graph is for the 48 kbit/s listening test.
The second graph is for the 64 kbit/s listening test. Note that G.722.1C is still at 48 kbit/s in that test because it is the highest bit-rate it supports.
官方主页:
http://www.speex.org/
http://www.nellymoser.com/
参考:
http://www.celt-codec.org/comparison/
http://all-streaming-media.com/
http://askmeflash.com/article/1/all-about-speex-for-flash