speechsrv_plat/nss_srs_custom_commands_api/inc/nsssispeechrecognitioncustomcommands_sinde.h
branchRCL_3
changeset 19 e36f3802f733
parent 0 bf1d17376201
equal deleted inserted replaced
18:cad71a31b7fc 19:e36f3802f733
       
     1 /*
       
     2 * Copyright (c) 2004-2007 Nokia Corporation and/or its subsidiary(-ies). 
       
     3 * All rights reserved.
       
     4 * This component and the accompanying materials are made available
       
     5 * under the terms of "Eclipse Public License v1.0"
       
     6 * which accompanies this distribution, and is available
       
     7 * at the URL "http://www.eclipse.org/legal/epl-v10.html".
       
     8 *
       
     9 * Initial Contributors:
       
    10 * Nokia Corporation - initial contribution.
       
    11 *
       
    12 * Contributors:
       
    13 *
       
    14 * Description:  This is the definition of the client interface for the
       
    15 *			    speaker independent extensions to speech recognition custom commands.
       
    16 *
       
    17 */
       
    18 
       
    19 
       
    20 #ifndef NSS_SI_SPEECH_RECOGNITION_CUSTOM_COMMANDS_H
       
    21 #define NSS_SI_SPEECH_RECOGNITION_CUSTOM_COMMANDS_H
       
    22 
       
    23 //  INCLUDES
       
    24 #include <mmfcontroller.h>
       
    25 #include <nsssispeechrecognitiondataclient.h>
       
    26 #include <nsssispeechrecognitiondatacommon.h>
       
    27 
       
    28 // FORWARD DECLARATIONS
       
    29 class CSDClientResultSet;
       
    30 
       
    31 /**
       
    32 *  This is the main class of NSS Speaker Independent Speech Recognition Custom Commands
       
    33 *
       
    34 *  @lib nsssispeechrecognitioncustomcommands.lib
       
    35 *  @since 2.8
       
    36 */
       
    37 
       
    38 // CLASS DECLARATION
       
    39 class RSISpeechRecognitionCustomCommands : public RMMFCustomCommandsBase
       
    40 	{
       
    41 
       
    42 	public:
       
    43 		/**
       
    44 		*	Public C++ constructor for RSpeechRecognitionCustomCommands class.
       
    45         *
       
    46         * @since	2.8
       
    47         * @param	aController			reference to RMMFController object
       
    48         * @return	-
       
    49 		*/
       
    50 		IMPORT_C RSISpeechRecognitionCustomCommands(RMMFController& aController);
       
    51 
       
    52 		/**
       
    53 		*	Adapts speaker independent models according using a correct recognition result.
       
    54         * 
       
    55         * @since	2.8
       
    56         * @param	aResultSet          The result N-Best containing feature vectors
       
    57 		*			aCorrect            The correct index
       
    58         * @return	-
       
    59 		*/
       
    60         IMPORT_C TInt Adapt(const CSIClientResultSet& aResultSet, TInt aCorrect);
       
    61 
       
    62 		/**
       
    63 		*	Adds a pronunciation to the given lexicon.
       
    64         * 
       
    65         * @since	2.8
       
    66 		* @param	aLexiconID			The lexicon Id
       
    67         * @param    aTrainText          Text to be pronounced
       
    68         * @param    aLanguage           Pronunciation language
       
    69 		* @param	aPronunciationID	Reference where a new pronunciation Id is assigned to.
       
    70 		*								
       
    71         * @return	-
       
    72 		*/
       
    73         IMPORT_C TInt AddPronunciation(TSILexiconID aLexiconID,
       
    74                                        const TDesC& aTrainText,
       
    75                                        TLanguage aLanguage,
       
    76                                        TSIPronunciationID& aPronunciationID);
       
    77 
       
    78 		/**
       
    79         *	Adds a rule variant to a grammar.
       
    80         * 
       
    81         * @since 2.8
       
    82         * @param 	aGrammarID          Grammar identifier
       
    83         * @param    aRuleID             Rule identifier; variant is added here.
       
    84         * @param    aPronunciations     Sequence of pronunciations; these get concatenated.
       
    85         *                               in the rule variant.
       
    86         * @param    aRuleVariantID      Reference where the new variant
       
    87         *                               identifier is assigned to.
       
    88         * @return	-
       
    89 		*/
       
    90 		IMPORT_C TInt AddRuleVariant(
       
    91             TSIGrammarID aGrammarID,
       
    92             TSILexiconID aLexiconID,
       
    93             const RArray<TSIPronunciationID>& aPronunciationIDs,
       
    94             TSIRuleID aRuleID,
       
    95             TSIRuleVariantID& aRuleVariantID );
       
    96 
       
    97         /**
       
    98 		*	Trains a voice tag. Adds the text to the lexicon, and creates the required
       
    99         *   rules and rule variants.
       
   100         * 
       
   101         * @since 2.8
       
   102         * @param	aTrainArray         The phrase to be trained, split into subwords
       
   103         * @param	aLanguageArray      The pronunciaiton languages
       
   104         * @param	aLexiconID          Lexicon identifier
       
   105         * @param	aGrammarID          Grammar identifier
       
   106         * @param	aRuleID             Reference, where the new rule identifier is assigned to.
       
   107         * @return	System wide error code
       
   108         */
       
   109         IMPORT_C TInt AddVoiceTag(
       
   110             const MDesCArray& aTrainArray,
       
   111             const RArray<TLanguage>& aLanguageArray,
       
   112             TSILexiconID aLexiconID,
       
   113             TSIGrammarID aGrammarID,
       
   114             TSIRuleID& aRuleID);
       
   115 
       
   116         /**
       
   117 		*	Trains voice tags. If the training fails for some of the names (but not all),
       
   118         *   it is signaled by setting the Rule ID to KInvalidRuleID.
       
   119         * 
       
   120         * @since 2.8
       
   121         * @param	aTrainArray         The phrase to be trained, split into subwords
       
   122         * @param	aLanguageArray      The pronunciation languages
       
   123         * @param	aLexiconID          Lexicon identifier
       
   124         * @param	aGrammarID          Grammar identifier
       
   125         * @param	aRuleID             Referenceto an array, where the new
       
   126         *                               Rule identifiers are assigned to.
       
   127         * @return	System wide error code
       
   128         */
       
   129         IMPORT_C TInt AddVoiceTags(
       
   130             const RPointerArray<MDesCArray>& aTrainArray,
       
   131             const RArray<TLanguage>& aLanguageArray,
       
   132             TSILexiconID aLexiconID,
       
   133             TSIGrammarID aGrammarID,
       
   134             RArray<TSIRuleID>& aRuleID);
       
   135 
       
   136         /**
       
   137 		*	Trains a voice tag. Adds the text to the lexicon, and creates the required
       
   138         *   rules and rule variants.
       
   139         * 
       
   140         * @since 3.1
       
   141         * @param	aTrainArray         The phrase to be trained, split into subwords
       
   142         * @param	aLanguageArray      The pronunciaiton languages
       
   143         * @param	aLexiconID          Lexicon identifier
       
   144         * @param	aGrammarID          Grammar identifier
       
   145         * @param	aRuleID             Reference, where the new rule identifier is assigned to.
       
   146         * @return	System wide error code
       
   147         */
       
   148         IMPORT_C TInt AddVoiceTag( const MDesCArray& aTrainArray,
       
   149                                    const RArray<RLanguageArray>& aLanguageArray,
       
   150                                    TSILexiconID aLexiconID,
       
   151                                    TSIGrammarID aGrammarID,
       
   152                                    TSIRuleID& aRuleID );
       
   153 
       
   154         /**
       
   155 		*	Trains voice tags. If the training fails for some of the names (but not all),
       
   156         *   it is signaled by setting the Rule ID to KInvalidRuleID.
       
   157         * 
       
   158         * @since 3.1
       
   159         * @param	aTrainArray         The phrase to be trained, split into subwords
       
   160         * @param	aLanguageArray      The pronunciation languages
       
   161         * @param	aLexiconID          Lexicon identifier
       
   162         * @param	aGrammarID          Grammar identifier
       
   163         * @param	aRuleID             Referenceto an array, where the new
       
   164         *                               Rule identifiers are assigned to.
       
   165         * @return	System wide error code
       
   166         */
       
   167         IMPORT_C TInt AddVoiceTags( const RPointerArray<MDesCArray>& aTrainArray,
       
   168                                     const RArray<RLanguageArray>& aLanguageArray,
       
   169                                     TSILexiconID aLexiconID,
       
   170                                     TSIGrammarID aGrammarID,
       
   171                                     RArray<TSIRuleID>& aRuleID );
       
   172 
       
   173         /**
       
   174         *	Creates a new rule.
       
   175         * 
       
   176         * @since 2.8
       
   177         * @param 	aGrammarID          Grammar identifier
       
   178         * @param 	aRuleID             Reference where rule ID is stored
       
   179         * @return	-
       
   180         */
       
   181         IMPORT_C TInt CreateRule(TSIGrammarID aGrammarID, TSIRuleID& aRuleID);
       
   182 
       
   183 		/**
       
   184         *   Starts recognition
       
   185         *
       
   186         * @since 2.8
       
   187         * @param 	aResultSet          Recognition result is placed here, when ready.
       
   188         * @return	-
       
   189         */
       
   190 		IMPORT_C TInt Recognize( CSIClientResultSet& aResultSet );
       
   191 
       
   192         /**
       
   193 		*	Stops recognition. Unlike Cancel(), this function gives
       
   194         *   the recognition result, if it can be guessed.
       
   195         *
       
   196         * @since	2.8
       
   197         * @param	- 
       
   198         * @return	-
       
   199         */
       
   200 		IMPORT_C TInt EndRecord();
       
   201 
       
   202 		/**
       
   203 		*   Deactivates a grammar.
       
   204 		*
       
   205         * @since	2.8
       
   206         * @param	aGrammarID          Grammar identifier
       
   207         * @return	-
       
   208         */
       
   209         IMPORT_C TInt UnloadGrammar( TSIGrammarID aGrammarID );
       
   210 
       
   211 /************************ SD Legacy functions *******************************/
       
   212 
       
   213 		/**
       
   214 		*	Adds a new rule for the given pronunciation into 
       
   215 		*	the specified grammar.
       
   216         * @since	2.0
       
   217         * @param	aGrammarID			grammar Id, where the new rule is 
       
   218 		*								added to
       
   219 		* @param	aLexiconID			lexicon Id
       
   220 		* @param	aPronunciationID	pronunciation Id
       
   221 		* @param	aRuleID				reference where a new rule Id is 
       
   222 		*								assigned to
       
   223         * @return	System-wide errors
       
   224 		*/
       
   225 		IMPORT_C TInt AddRule(TSIGrammarID aGrammarID, TSILexiconID aLexiconID,
       
   226 						TSIPronunciationID aPronunciationID, TSIRuleID& aRuleID);
       
   227 
       
   228 		/**
       
   229         *
       
   230         *	Cancels the current operation
       
   231         * @since 2.0
       
   232         * @param 	-
       
   233         * @return	-
       
   234 		*/
       
   235 		IMPORT_C void Cancel();
       
   236 
       
   237         /**
       
   238 		*	Saves the current changes into permanent storage.
       
   239         * @since 2.0
       
   240         * @param	-
       
   241         * @return	System-wide errors
       
   242         */
       
   243 		IMPORT_C TInt CommitChanges();
       
   244 
       
   245 		/**
       
   246         *
       
   247         *	Creates a new grammar.
       
   248         * @since 2.0
       
   249         * @param 	aGrammarID			reference where grammar ID is stored
       
   250         * @return	System-wide errors
       
   251         */
       
   252 		IMPORT_C TInt CreateGrammar(TSIGrammarID& aGrammarID);
       
   253 
       
   254 		/**
       
   255         *
       
   256         *	Creates a new lexicon.
       
   257         * @since 2.0
       
   258         * @param 	aLexiconID			reference where lexicon ID is stored
       
   259         * @return	System-wide errors
       
   260         */
       
   261 		IMPORT_C TInt CreateLexicon(TSILexiconID& aLexiconID);
       
   262 
       
   263         /**
       
   264 		*	Creates a new model bank.
       
   265         * @since	2.0
       
   266         * @param	aModelBankID		reference where a new model 
       
   267 		*								bank Id is assigned to
       
   268         * @return	System-wide errors
       
   269         */
       
   270 		IMPORT_C TInt CreateModelBank(TSIModelBankID& aModelBankID);
       
   271 
       
   272 		/**
       
   273 		*	Ends the current recognition session.  Resources allocated for 
       
   274 		*	recognition are freed.
       
   275         * @since	2.0
       
   276         * @param	aModelBankID		reference where a new model bank Id 
       
   277 		*								is assigned to
       
   278         * @return	System-wide errors
       
   279         */
       
   280 		IMPORT_C TInt EndRecSession();
       
   281 
       
   282 		/**
       
   283         *	Returns all grammar Ids that belong to the current client.
       
   284         * @since 2.0
       
   285 		* @param	-
       
   286         * @return	System-wide errors
       
   287         */
       
   288 		IMPORT_C TInt GetAllClientGrammarIDs();
       
   289 
       
   290 		/**
       
   291  		*	Returns all lexicon Ids that belong to the current client.
       
   292         * @since 2.0
       
   293 		* @param	-
       
   294         * @return	System-wide errors
       
   295         */
       
   296 		IMPORT_C TInt GetAllClientLexiconIDs();
       
   297 
       
   298 		/**
       
   299         * Returns all model bank Ids that belong to the current client.
       
   300         * @since 2.0
       
   301 		* @param	-
       
   302         * @return	System-wide errors
       
   303         */
       
   304 		IMPORT_C TInt GetAllClientModelBankIDs();
       
   305 
       
   306 		/**
       
   307 		*	Returns all grammar Ids that exist (for all clients).
       
   308         * @since 2.0
       
   309 		* @param	-
       
   310         * @return	System-wide errors
       
   311         */
       
   312 		IMPORT_C TInt GetAllGrammarIDs();
       
   313 
       
   314 		/**
       
   315 		*	Returns all lexicon Ids that exist (for all clients).
       
   316         * @since 2.0
       
   317 		* @param	-
       
   318         * @return	System-wide errors
       
   319         */
       
   320 		IMPORT_C TInt GetAllLexiconIDs();
       
   321 
       
   322 		/**
       
   323  		*	Returns all model bank Ids that exist (for all clients).
       
   324         * @since 2.0
       
   325 		* @param	-
       
   326         * @return	System-wide errors
       
   327         */
       
   328 		IMPORT_C TInt GetAllModelBankIDs();
       
   329 
       
   330 		/**
       
   331 		*	Returns all model Ids that exist in the specified model bank.
       
   332         * @since	2.0
       
   333         * @param	aModelBankID		model bank Id
       
   334 		* @return	System-wide errors
       
   335         */
       
   336 		IMPORT_C TInt GetAllModelIDs(TSIModelBankID aModelBankID);
       
   337 						
       
   338 		/**
       
   339 		*	Returns all pronunciation Ids that exist in the specified lexicon.
       
   340         * @since	2.0
       
   341         * @param	aLexiconID			lexicon Id
       
   342 		* @param	aPronunciationIDs	reference where pronunciation Ids 
       
   343 		*								are stored
       
   344         * @return	System-wide errors
       
   345         */
       
   346 		IMPORT_C TInt GetAllPronunciationIDs(TSILexiconID aLexiconID);
       
   347 					
       
   348 		/**
       
   349 		*	Returns all rule Ids that exist in the specified grammar.
       
   350         * @since	2.0
       
   351         * @param	aGrammarID			grammar Id
       
   352 		* @param	aRuleIDs			reference where rule Ids are stored
       
   353         * @return	System-wide errors
       
   354         */
       
   355 		IMPORT_C TInt GetAllRuleIDs(TSIGrammarID aGrammarID); 
       
   356 		
       
   357 		/**
       
   358         * 
       
   359         *	Returns the engine properties specified by the engine property 
       
   360 		*	ID array. On return aPropertyValue contains an array of engine 
       
   361 		*	properties.
       
   362         * @since 2.0
       
   363         * @param 	aPropertyId		constant reference to array of engine 
       
   364 		*							property Ids
       
   365 		* @param	aPropertyValue	reference to array of engine property 
       
   366 		*							values
       
   367         * @return	system wide error code
       
   368         */
       
   369 		IMPORT_C TInt GetEngineProperties(const RArray<TInt>& aPropertyId, 
       
   370 						RArray<TInt>& aPropertyValue);
       
   371 
       
   372 		/**
       
   373 		*	Returns the number of models in the specified model bank.
       
   374         * @since	2.0
       
   375         * @param	aModelBankID		model bank Id
       
   376 		* @param	aCount				reference where the number of models 
       
   377 		*								is set
       
   378         * @return	System-wide errors
       
   379         */
       
   380 		IMPORT_C TInt GetModelCount(TSIModelBankID aModelBankID, 
       
   381 						TInt& aModelCount);
       
   382 
       
   383 		/**
       
   384 		*	Checks if the rule is valid or not.
       
   385         * @since	2.0
       
   386         * @param	aGrammarID			grammar Id
       
   387 		* @param	aRuleID				rule Id
       
   388 		* @param	aValid				reference where the validity of the 
       
   389 		*								rule is set
       
   390         * @return	System-wide errors
       
   391         */
       
   392 		IMPORT_C TInt GetRuleValidity(TSIGrammarID aGrammarID, TSIRuleID aRuleID, 
       
   393 						TBool& aValid);
       
   394 
       
   395 		/**
       
   396 		*	Loads a grammar. Grammars are loaded between StartRecSession()
       
   397         *   and Recognize()
       
   398         *
       
   399         * @since	2.0
       
   400         * @param	aGrammarID			grammar Id
       
   401         * @return	System-wide errors
       
   402         */
       
   403 		IMPORT_C TInt LoadGrammar( TSIGrammarID aGrammarID );
       
   404 
       
   405 		/**
       
   406 		*	Activates a loaded and deactivated grammar.
       
   407         *
       
   408         * @since	2.8
       
   409         * @param	aGrammarID			grammar Id
       
   410         * @return	System-wide errors
       
   411         */
       
   412 		IMPORT_C TInt ActivateGrammar( TSIGrammarID aGrammarID );
       
   413 
       
   414 		/**
       
   415         *   Deactivates a loaded grammar so that it is not recognized.
       
   416         *
       
   417         * @since	2.8
       
   418         * @param	aGrammarID			grammar Id
       
   419         * @return	System-wide errors
       
   420         */
       
   421 		IMPORT_C TInt DeactivateGrammar( TSIGrammarID aGrammarID );
       
   422 
       
   423         /**
       
   424         *
       
   425         *	Loads the specified lexicon into the recognizer; 
       
   426 		*	done prior to recognition.
       
   427         * @since 2.0
       
   428         * @param 	aLexiconID			lexicon ID
       
   429         * @return	System-wide errors
       
   430         */
       
   431 		IMPORT_C TInt LoadLexicon(TSILexiconID aLexiconID);
       
   432 
       
   433 		/**
       
   434         *
       
   435         *	Loads the specified model bank into the recognizer; done prior 
       
   436 		*	to recognition..
       
   437         * @since 2.0
       
   438         * @param 	aModelBankID		model bank Id
       
   439         * @return	System-wide errors
       
   440         */
       
   441 		IMPORT_C TInt LoadModels(TSIModelBankID aModelBankID);
       
   442 
       
   443 		/**
       
   444 		*	Records uder utterance for training and recognition.
       
   445         * @since	2.0
       
   446         * @param	aRecordTime			recording time in microseconds
       
   447         * @return	System-wide errors
       
   448         */
       
   449 		IMPORT_C TInt Record(TTimeIntervalMicroSeconds32 aRecordTime);
       
   450 
       
   451         /**
       
   452         * Pre-starts recording before Record() call.
       
   453         *
       
   454         * @since 3.2
       
   455         * @return System-wide error
       
   456         */
       
   457         IMPORT_C TInt PreStartSampling();
       
   458     
       
   459 		/**
       
   460 		*	Removes the specified grammar from the permanent storage.
       
   461 		*	Removing a grammar will remove all rules within the grammar.
       
   462         * @since	2.0
       
   463         * @param	aGrammarID			grammar Id
       
   464         * @return	System-wide errors
       
   465         */
       
   466 		IMPORT_C TInt RemoveGrammar(TSIGrammarID aGrammarID);
       
   467 
       
   468 		/**
       
   469 		*	Removes the specified lexicon from the permanent storage.
       
   470 		*	Removing a lexicon will remove all pronunciations within the 
       
   471 		*	lexicon.
       
   472         * @since	2.0
       
   473         * @param	aLexiconID			lexicon Id
       
   474         * @return	-
       
   475         */
       
   476 		IMPORT_C TInt RemoveLexicon(TSILexiconID aLexiconID);
       
   477 
       
   478 		/**
       
   479 		*	Removes the specified model bank from the permanent storage.
       
   480 		*	Removing a model bank will remove all models within the model bank.
       
   481         * @since	2.0
       
   482         * @param	aModelBankID		model bank Id
       
   483         * @return	-
       
   484         */
       
   485 		IMPORT_C TInt RemoveModelBank(TSIModelBankID aModelBankID);
       
   486 
       
   487 		/**
       
   488 		*	Removes the specified model from the specified model bank 
       
   489 		*	permanently.
       
   490         * @since	2.0
       
   491         * @param	aModelBankID		model bank Id
       
   492 		* @param	aModelID			model Id
       
   493         * @return	System-wide errors
       
   494         */
       
   495 		IMPORT_C TInt RemoveModel(TSIModelBankID aModelBankID, 
       
   496 									TSIModelID aModelID);
       
   497 
       
   498 		/**
       
   499 		*	Removes the specified pronunciation from the specified lexicon
       
   500 		*	permanently.
       
   501         * @since	2.0
       
   502         * @param	aLexiconID			lexicon Id
       
   503 		* @param	aPronunciationID	pronunciation Id
       
   504         * @return	System-wide errors
       
   505         */
       
   506 		IMPORT_C TInt RemovePronunciation(TSILexiconID aLexiconID, 
       
   507 									TSIPronunciationID aPronunciationID);
       
   508 
       
   509 		/**
       
   510 		*	Removes the specified rule from the specified grammar permanently.
       
   511         * @since	2.0
       
   512         * @param	aGrammarID			grammar Id
       
   513 		* @param	aRuleID				rule Id
       
   514         * @return	System-wide errors
       
   515         */
       
   516 		IMPORT_C TInt RemoveRule(TSIGrammarID aGrammarID, TSIRuleID aRuleID);
       
   517 
       
   518 		/**
       
   519 		*	Removes the specified rule from the specified grammar permanently.
       
   520         * @since	2.8
       
   521         * @param	aGrammarID			grammar Id
       
   522 		* @param	aRuleIDs			array of rule ids
       
   523         * @return	System-wide errors
       
   524         */
       
   525 		IMPORT_C TInt RemoveRules(TSIGrammarID aGrammarID, RArray<TSIRuleID>& aRuleIDs);
       
   526 
       
   527 		/**
       
   528         *	Sets the client's UID for data ownership identification.
       
   529         * @since 2.0
       
   530         * @param	aClientUid			client's UID
       
   531         * @return	-
       
   532         */
       
   533 		IMPORT_C TInt SetClientUid( TUid aClientUid );
       
   534 
       
   535 		/**
       
   536 		*	Starts a new recognition session.
       
   537         * @since	2.0
       
   538         * @param	aMode				recognition mode
       
   539         * @return	System-wide errors
       
   540         */
       
   541 		IMPORT_C TInt StartRecSession(TNSSRecognitionMode aMode);
       
   542 
       
   543 		/**
       
   544 		*	Unloads the specified rule from the specified grammar in temporary 
       
   545 		*	memory, previously loaded with LoadGrammarL. The rule in the 
       
   546 		*	permanent storage remains intact.
       
   547         * @since	2.0
       
   548         * @param	aGrammarID			grammar Id
       
   549 		* @param	aRuleID				rule Id
       
   550         * @return	System-wide errors
       
   551         */
       
   552 		IMPORT_C TInt UnloadRule(TSIGrammarID aGrammarID, TSIRuleID aRuleID);
       
   553 
       
   554 		/**
       
   555 		*	Uploads the specified parameters into the engine.
       
   556         * @since	2.0
       
   557         * @param	aParameterId		array of parameter IDs
       
   558 		* @param	aParameterValue		array of parameter values
       
   559         * @return	System-wide errors
       
   560         */
       
   561 		IMPORT_C TInt LoadEngineParameters(const RArray<TInt>& aParameterId, 
       
   562 									const RArray<TInt>& aParameterValue);
       
   563 
       
   564 		/**
       
   565 		*	Get the pronunciation ID array. On return aPronunciationIDs contains
       
   566 		*	an array of pronunciation IDs.
       
   567         * @since	2.0
       
   568         * @param	aPronunciationIDs		array of pronunciation IDs
       
   569 		* @return	-
       
   570         */
       
   571 		IMPORT_C void GetPronunciationIDArrayL(RArray<TSIPronunciationID>& aPronunciationIDs);
       
   572 
       
   573 		/**
       
   574 		*	Get the rule ID array. On return aRuleIDs contains
       
   575 		*	an array of rule IDs.
       
   576         * @since	2.0
       
   577         * @param	aRuleIDs				array of rule IDs
       
   578 		* @return	-
       
   579         */
       
   580 		IMPORT_C void GetRuleIDArrayL(RArray<TSIRuleID>& aRuleIDs);
       
   581 
       
   582 		/**
       
   583 		*	Get the model ID array. On return aModelIDs contains
       
   584 		*	an array of model IDs.
       
   585         * @since	2.0
       
   586         * @param	aModelIDs				array of model IDs
       
   587 		* @return	-
       
   588         */
       
   589 		IMPORT_C void GetModelIDArrayL(RArray<TSIModelID>& aModelIDs);
       
   590 	
       
   591 		/**
       
   592 		*	Get the grammar ID array. On return aGrammarIDs contains
       
   593 		*	an array of rule IDs.
       
   594         * @since	2.0
       
   595         * @param	aGrammar				array of grammar IDs
       
   596 		* @return	-
       
   597         */
       
   598 		IMPORT_C void GetGrammarIDArrayL(RArray<TSIGrammarID>& aGrammarIDs);
       
   599 
       
   600 		/**
       
   601 		*	Get the lexicon ID array. On return aLexiconIDs contains
       
   602 		*	an array of lexicon IDs.
       
   603         * @since	2.0
       
   604         * @param	aLexicon				array of lexicon IDs
       
   605 		* @return	-
       
   606         */
       
   607 		IMPORT_C void GetLexiconIDArrayL(RArray<TSILexiconID>& aLexiconIDs);
       
   608 
       
   609 		/**
       
   610 		*	Get the model bank ID array. On return aModelBankIDs contains
       
   611 		*	an array of model bank IDs.
       
   612         * @since	2.0
       
   613         * @param	aModelBank				array of model bank IDs
       
   614 		* @return	-
       
   615         */
       
   616 		IMPORT_C void GetModelBankIDArrayL(RArray<TSIModelBankID>& aModelBankIDs);
       
   617 
       
   618 		/**
       
   619 		*	Get the client result set. This function should be called after recognition.
       
   620 		*	On return aResultSet contains client result set.
       
   621         * @since	2.8
       
   622         * @param	aResultSet Result set to be populated.
       
   623 		* @return	-
       
   624         */
       
   625 		IMPORT_C void GetSIResultSetL(CSIClientResultSet& aResultSet);
       
   626 
       
   627 
       
   628 private:
       
   629 		/**
       
   630         * 
       
   631         *	Returns the engine properties specified by the engine property 
       
   632 		*	ID array. On return aPropertyValue contains an array of engine 
       
   633 		*	properties. This function does the actual work.
       
   634         * @since 2.0
       
   635         * @param 	aPropertyId		constant reference to array of engine 
       
   636 		*							property Ids
       
   637 		* @param	aPropertyValue	reference to array of engine property 
       
   638 		*							values
       
   639         * @return	-
       
   640         */
       
   641 		void DoGetEnginePropertiesL(const RArray<TInt>& aPropertyId, 
       
   642 						RArray<TInt>& aPropertyValue);
       
   643 
       
   644 		/**
       
   645 		*	Uploads the specified parameters into the engine. This function does
       
   646 		*	the actual work.
       
   647         * @since	2.0
       
   648         * @param	aParameterId		array of parameter IDs
       
   649 		* @param	aParameterValue		array of parameter values
       
   650         * @return	-
       
   651         */
       
   652 		void DoLoadEngineParametersL(const RArray<TInt>& aParameterId, 
       
   653 									const RArray<TInt>& aParameterValue);
       
   654 
       
   655 		/**
       
   656 		*	Externalize an integer array.
       
   657         * @since	2.0
       
   658         * @param	aArray				array to externalize
       
   659         * @return	Pointer to externalized array.
       
   660         */
       
   661 		CBufFlat* ExternalizeIntArrayL(const RArray<TInt>& aArray);
       
   662 
       
   663 		/**
       
   664 		*	Internalize an integer array.
       
   665         * @since	2.0
       
   666         * @param	aDes				descriptor containing the data to internalize
       
   667 		* @param	aNumberElements		number of elements to internalize
       
   668 		* @param	aArray				contains the internalized array on exit
       
   669         * @return	-
       
   670         */
       
   671 		void InternalizeIntArrayL(TDes8& aDes, TInt aNumberElements, RArray<TInt>& aArray);
       
   672 
       
   673 private:
       
   674 		/**
       
   675 		*	Initiates recognition; performed following loading of model bank,
       
   676 		*	lexicon, and grammar. This function does the actual work and is trapped
       
   677 		*	by the public Recognize() function.
       
   678         * @since	2.0
       
   679         * @param	aResultSet			reference where the recognition result 
       
   680 		*								is set
       
   681         * @return	-
       
   682         */
       
   683 		void DoRecognizeL(CSDClientResultSet& aResultSet);
       
   684 
       
   685 		/**
       
   686 		*	Initiates speaker independent recognition; performed following
       
   687         *   loading of model bank, lexicon, and grammar. This function does
       
   688         *   the actual work and is trapped by the public Recognize() function.
       
   689         * @since	2.8
       
   690         * @param	aResultSet			reference where the recognition result 
       
   691 		*								is set
       
   692         * @return	-
       
   693         */
       
   694 		void DoRecognizeSIL(CSIClientResultSet& aResultSet);
       
   695 
       
   696 /****************************************************************************/
       
   697 private:
       
   698 
       
   699 		TAny* iReservedPtr_1;	// reserved for future expansion
       
   700 		TAny* iReservedPtr_2;	// reserved for future expansion
       
   701 
       
   702 
       
   703 };
       
   704 
       
   705 #endif  // NSS_SI_SPEECH_RECOGNITION_CUSTOM_COMMANDS_H
       
   706 
       
   707 // End of File