The bitrate (measured in kbps) of audio data captured by Flash Player from the microphone depends on 2 big factors:
- the audio codec used for encoding: Speex or Nellymoser’s ASAO
- the sample rate used with ASAO (mic.rate) and the encode quality used with Speex (mic.encodeQuality)
When capturing data from the microphone using Flash Player you can choose between the 2 audio codecs available for encoding: Speex and NellyMoser’s ASAO (Flash Player can of course decode for playback more audio codecs including MP3 and AAC).
To set the codec, use the
When using the Nellymoser codec you can choose between five different microphone sample rate values: 5, 8, 11, 22 and 44.
Each of these rates correspond to a certain sample rate value (measured in Hz), as noted in the following table:
A rate of 22 means the audio data will contain 22,050 samples every second. For comparison the tracks on an audio CD are sampled at 44,100 samples/second (44.1 kHz).
Each of these rate values consumes bandwidth of roughly double its value. For example the 8kHz setting consumes roughly 16kbps and 11kHz setting consumes roughly 22 kbps.
|mic.rate||Sample rate (Hz)||Bitrate (kbps)*|
To set the rate, use the
The Microphone.rate documentation also mentions the default value behaviour:
The default value is 8 kHz if your sound capture device supports this value. Otherwise, the default value is the next available capture level above 8 kHz that your sound capture device supports, usually 11 kHz.
Speex on the other hand has a fixed sampling rate of 16kHz. Speex allows control of the quality by offering us 11 different encoding quality options, from 0 to 10. Each setting translates to a different bitrate. The AS3 Reference Documentation lists the bitrate for each setting:
|mic.encodingQuality||Sample rate (kHz)||Bitrate (kbps)|
To set the encoding quality, use the
Voice Activity Detection with Speex
Speex also includes voice activity detection (VAD) and automatically reduces bandwidth when no voice is detected. For this to happen efficiently Adobe recommends that you set the silence level to 0. To set the silence level, use the
VoIP Bandwidth and Microphones blog post on Adobe Connect
Encoding recommendations for achieving low latency with Wowza