Archived:Speech Encoder Config Symbian API
m (Protected "CS001030 - Speech Encoder Config API" [edit=sysop:move=sysop])
|Line 1:||Line 1:|
[[Category:Symbian C++]][[Category:S60 3rd Edition, Feature Pack 2
[[Category:Symbian C++]][[Category:S60 3rd Edition, Feature Pack 2 ]][[Category:Multimedia]][[Category:Audio]][[Category:Code Examples]]
Revision as of 07:45, 13 June 2008
|ID||CS001030||Creation date||June 13, 2008|
|Platform||S60 3rd Edition, FP2||Tested on devices|
|Category||Symbian C++||Subcategory||Multimedia, Audio|
|Keywords (APIs, classes, methods, functions): Speech Encoder Config API|
- This API is not part of the public SDK. It can be found in the SDK API Plug-in.
The Speech Encoder Config API acts as an interface for configuring speech encoders, in particular AMR-NB.
Using the API, it is possible to retrieve supported bit rates for a particular audio codec as well as set the encoding bit rate. Previously, the only public way to configure the AMR encoder was Audio Proxy Server (APS uses this interface internally). From S60 3rd Edition, Feature Pack 2 onwards, the speech encoder API can be used directly. A reference to either a successfully initialized CMMFDevSound or CMdaAudioInputStream instance must be passed to the CSpeechEncoderConfig::NewL() constructor.
The following code snippet shows how to set the AMR encoding mode using the Speech Encoder Config API:
CSpeechEncoderConfig* custInt =
CSpeechEncoderConfig::NewL( iDevSound );
// iDevSound is initialized with AMN-NB FourCC code
TInt iBitRate = 4750; // AMR-NB 4.75 kbps (mode 0)
// set the encoding mode(0) to the HW device
TInt err = custInt->SetBitrate( iBitRate );
if( err != KErrNone )
CEikonEnv::InfoWinL(_L("Error setting AMR encoding mode"),_L(""));
CEikonEnv::InfoWinL(_L("Setting AMR encoding mode successful"),_L(""));
Using the Speech Encoder Config API, it is possible to set the VAD (Voice Activity Detection) mode as well as to get the status of VAD.