Archived:Speech Encoder Config Symbian API
hamishwillee
(Talk | contribs) m (Automated change of text from {{NoteS}} to {{Note|. (using newer note template)) |
hamishwillee
(Talk | contribs) m (Hamishwillee - Bot change of template (Template:CodeSnippet) - now using Template:ArticleMetaData) |
||
| Line 3: | Line 3: | ||
__NOEDITSECTION__ | __NOEDITSECTION__ | ||
{{KBCS}} | {{KBCS}} | ||
| − | {{ | + | {{ArticleMetaData |
|id=CS001030 | |id=CS001030 | ||
|platform=S60 3rd Edition, FP2 | |platform=S60 3rd Edition, FP2 | ||
| Line 11: | Line 11: | ||
|creationdate=June 13, 2008 | |creationdate=June 13, 2008 | ||
|keywords=Speech Encoder Config API | |keywords=Speech Encoder Config API | ||
| + | |||
| + | |sourcecode= <!-- Link to example source code (e.g. [[Media:The Code Example ZIP.zip]]) --> | ||
| + | |installfile= <!-- Link to installation file (e.g. [[Media:The Installation File.sis]]) --> | ||
| + | |sdk=<!-- SDK(s) built and tested against (e.g. [http://linktosdkdownload/ Nokia Qt SDK 1.1]) --> | ||
| + | |devicecompatability=<!-- Compatible devices (e.g.: All* (must have GPS) ) --> | ||
| + | |signing=<!-- Empty or one of Self-Signed, DevCert, Manufacturer --> | ||
| + | |capabilities=<!-- Capabilities required (e.g. Location, NetworkServices. -->) | ||
| + | |author=[[User:Technical writer 1]] | ||
}} | }} | ||
Revision as of 11:30, 24 June 2011
Article Metadata
Compatibility
Platform Security
Article
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:
Header file
speechencoderconfig.h
Library
SpeechEncoderConfig.lib
Code example
CSpeechEncoderConfig* custInt =
CSpeechEncoderConfig::NewL( iDevSound );
// iDevSound is initialized with AMN-NB FourCC code
if (custInt)
{
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(""));
}
else
{
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.

