epoc32/include/speechrecognitionutility.h
branchSymbian2
changeset 2 2fe1408b6811
child 4 837f303aceeb
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/epoc32/include/speechrecognitionutility.h	Tue Mar 16 16:12:26 2010 +0000
     1.3 @@ -0,0 +1,703 @@
     1.4 +// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
     1.5 +// All rights reserved.
     1.6 +// This component and the accompanying materials are made available
     1.7 +// under the terms of the License "Symbian Foundation License v1.0" to Symbian Foundation members and "Symbian Foundation End User License Agreement v1.0" to non-members
     1.8 +// which accompanies this distribution, and is available
     1.9 +// at the URL "http://www.symbianfoundation.org/legal/licencesv10.html".
    1.10 +//
    1.11 +// Initial Contributors:
    1.12 +// Nokia Corporation - initial contribution.
    1.13 +//
    1.14 +// Contributors:
    1.15 +//
    1.16 +// Description:
    1.17 +//
    1.18 +
    1.19 +#ifndef __SPEECHRECOGNITIONUTILITY_H__
    1.20 +#define __SPEECHRECOGNITIONUTILITY_H__
    1.21 +
    1.22 +// INCLUDES
    1.23 +
    1.24 +#include <e32base.h>
    1.25 +#include <mmf/common/mmfcontroller.h>
    1.26 +#include <mmf/common/speechrecognitioncustomcommands.h>
    1.27 +#include <mmf/common/speechrecognitiondataclient.h>
    1.28 +#include <speechrecognitionutilityobserver.h>
    1.29 +
    1.30 +
    1.31 +// CLASS DECLARATION
    1.32 +
    1.33 +/**
    1.34 +@publishedAll
    1.35 +@released
    1.36 +
    1.37 +This is the main class of Speech Recognition Utility.
    1.38 +
    1.39 +@since  8.0
    1.40 +*/
    1.41 +class CSpeechRecognitionUtility : public CBase
    1.42 +	{
    1.43 +	class CBody;
    1.44 +public:
    1.45 +
    1.46 +	/**
    1.47 +	Factory function for creating this class.
    1.48 +
    1.49 +	@param	aClientUid
    1.50 +	        The UID of the client.
    1.51 +	@param 	aSpeechRecognitionUtilityObserver
    1.52 +	        A reference to the event observer class.
    1.53 +
    1.54 +	@return	A pointer to CSpeechRecognitionUtility object
    1.55 +
    1.56 +	@since  8.0
    1.57 +	*/
    1.58 +	IMPORT_C static CSpeechRecognitionUtility* NewL(
    1.59 +							MSpeechRecognitionUtilityObserver&
    1.60 +							aSpeechRecognitionUtilityObserver, TUid aClientUid );
    1.61 +
    1.62 +	/**
    1.63 +	Factory function for creating this class. Leaves a pointer on the cleanup stack.
    1.64 +
    1.65 +	@param  aSpeechRecognitionUtilityObserver		
    1.66 +	        A reference to the event observer class.
    1.67 +	@param  aClientUid
    1.68 +	        A client UID for data ownership.
    1.69 +
    1.70 +	@return A pointer to a CSpeechRecognitionUtility object.
    1.71 +
    1.72 +	@since  8.0
    1.73 +	*/
    1.74 +	IMPORT_C static CSpeechRecognitionUtility* NewLC(
    1.75 +							MSpeechRecognitionUtilityObserver&
    1.76 +							aSpeechRecognitionUtilityObserver, TUid aClientUid );
    1.77 +
    1.78 +	/**
    1.79 +	Destructor.
    1.80 +
    1.81 +	@since  8.0
    1.82 +	*/
    1.83 +	IMPORT_C ~CSpeechRecognitionUtility();
    1.84 +
    1.85 +	/**
    1.86 +	Returns the engine properties specified by the engine property
    1.87 +	ID array. On return aPropertyValue contains an array of engine
    1.88 +	properties.
    1.89 +
    1.90 +	@param  aPropertyId		
    1.91 +	        A constant reference to an array of engine property ID's.
    1.92 +	@param  aPropertyValue
    1.93 +	        A reference to an array of engine property values.
    1.94 +
    1.95 +	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
    1.96 +	        another of the system-wide error codes.
    1.97 +
    1.98 +	@since  8.0
    1.99 +	*/
   1.100 +	IMPORT_C TInt GetEngineProperties( const RArray<TInt>& aPropertyId,
   1.101 +		RArray<TInt>& aPropertyValue );
   1.102 +
   1.103 +	/**
   1.104 +	Adds a new pronunciation for the given model into the
   1.105 +	specified lexicon.
   1.106 +	
   1.107 +	@param  aLexiconID			
   1.108 +	        The lexicon ID, where the new pronunciation is added to.
   1.109 +	@param  aModelBankID		
   1.110 +	        The model bank ID.
   1.111 +	@param	aModelID			
   1.112 +	        The model ID.
   1.113 +	@param  aPronunciationID	
   1.114 +	        A reference where the new pronunciation ID is assigned to.
   1.115 +
   1.116 +	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
   1.117 +	        another of the system-wide error codes.
   1.118 +
   1.119 +	@since  8.0
   1.120 +	*/
   1.121 +	IMPORT_C TInt AddPronunciation( TLexiconID aLexiconID,
   1.122 +		TModelBankID aModelBankID, TModelID aModelID,
   1.123 +		TPronunciationID& aPronunciationID );
   1.124 +
   1.125 +	/**
   1.126 +	Adds a new rule for the given pronunciation into the
   1.127 +	specified grammar.
   1.128 +
   1.129 +	@param  aGrammarID			
   1.130 +	        The grammar ID, where the new rule is added to.
   1.131 +	@param  aLexiconID			
   1.132 +	        The lexicon ID.
   1.133 +	@param  aPronunciationID	
   1.134 +	        The pronunciation ID.
   1.135 +	@param  aRuleID				
   1.136 +	        A reference where the new rule ID is assigned to.
   1.137 +
   1.138 +	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
   1.139 +	        another of the system-wide error codes.
   1.140 +
   1.141 +	@since  8.0
   1.142 +	*/
   1.143 +	IMPORT_C TInt AddRule( TGrammarID aGrammarID, TLexiconID aLexiconID,
   1.144 +		TPronunciationID aPronunciationID, TRuleID& aRuleID );
   1.145 +
   1.146 +	/**
   1.147 +	Cancels the current operation.
   1.148 +
   1.149 +	@since 8.0
   1.150 +	*/
   1.151 +	IMPORT_C void Cancel();
   1.152 +
   1.153 +	/**
   1.154 +	Commit the current train operation to the database.
   1.155 +
   1.156 +	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
   1.157 +	        another of the system-wide error codes.
   1.158 +
   1.159 +	@since  8.0
   1.160 +	*/
   1.161 +	IMPORT_C TInt CommitChanges();
   1.162 +
   1.163 +	/**
   1.164 +	Creates a new grammar.
   1.165 +
   1.166 +	@param  aGrammarID			
   1.167 +	        A reference where grammar ID is stored.
   1.168 +
   1.169 +	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
   1.170 +	        another of the system-wide error codes.
   1.171 +
   1.172 +	@since  8.0
   1.173 +	*/
   1.174 +	IMPORT_C TInt CreateGrammar( TGrammarID& aGrammarID );
   1.175 +
   1.176 +	/**
   1.177 +	Creates a new lexicon.
   1.178 +
   1.179 +	@param  aLexiconID			
   1.180 +	        A reference where lexicon ID is stored.
   1.181 +
   1.182 +	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
   1.183 +	        another of the system-wide error codes.
   1.184 +
   1.185 +	@since  8.0
   1.186 +	*/
   1.187 +	IMPORT_C TInt CreateLexicon( TLexiconID& aLexiconID );
   1.188 +
   1.189 +	/**
   1.190 +	Loads the specified model bank into the recognizer;
   1.191 +	done prior to recognition.
   1.192 +
   1.193 +	@param  aModelBankID
   1.194 +			The Model bank ID
   1.195 +
   1.196 +	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
   1.197 +	        another of the system-wide error codes.
   1.198 +
   1.199 +	@since  8.0
   1.200 +	*/
   1.201 +	IMPORT_C TInt LoadModels( TModelBankID aModelBankID );
   1.202 +
   1.203 +	/**
   1.204 +	Loads the specified grammar into the recognizer;
   1.205 +	done prior to recognition.
   1.206 +	
   1.207 +	@param  aGrammarID			
   1.208 +	        The grammar ID.
   1.209 +
   1.210 +	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
   1.211 +	        another of the system-wide error codes.
   1.212 +
   1.213 +	@since  8.0
   1.214 +	*/
   1.215 +	IMPORT_C TInt LoadGrammar( TGrammarID aGrammarID );
   1.216 +
   1.217 +	/**
   1.218 +	Loads the specified lexicon into the recognizer;
   1.219 +	done prior to recognition.
   1.220 +
   1.221 +	@param  aLexiconID			
   1.222 +	        The lexicon ID.
   1.223 +
   1.224 +	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
   1.225 +	        another of the system-wide error codes.
   1.226 +
   1.227 +	@since  8.0
   1.228 +	*/
   1.229 +	IMPORT_C TInt LoadLexicon( TLexiconID aLexiconID );
   1.230 +
   1.231 +	/**
   1.232 +	Returns the duration of the utterance for the specified model.
   1.233 +
   1.234 +	@param  aModelBankID		
   1.235 +	        The model bank ID.
   1.236 +	@param  aModelID			
   1.237 +	        The model ID.
   1.238 +	@param  aDuration			
   1.239 +	        The reference where the duration of utterance is set.
   1.240 +
   1.241 +	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
   1.242 +	        another of the system-wide error codes.
   1.243 +
   1.244 +	@since  8.0
   1.245 +	*/
   1.246 +	IMPORT_C TInt GetUtteranceDuration( TModelBankID aModelBankID,
   1.247 +		TModelID aModelID,
   1.248 +		TTimeIntervalMicroSeconds32& aDuration);
   1.249 +
   1.250 +	/**
   1.251 +	Plays the previously trained utterance.
   1.252 +
   1.253 +	@param  aModelBankID
   1.254 +	        The model bank ID.
   1.255 +	@param  aModelID
   1.256 +	        The model ID, whose utterance is played.
   1.257 +
   1.258 +	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
   1.259 +	        another of the system-wide error codes.
   1.260 +
   1.261 +	@since  8.0
   1.262 +	*/
   1.263 +	IMPORT_C TInt PlayUtterance( TModelBankID aModelBankID,
   1.264 +		TModelID aModelID);
   1.265 +
   1.266 +	/**
   1.267 +	Returns the number of models in the specified model bank.
   1.268 +
   1.269 +	@param  aModelBankID		
   1.270 +	        The model bank ID.
   1.271 +	@param  aModelCount			
   1.272 +	        The reference where the number of models is set.
   1.273 +
   1.274 +	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
   1.275 +	        another of the system-wide error codes.
   1.276 +
   1.277 +	@since  8.0
   1.278 +	*/
   1.279 +	IMPORT_C TInt GetModelCount( TModelBankID aModelBankID, TInt& aModelCount );
   1.280 +
   1.281 +	/**
   1.282 +	Ends the current recognition session. Resources allocated
   1.283 +	for recognition are freed.
   1.284 +
   1.285 +	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
   1.286 +	        another of the system-wide error codes.
   1.287 +
   1.288 +	@since  8.0
   1.289 +	*/
   1.290 +	IMPORT_C TInt EndRecSession();
   1.291 +
   1.292 +	/**
   1.293 +	Starts a new recognition session.
   1.294 +
   1.295 +	@param  aMode				
   1.296 +	        The recognition mode.
   1.297 +
   1.298 +	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
   1.299 +	        another of the system-wide error codes.
   1.300 +
   1.301 +	@since  8.0
   1.302 +	*/
   1.303 +	IMPORT_C TInt StartRecSession( TRecognitionMode aMode );
   1.304 +
   1.305 +	/**
   1.306 +	Initiates recognition; performed following loading of
   1.307 +	model bank, lexicon, and grammar.
   1.308 +
   1.309 +	@param  aResultSet			
   1.310 +	        A reference where the recognition result is set.
   1.311 +
   1.312 +	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
   1.313 +	        another of the system-wide error codes.
   1.314 +
   1.315 +	@since  8.0
   1.316 +	*/
   1.317 +	IMPORT_C TInt Recognize( CSDClientResultSet& aResultSet );
   1.318 +
   1.319 +	/**
   1.320 +	Records user utterance for training and recognition.
   1.321 +
   1.322 +	@param  aRecordTime			
   1.323 +	        The recording time in microseconds.
   1.324 +
   1.325 +	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
   1.326 +	        another of the system-wide error codes.
   1.327 +
   1.328 +	@since  8.0
   1.329 +	*/
   1.330 +	IMPORT_C TInt Record( TTimeIntervalMicroSeconds32 aRecordTime );
   1.331 +
   1.332 +	/**
   1.333 +	Removes the specified grammar from the permanent storage. 
   1.334 +
   1.335 +	Removing a grammar will remove all rules within the grammar.
   1.336 +
   1.337 +	@param  aGrammarID			
   1.338 +	        The grammar ID.
   1.339 +
   1.340 +	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
   1.341 +	        another of the system-wide error codes.
   1.342 +
   1.343 +	@since  8.0
   1.344 +	*/
   1.345 +	IMPORT_C TInt RemoveGrammar( TGrammarID aGrammarID );
   1.346 +
   1.347 +	/**
   1.348 +	Removes the specified pronunciation from the specified lexicon permanently.
   1.349 +
   1.350 +	@param  aLexiconID			
   1.351 +	        The lexicon ID.
   1.352 +	@param  aPronunciationID	
   1.353 +	        The pronunciation ID.
   1.354 +
   1.355 +	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
   1.356 +	        another of the system-wide error codes.
   1.357 +
   1.358 +	@since  8.0
   1.359 +	*/
   1.360 +	IMPORT_C TInt RemovePronunciation( TLexiconID aLexiconID,
   1.361 +		TPronunciationID aPronunciationID );
   1.362 +
   1.363 +	/**
   1.364 +	Removes the specified lexicon from the permanent storage.
   1.365 +	
   1.366 +	Removing a lexicon will remove all pronunciations within the lexicon.
   1.367 +
   1.368 +	@param  aLexiconID			
   1.369 +	        The lexicon ID.
   1.370 +
   1.371 +	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
   1.372 +	        another of the system-wide error codes.
   1.373 +
   1.374 +	@since  8.0
   1.375 +	*/
   1.376 +	IMPORT_C TInt RemoveLexicon( TLexiconID aLexiconID );
   1.377 +
   1.378 +	/**
   1.379 +	Removes the specified model from the specified model bank
   1.380 +	permanently.
   1.381 +
   1.382 +	@param  aModelBankID		
   1.383 +	        The model bank ID.
   1.384 +	@param  aModelID			
   1.385 +	        The model ID.
   1.386 +
   1.387 +	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
   1.388 +	        another of the system-wide error codes.
   1.389 +
   1.390 +	@since  8.0
   1.391 +	*/
   1.392 +	IMPORT_C TInt RemoveModel( TModelBankID aModelBankID,
   1.393 +		TModelID aModelID );
   1.394 +
   1.395 +	/**
   1.396 +	Removes the specified rule from the specified grammar permanently.
   1.397 +
   1.398 +	@param  aGrammarID			
   1.399 +	        The grammar ID.
   1.400 +	@param  aRuleID
   1.401 +	        The rule ID.
   1.402 +
   1.403 +	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
   1.404 +	        another of the system-wide error codes.
   1.405 +
   1.406 +	@since  8.0
   1.407 +	*/
   1.408 +	IMPORT_C TInt RemoveRule( TGrammarID aGrammarID, TRuleID aRuleID );
   1.409 +
   1.410 +	/**
   1.411 +	Trains a new model into the specified model bank.
   1.412 +
   1.413 +	@param  aModelBankID		
   1.414 +	        The model bank ID.
   1.415 +	@param  aModelID			
   1.416 +	        A reference where a new model ID is assigned to.
   1.417 +
   1.418 +	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
   1.419 +	        another of the system-wide error codes.
   1.420 +
   1.421 +	@since  8.0
   1.422 +	*/
   1.423 +	IMPORT_C TInt Train( TModelBankID aModelBankID, TModelID& aModelID );
   1.424 +
   1.425 +	/**
   1.426 +	Unloads the specified rule from the specified grammar in temporary memory, previously loaded 
   1.427 +	with LoadGrammarL.
   1.428 +
   1.429 +	The rule in the permanent storage remains intact.
   1.430 +
   1.431 +	@param  aGrammarID			
   1.432 +	        The grammar ID.
   1.433 +	@param  aRuleID				
   1.434 +	        The rule ID.
   1.435 +
   1.436 +	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
   1.437 +	        another of the system-wide error codes.
   1.438 +
   1.439 +	@since  8.0
   1.440 +	*/
   1.441 +	IMPORT_C TInt UnloadRule( TGrammarID aGrammarID, TRuleID aRuleID );
   1.442 +
   1.443 +	/**
   1.444 +	Sets the event handler for asynchronous events.
   1.445 +
   1.446 +	@param  aSpeechRecognitionUtilityObserver		
   1.447 +	        A pointer to an observer.
   1.448 +
   1.449 +	@since  8.0
   1.450 +	*/
   1.451 +	IMPORT_C void SetEventHandler( MSpeechRecognitionUtilityObserver*
   1.452 +		aSpeechRecognitionUtilityObserver );
   1.453 +
   1.454 +	/**
   1.455 +	Returns all pronunciation IDs that exist in the specified lexicon.
   1.456 +
   1.457 +	@param  aLexiconID
   1.458 +	        The lexicon ID.
   1.459 +	@param  aPronunciationIDs
   1.460 +	        A reference where pronunciation IDs are stored.
   1.461 +
   1.462 +	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
   1.463 +	        another of the system-wide error codes.
   1.464 +
   1.465 +	@since  8.0
   1.466 +	*/
   1.467 +	IMPORT_C TInt GetAllPronunciationIDs( TLexiconID aLexiconID,
   1.468 +		RArray <TPronunciationID>& aPronunciationIDs );
   1.469 +
   1.470 +	/**
   1.471 +	Returns all grammar IDs owned by the client.
   1.472 +
   1.473 +	@param  aGrammarIDs			
   1.474 +	        A reference where rule IDs are stored.
   1.475 +
   1.476 +	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
   1.477 +	        another of the system-wide error codes.
   1.478 +
   1.479 +	@since  8.0
   1.480 +	*/
   1.481 +	IMPORT_C TInt GetAllClientGrammarIDs(RArray <TGrammarID>& aGrammarIDs );
   1.482 +
   1.483 +	/**
   1.484 +	Returns all lexicons owned by the client.
   1.485 +
   1.486 +	@param  aLexiconIDs	
   1.487 +	        A reference where lexicon IDs are stored.
   1.488 +
   1.489 +	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
   1.490 +	        another of the system-wide error codes.
   1.491 +
   1.492 +	@since  8.0
   1.493 +	*/
   1.494 +	IMPORT_C TInt GetAllClientLexiconIDs(RArray <TLexiconID>& aLexiconIDs );
   1.495 +
   1.496 +	/**
   1.497 +	Returns all modelbank IDs owned by the client.
   1.498 +
   1.499 +	@param  aModelBankIDs			
   1.500 +	        A reference where modelbank IDs are stored.
   1.501 +
   1.502 +	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
   1.503 +	        another of the system-wide error codes.
   1.504 +
   1.505 +	@since  8.0
   1.506 +	*/
   1.507 +		IMPORT_C TInt GetAllClientModelBankIDs(
   1.508 +							RArray<TModelBankID>& aModelBankIDs );
   1.509 +	/**
   1.510 +	Returns all grammar IDs.
   1.511 +
   1.512 +	@param  aGrammarIDs			
   1.513 +	        A reference where rule IDs are stored.
   1.514 +
   1.515 +	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
   1.516 +	        another of the system-wide error codes.
   1.517 +
   1.518 +	@since  8.0
   1.519 +	*/
   1.520 +	IMPORT_C TInt GetAllGrammarIDs(RArray <TGrammarID>& aGrammarIDs );
   1.521 +	
   1.522 +	/**
   1.523 +	Returns all lexicons IDs.
   1.524 +
   1.525 +	@param  aLexiconIDs	
   1.526 +	        A reference where lexicon IDs are stored.
   1.527 +
   1.528 +	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
   1.529 +	        another of the system-wide error codes.
   1.530 +
   1.531 +	@since  8.0
   1.532 +	*/
   1.533 +	IMPORT_C TInt GetAllLexiconIDs(RArray <TLexiconID>& aLexiconIDs );
   1.534 +
   1.535 +	/**
   1.536 +	Returns all modelbank IDs.
   1.537 +
   1.538 +	@param  aModelBankIDs			
   1.539 +	        A reference where modelbank IDs are stored.
   1.540 +
   1.541 +	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
   1.542 +	        another of the system-wide error codes.
   1.543 +
   1.544 +	@since  8.0
   1.545 +	*/
   1.546 +	IMPORT_C TInt GetAllModelBankIDs(
   1.547 +		RArray<TModelBankID>& aModelBankIDs );
   1.548 +
   1.549 +	/**
   1.550 +	Returns all model IDs that exist in the specified model bank.
   1.551 +
   1.552 +	@param  aModelBankID		
   1.553 +	        The model bank ID.
   1.554 +	@param  aModelIDs			
   1.555 +	        A reference where model IDs are stored.
   1.556 +
   1.557 +	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
   1.558 +	        another of the system-wide error codes.
   1.559 +
   1.560 +	@since  8.0
   1.561 +	*/
   1.562 +	IMPORT_C TInt GetAllModelIDs( TModelBankID aModelBankID,
   1.563 +		RArray <TModelID>& aModelIDs );
   1.564 +
   1.565 +	/**
   1.566 +	Checks if the rule is valid or not.
   1.567 +
   1.568 +	@param  aGrammarID
   1.569 +	        The grammar ID.
   1.570 +	@param	aRuleID
   1.571 +			The rule ID.
   1.572 +	@param  aValid
   1.573 +	        A reference where the validity of the rule is set.
   1.574 +
   1.575 +	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
   1.576 +	        another of the system-wide error codes.
   1.577 +
   1.578 +	@since  8.0
   1.579 +	*/
   1.580 +	IMPORT_C TInt GetRuleValidity( TGrammarID aGrammarID, TRuleID aRuleID,
   1.581 +		TBool& aValid );
   1.582 +
   1.583 +	/**
   1.584 +	Returns all rule IDs that exist in the specified grammar.
   1.585 +
   1.586 +	@param  aGrammarID			
   1.587 +	        The grammar ID.
   1.588 +	@param  aRuleIDs			
   1.589 +	        A reference where rule IDs are stored.
   1.590 +
   1.591 +	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
   1.592 +	        another of the system-wide error codes.
   1.593 +
   1.594 +	@since  8.0
   1.595 +	*/
   1.596 +	IMPORT_C TInt GetAllRuleIDs( TGrammarID aGrammarID,
   1.597 +		RArray <TRuleID>& aRuleIDs );
   1.598 +
   1.599 +	/**
   1.600 +	Creates a new model bank.
   1.601 +
   1.602 +	@param  aModelBankID		
   1.603 +	        A reference where a new model bank IF is assigned to.
   1.604 +
   1.605 +	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
   1.606 +	        another of the system-wide error codes.
   1.607 +
   1.608 +	@since  8.0
   1.609 +	*/
   1.610 +	IMPORT_C TInt CreateModelBank( TModelBankID& aModelBankID );
   1.611 +
   1.612 +	/**
   1.613 +	Removes the specified model bank from the permanent storage.
   1.614 +
   1.615 +	Removing a model bank will remove all models within the model bank.
   1.616 +
   1.617 +	@param  aModelBankID		
   1.618 +	        The model bank ID.
   1.619 +
   1.620 +	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
   1.621 +	        another of the system-wide error codes.
   1.622 +
   1.623 +	@since	8.0
   1.624 +	*/
   1.625 +	IMPORT_C TInt RemoveModelBank( TModelBankID aModelBankID );
   1.626 +
   1.627 +	/**
   1.628 +	Returns the number of models available for training system model storage, based on available 
   1.629 +	disk space.
   1.630 +
   1.631 +	@param  aAvailableStorage	
   1.632 +	        The number of models that can be contained in available storage.
   1.633 +
   1.634 +	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
   1.635 +	        another of the system-wide error codes.
   1.636 +
   1.637 +	@since  8.0
   1.638 +	*/
   1.639 +	IMPORT_C TInt GetAvailableStorage( TInt& aAvailableStorage );
   1.640 +
   1.641 +	/**
   1.642 +	Loads the specified parameters into the recognition engine.
   1.643 +
   1.644 +	@param  aParameterId		
   1.645 +	        The array of parameter IDs.
   1.646 +	@param  aParameterValue		
   1.647 +	        The array of parameter values.
   1.648 +
   1.649 +	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
   1.650 +	        another of the system-wide error codes.
   1.651 +
   1.652 +	@since  8.0
   1.653 +	*/
   1.654 +	IMPORT_C TInt LoadEngineParameters( const RArray<TInt>& aParameterId,
   1.655 +					const RArray<TInt>& aParameterValue );
   1.656 +
   1.657 +	/**
   1.658 +	Sets the audio priority and preference for train, playback and recognition.
   1.659 +
   1.660 +	@param  aPriority				
   1.661 +	        The priority for voice recognition.
   1.662 +	@param  aTrainPreference		
   1.663 +	        The preference for training.
   1.664 +	@param  aPlaybackPreference		
   1.665 +	        The preference for playback.
   1.666 +	@param  aRecognitionPreference	
   1.667 +	        The preference for recognition.
   1.668 +
   1.669 +	@return An error code indicating if the function call was successful. KErrNone on success, otherwise
   1.670 +	        another of the system-wide error codes.
   1.671 +
   1.672 +	@since  8.0
   1.673 +
   1.674 +	@capability MultimediaDD
   1.675 +	            A process requesting or using this method that has MultimediaDD capability will
   1.676 +				always have precedence over a process that does not have MultimediaDD.
   1.677 +	*/
   1.678 +	IMPORT_C TInt SetAudioPriority( TInt aPriority, TInt aTrainPreference,
   1.679 +		TInt aPlaybackPreference, TInt aRecognitionPreference );
   1.680 +
   1.681 +private:
   1.682 +	/**
   1.683 +	Private C++ constructor for this class.
   1.684 +
   1.685 +	@since  8.0
   1.686 +	*/
   1.687 +	CSpeechRecognitionUtility();
   1.688 +
   1.689 +	/**
   1.690 +	Second phase constructor for this class.
   1.691 +
   1.692 +	@param  aSpeechRecognitionUtilityObserver		
   1.693 +	        A reference to the event observer class.
   1.694 +
   1.695 +	@since  8.0
   1.696 +	*/
   1.697 +	void ConstructL(MSpeechRecognitionUtilityObserver& aSpeechRecognitionUtilityObserver);
   1.698 +
   1.699 +private:
   1.700 +	CBody* iBody;
   1.701 +	friend class CBody;
   1.702 +};
   1.703 +
   1.704 +#endif	// of __SPEECHRECOGNITIONUTILITY_H__
   1.705 +
   1.706 +	// End of File