williamr@2
|
1 |
// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
|
williamr@2
|
2 |
// All rights reserved.
|
williamr@2
|
3 |
// This component and the accompanying materials are made available
|
williamr@4
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
williamr@2
|
5 |
// which accompanies this distribution, and is available
|
williamr@4
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
williamr@2
|
7 |
//
|
williamr@2
|
8 |
// Initial Contributors:
|
williamr@2
|
9 |
// Nokia Corporation - initial contribution.
|
williamr@2
|
10 |
//
|
williamr@2
|
11 |
// Contributors:
|
williamr@2
|
12 |
//
|
williamr@2
|
13 |
// Description:
|
williamr@2
|
14 |
//
|
williamr@2
|
15 |
|
williamr@2
|
16 |
#ifndef __SPEECHRECOGNITIONCUSTOMCOMMANDS_H__
|
williamr@2
|
17 |
#define __SPEECHRECOGNITIONCUSTOMCOMMANDS_H__
|
williamr@2
|
18 |
|
williamr@2
|
19 |
// INCLUDES
|
williamr@2
|
20 |
#include <mmf/common/mmfcontroller.h>
|
williamr@2
|
21 |
#include <mmf/common/speechrecognitiondataclient.h>
|
williamr@2
|
22 |
|
williamr@2
|
23 |
/**
|
williamr@2
|
24 |
@publishedAll
|
williamr@2
|
25 |
@released
|
williamr@2
|
26 |
|
williamr@2
|
27 |
This is the main class of Speech Recognition Custom Commands.
|
williamr@2
|
28 |
|
williamr@2
|
29 |
@since 8.0
|
williamr@2
|
30 |
*/
|
williamr@2
|
31 |
class RSpeechRecognitionCustomCommands : public RMMFCustomCommandsBase
|
williamr@2
|
32 |
{
|
williamr@2
|
33 |
public:
|
williamr@2
|
34 |
/**
|
williamr@2
|
35 |
Public C++ constructor for RSpeechRecognitionCustomCommands class.
|
williamr@2
|
36 |
|
williamr@2
|
37 |
@param aController
|
williamr@2
|
38 |
A reference to a RMMFController object.
|
williamr@2
|
39 |
|
williamr@2
|
40 |
@since 8.0
|
williamr@2
|
41 |
*/
|
williamr@2
|
42 |
IMPORT_C RSpeechRecognitionCustomCommands(RMMFController& aController);
|
williamr@2
|
43 |
|
williamr@2
|
44 |
/**
|
williamr@2
|
45 |
Adds a new pronunciation for the given model into the specified lexicon.
|
williamr@2
|
46 |
|
williamr@2
|
47 |
@param aLexiconID
|
williamr@2
|
48 |
The lexicon ID to where the new pronunciation is added.
|
williamr@2
|
49 |
@param aModelBankID
|
williamr@2
|
50 |
The model bank ID.
|
williamr@2
|
51 |
@param aModelID
|
williamr@2
|
52 |
The model ID.
|
williamr@2
|
53 |
@param aPronunciationID
|
williamr@2
|
54 |
A reference to where a new pronunciation ID is assigned.
|
williamr@2
|
55 |
|
williamr@2
|
56 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
williamr@2
|
57 |
another of the system-wide error codes.
|
williamr@2
|
58 |
|
williamr@2
|
59 |
@since 8.0
|
williamr@2
|
60 |
*/
|
williamr@2
|
61 |
IMPORT_C TInt AddPronunciation(TLexiconID aLexiconID,
|
williamr@2
|
62 |
TModelBankID aModelBankID, TModelID aModelID,
|
williamr@2
|
63 |
TPronunciationID& aPronunciationID);
|
williamr@2
|
64 |
|
williamr@2
|
65 |
/**
|
williamr@2
|
66 |
Adds a new rule for the given pronunciation into the specified grammar.
|
williamr@2
|
67 |
|
williamr@2
|
68 |
@param aGrammarID
|
williamr@2
|
69 |
The grammar ID to where the new rule is added.
|
williamr@2
|
70 |
@param aLexiconID
|
williamr@2
|
71 |
The lexicon ID.
|
williamr@2
|
72 |
@param aPronunciationID
|
williamr@2
|
73 |
The pronunciation ID.
|
williamr@2
|
74 |
@param aRuleID
|
williamr@2
|
75 |
A reference to where a new rule ID is assigned.
|
williamr@2
|
76 |
|
williamr@2
|
77 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
williamr@2
|
78 |
another of the system-wide error codes.
|
williamr@2
|
79 |
|
williamr@2
|
80 |
@since 8.0
|
williamr@2
|
81 |
*/
|
williamr@2
|
82 |
IMPORT_C TInt AddRule(TGrammarID aGrammarID, TLexiconID aLexiconID,
|
williamr@2
|
83 |
TPronunciationID aPronunciationID, TRuleID& aRuleID);
|
williamr@2
|
84 |
|
williamr@2
|
85 |
/**
|
williamr@2
|
86 |
Cancels the current operation.
|
williamr@2
|
87 |
|
williamr@2
|
88 |
@since 8.0
|
williamr@2
|
89 |
*/
|
williamr@2
|
90 |
IMPORT_C void Cancel();
|
williamr@2
|
91 |
|
williamr@2
|
92 |
/**
|
williamr@2
|
93 |
Commits the current train operation to the database.
|
williamr@2
|
94 |
|
williamr@2
|
95 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
williamr@2
|
96 |
another of the system-wide error codes.
|
williamr@2
|
97 |
|
williamr@2
|
98 |
@since 8.0
|
williamr@2
|
99 |
*/
|
williamr@2
|
100 |
IMPORT_C TInt CommitChanges();
|
williamr@2
|
101 |
|
williamr@2
|
102 |
/**
|
williamr@2
|
103 |
Creates a new grammar.
|
williamr@2
|
104 |
|
williamr@2
|
105 |
@param aGrammarID
|
williamr@2
|
106 |
A reference to where the grammar ID is stored.
|
williamr@2
|
107 |
|
williamr@2
|
108 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
williamr@2
|
109 |
another of the system-wide error codes.
|
williamr@2
|
110 |
|
williamr@2
|
111 |
@since 8.0
|
williamr@2
|
112 |
*/
|
williamr@2
|
113 |
IMPORT_C TInt CreateGrammar(TGrammarID& aGrammarID);
|
williamr@2
|
114 |
|
williamr@2
|
115 |
/**
|
williamr@2
|
116 |
Creates a new lexicon.
|
williamr@2
|
117 |
|
williamr@2
|
118 |
@param aLexiconID
|
williamr@2
|
119 |
A reference where lexicon ID is stored.
|
williamr@2
|
120 |
|
williamr@2
|
121 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
williamr@2
|
122 |
another of the system-wide error codes.
|
williamr@2
|
123 |
|
williamr@2
|
124 |
@since 8.0
|
williamr@2
|
125 |
*/
|
williamr@2
|
126 |
IMPORT_C TInt CreateLexicon(TLexiconID& aLexiconID);
|
williamr@2
|
127 |
|
williamr@2
|
128 |
/**
|
williamr@2
|
129 |
Creates a new model bank.
|
williamr@2
|
130 |
|
williamr@2
|
131 |
@param aModelBankID
|
williamr@2
|
132 |
A reference to where a new model bank ID is assigned.
|
williamr@2
|
133 |
|
williamr@2
|
134 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
williamr@2
|
135 |
another of the system-wide error codes.
|
williamr@2
|
136 |
|
williamr@2
|
137 |
@since 8.0
|
williamr@2
|
138 |
*/
|
williamr@2
|
139 |
IMPORT_C TInt CreateModelBank(TModelBankID& aModelBankID);
|
williamr@2
|
140 |
|
williamr@2
|
141 |
/**
|
williamr@2
|
142 |
Ends the current recognition session.
|
williamr@2
|
143 |
|
williamr@2
|
144 |
The resources allocated for recognition are freed.
|
williamr@2
|
145 |
|
williamr@2
|
146 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
williamr@2
|
147 |
another of the system-wide error codes.
|
williamr@2
|
148 |
|
williamr@2
|
149 |
@since 8.0
|
williamr@2
|
150 |
*/
|
williamr@2
|
151 |
IMPORT_C TInt EndRecSession();
|
williamr@2
|
152 |
|
williamr@2
|
153 |
/**
|
williamr@2
|
154 |
Returns all grammar IDs owned by the client.
|
williamr@2
|
155 |
|
williamr@2
|
156 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
williamr@2
|
157 |
another of the system-wide error codes.
|
williamr@2
|
158 |
|
williamr@2
|
159 |
@since 8.0
|
williamr@2
|
160 |
*/
|
williamr@2
|
161 |
IMPORT_C TInt GetAllClientGrammarIDs();
|
williamr@2
|
162 |
|
williamr@2
|
163 |
/**
|
williamr@2
|
164 |
Returns all lexicon IDs owned by the client.
|
williamr@2
|
165 |
|
williamr@2
|
166 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
williamr@2
|
167 |
another of the system-wide error codes.
|
williamr@2
|
168 |
|
williamr@2
|
169 |
@since 8.0
|
williamr@2
|
170 |
*/
|
williamr@2
|
171 |
IMPORT_C TInt GetAllClientLexiconIDs();
|
williamr@2
|
172 |
|
williamr@2
|
173 |
/**
|
williamr@2
|
174 |
Returns all modelBank IDs owned by the client.
|
williamr@2
|
175 |
|
williamr@2
|
176 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
williamr@2
|
177 |
another of the system-wide error codes.
|
williamr@2
|
178 |
|
williamr@2
|
179 |
@since 8.0
|
williamr@2
|
180 |
*/
|
williamr@2
|
181 |
IMPORT_C TInt GetAllClientModelBankIDs();
|
williamr@2
|
182 |
|
williamr@2
|
183 |
/**
|
williamr@2
|
184 |
Returns all grammar IDs owned by the client.
|
williamr@2
|
185 |
|
williamr@2
|
186 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
williamr@2
|
187 |
another of the system-wide error codes.
|
williamr@2
|
188 |
|
williamr@2
|
189 |
@since 8.0
|
williamr@2
|
190 |
*/
|
williamr@2
|
191 |
IMPORT_C TInt GetAllGrammarIDs();
|
williamr@2
|
192 |
|
williamr@2
|
193 |
/**
|
williamr@2
|
194 |
Returns all lexicon IDs owned by the client.
|
williamr@2
|
195 |
|
williamr@2
|
196 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
williamr@2
|
197 |
another of the system-wide error codes.
|
williamr@2
|
198 |
|
williamr@2
|
199 |
@since 8.0
|
williamr@2
|
200 |
*/
|
williamr@2
|
201 |
IMPORT_C TInt GetAllLexiconIDs();
|
williamr@2
|
202 |
|
williamr@2
|
203 |
|
williamr@2
|
204 |
/**
|
williamr@2
|
205 |
Returns all modelBank IDs owned by the client.
|
williamr@2
|
206 |
|
williamr@2
|
207 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
williamr@2
|
208 |
another of the system-wide error codes.
|
williamr@2
|
209 |
|
williamr@2
|
210 |
@since 8.0
|
williamr@2
|
211 |
*/
|
williamr@2
|
212 |
IMPORT_C TInt GetAllModelBankIDs();
|
williamr@2
|
213 |
|
williamr@2
|
214 |
/**
|
williamr@2
|
215 |
Returns all model IDs that exist in the specified model bank.
|
williamr@2
|
216 |
|
williamr@2
|
217 |
@param aModelBankID
|
williamr@2
|
218 |
The model bank ID.
|
williamr@2
|
219 |
|
williamr@2
|
220 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
williamr@2
|
221 |
another of the system-wide error codes.
|
williamr@2
|
222 |
|
williamr@2
|
223 |
@since 8.0
|
williamr@2
|
224 |
*/
|
williamr@2
|
225 |
IMPORT_C TInt GetAllModelIDs(TModelBankID aModelBankID);
|
williamr@2
|
226 |
|
williamr@2
|
227 |
/**
|
williamr@2
|
228 |
Returns all pronunciation IDs that exist in the specified lexicon.
|
williamr@2
|
229 |
|
williamr@2
|
230 |
@param aLexiconID
|
williamr@2
|
231 |
The lexicon ID.
|
williamr@2
|
232 |
|
williamr@2
|
233 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
williamr@2
|
234 |
another of the system-wide error codes.
|
williamr@2
|
235 |
|
williamr@2
|
236 |
@since 8.0
|
williamr@2
|
237 |
*/
|
williamr@2
|
238 |
IMPORT_C TInt GetAllPronunciationIDs(TLexiconID aLexiconID);
|
williamr@2
|
239 |
|
williamr@2
|
240 |
/**
|
williamr@2
|
241 |
Returns all rule IDs that exist in the specified grammar.
|
williamr@2
|
242 |
|
williamr@2
|
243 |
@param aGrammarID
|
williamr@2
|
244 |
The grammar ID.
|
williamr@2
|
245 |
|
williamr@2
|
246 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
williamr@2
|
247 |
another of the system-wide error codes.
|
williamr@2
|
248 |
|
williamr@2
|
249 |
@since 8.0
|
williamr@2
|
250 |
*/
|
williamr@2
|
251 |
IMPORT_C TInt GetAllRuleIDs(TGrammarID aGrammarID);
|
williamr@2
|
252 |
|
williamr@2
|
253 |
/**
|
williamr@2
|
254 |
Returns the number of models available for training system wide,
|
williamr@2
|
255 |
based on available disk space.
|
williamr@2
|
256 |
|
williamr@2
|
257 |
@param aAvailableStorage
|
williamr@2
|
258 |
The number of models that can be held in available storage space.
|
williamr@2
|
259 |
|
williamr@2
|
260 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
williamr@2
|
261 |
another of the system-wide error codes.
|
williamr@2
|
262 |
|
williamr@2
|
263 |
@since 8.0
|
williamr@2
|
264 |
*/
|
williamr@2
|
265 |
IMPORT_C TInt GetAvailableStorage(TInt& aAvailableStorage);
|
williamr@2
|
266 |
|
williamr@2
|
267 |
/**
|
williamr@2
|
268 |
Returns the engine properties specified by the engine property
|
williamr@2
|
269 |
ID array. On return aPropertyValue contains an array of engine
|
williamr@2
|
270 |
properties.
|
williamr@2
|
271 |
|
williamr@2
|
272 |
@param aPropertyId
|
williamr@2
|
273 |
A constant reference to an array of engine property IDs.
|
williamr@2
|
274 |
@param aPropertyValue
|
williamr@2
|
275 |
A reference to an array of engine property values.
|
williamr@2
|
276 |
|
williamr@2
|
277 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
williamr@2
|
278 |
another of the system-wide error codes.
|
williamr@2
|
279 |
|
williamr@2
|
280 |
@since 8.0
|
williamr@2
|
281 |
*/
|
williamr@2
|
282 |
IMPORT_C TInt GetEngineProperties(const RArray<TInt>& aPropertyId,
|
williamr@2
|
283 |
RArray<TInt>& aPropertyValue);
|
williamr@2
|
284 |
|
williamr@2
|
285 |
/**
|
williamr@2
|
286 |
Returns the number of models in the specified model bank.
|
williamr@2
|
287 |
|
williamr@2
|
288 |
@param aModelBankID
|
williamr@2
|
289 |
The model bank ID.
|
williamr@2
|
290 |
@param aModelCount
|
williamr@2
|
291 |
The reference where the number of models is set.
|
williamr@2
|
292 |
|
williamr@2
|
293 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
williamr@2
|
294 |
another of the system-wide error codes.
|
williamr@2
|
295 |
|
williamr@2
|
296 |
@since 8.0
|
williamr@2
|
297 |
*/
|
williamr@2
|
298 |
IMPORT_C TInt GetModelCount(TModelBankID aModelBankID,
|
williamr@2
|
299 |
TInt& aModelCount);
|
williamr@2
|
300 |
|
williamr@2
|
301 |
|
williamr@2
|
302 |
/**
|
williamr@2
|
303 |
Checks if the rule is valid or not.
|
williamr@2
|
304 |
|
williamr@2
|
305 |
@param aGrammarID
|
williamr@2
|
306 |
The grammar ID.
|
williamr@2
|
307 |
@param aRuleID
|
williamr@2
|
308 |
The rule ID.
|
williamr@2
|
309 |
@param aValid
|
williamr@2
|
310 |
A reference where the validity of the rule is set.
|
williamr@2
|
311 |
|
williamr@2
|
312 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
williamr@2
|
313 |
another of the system-wide error codes.
|
williamr@2
|
314 |
|
williamr@2
|
315 |
@since 8.0
|
williamr@2
|
316 |
*/
|
williamr@2
|
317 |
IMPORT_C TInt GetRuleValidity(TGrammarID aGrammarID, TRuleID aRuleID,
|
williamr@2
|
318 |
TBool& aValid);
|
williamr@2
|
319 |
|
williamr@2
|
320 |
/**
|
williamr@2
|
321 |
*
|
williamr@2
|
322 |
* Returns the duration of the utterance for the specified model.
|
williamr@2
|
323 |
* @since 8.0
|
williamr@2
|
324 |
* @param aModelBankID model bank Id
|
williamr@2
|
325 |
* @param aModelID model Id
|
williamr@2
|
326 |
* @param aDuration reference where the duration of
|
williamr@2
|
327 |
* utterance is set
|
williamr@2
|
328 |
* @return System-wide errors
|
williamr@2
|
329 |
*/
|
williamr@2
|
330 |
IMPORT_C TInt GetUtteranceDuration(TModelBankID aModelBankID,
|
williamr@2
|
331 |
TModelID aModelID, TTimeIntervalMicroSeconds32& aDuration);
|
williamr@2
|
332 |
|
williamr@2
|
333 |
/**
|
williamr@2
|
334 |
Loads the specified grammar into the recognizer; done prior to recognition.
|
williamr@2
|
335 |
|
williamr@2
|
336 |
@param aGrammarID
|
williamr@2
|
337 |
The grammar ID.
|
williamr@2
|
338 |
|
williamr@2
|
339 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
williamr@2
|
340 |
another of the system-wide error codes.
|
williamr@2
|
341 |
|
williamr@2
|
342 |
@since 8.0
|
williamr@2
|
343 |
*/
|
williamr@2
|
344 |
IMPORT_C TInt LoadGrammar(TGrammarID aGrammarID);
|
williamr@2
|
345 |
|
williamr@2
|
346 |
/**
|
williamr@2
|
347 |
Loads the specified lexicon into the recognizer; done prior to recognition.
|
williamr@2
|
348 |
|
williamr@2
|
349 |
@param aLexiconID
|
williamr@2
|
350 |
The lexicon ID.
|
williamr@2
|
351 |
|
williamr@2
|
352 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
williamr@2
|
353 |
another of the system-wide error codes.
|
williamr@2
|
354 |
|
williamr@2
|
355 |
@since 8.0
|
williamr@2
|
356 |
*/
|
williamr@2
|
357 |
IMPORT_C TInt LoadLexicon(TLexiconID aLexiconID);
|
williamr@2
|
358 |
|
williamr@2
|
359 |
/**
|
williamr@2
|
360 |
Loads the specified model bank into the recognizer; done prior to recognition.
|
williamr@2
|
361 |
|
williamr@2
|
362 |
@param aModelBankID
|
williamr@2
|
363 |
The model bank ID.
|
williamr@2
|
364 |
|
williamr@2
|
365 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
williamr@2
|
366 |
another of the system-wide error codes.
|
williamr@2
|
367 |
|
williamr@2
|
368 |
@since 8.0
|
williamr@2
|
369 |
*/
|
williamr@2
|
370 |
IMPORT_C TInt LoadModels(TModelBankID aModelBankID);
|
williamr@2
|
371 |
|
williamr@2
|
372 |
/**
|
williamr@2
|
373 |
Plays the previously trained utterance.
|
williamr@2
|
374 |
|
williamr@2
|
375 |
@param aModelBankID
|
williamr@2
|
376 |
The model bank ID.
|
williamr@2
|
377 |
@param aModelID
|
williamr@2
|
378 |
The model ID, whose utterance is played.
|
williamr@2
|
379 |
|
williamr@2
|
380 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
williamr@2
|
381 |
another of the system-wide error codes.
|
williamr@2
|
382 |
|
williamr@2
|
383 |
@since 8.0
|
williamr@2
|
384 |
*/
|
williamr@2
|
385 |
IMPORT_C TInt PlayUtterance(TModelBankID aModelBankID,
|
williamr@2
|
386 |
TModelID aModelID);
|
williamr@2
|
387 |
|
williamr@2
|
388 |
/**
|
williamr@2
|
389 |
Initiates recognition; performed following loading of model bank, lexicon, and grammar.
|
williamr@2
|
390 |
|
williamr@2
|
391 |
@param aResultSet
|
williamr@2
|
392 |
A reference where the recognition result is set.
|
williamr@2
|
393 |
|
williamr@2
|
394 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
williamr@2
|
395 |
another of the system-wide error codes.
|
williamr@2
|
396 |
|
williamr@2
|
397 |
@since 8.0
|
williamr@2
|
398 |
*/
|
williamr@2
|
399 |
IMPORT_C TInt Recognize(CSDClientResultSet& aResultSet);
|
williamr@2
|
400 |
|
williamr@2
|
401 |
/**
|
williamr@2
|
402 |
Records the user utterance for training and recognition.
|
williamr@2
|
403 |
|
williamr@2
|
404 |
@param aRecordTime
|
williamr@2
|
405 |
The recording time in microseconds.
|
williamr@2
|
406 |
|
williamr@2
|
407 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
williamr@2
|
408 |
another of the system-wide error codes.
|
williamr@2
|
409 |
|
williamr@2
|
410 |
@since 8.0
|
williamr@2
|
411 |
*/
|
williamr@2
|
412 |
IMPORT_C TInt Record(TTimeIntervalMicroSeconds32 aRecordTime);
|
williamr@2
|
413 |
|
williamr@2
|
414 |
/**
|
williamr@2
|
415 |
Removes the specified grammar from the permanent storage.
|
williamr@2
|
416 |
|
williamr@2
|
417 |
Removing a grammar will remove all rules within the grammar.
|
williamr@2
|
418 |
|
williamr@2
|
419 |
@param aGrammarID
|
williamr@2
|
420 |
The grammar ID.
|
williamr@2
|
421 |
|
williamr@2
|
422 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
williamr@2
|
423 |
another of the system-wide error codes.
|
williamr@2
|
424 |
|
williamr@2
|
425 |
@since 8.0
|
williamr@2
|
426 |
*/
|
williamr@2
|
427 |
IMPORT_C TInt RemoveGrammar(TGrammarID aGrammarID);
|
williamr@2
|
428 |
|
williamr@2
|
429 |
/**
|
williamr@2
|
430 |
Removes the specified lexicon from the permanent storage.
|
williamr@2
|
431 |
|
williamr@2
|
432 |
Removing a lexicon will remove all pronunciations within the lexicon.
|
williamr@2
|
433 |
|
williamr@2
|
434 |
@param aLexiconID
|
williamr@2
|
435 |
The lexicon ID.
|
williamr@2
|
436 |
|
williamr@2
|
437 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
williamr@2
|
438 |
another of the system-wide error codes.
|
williamr@2
|
439 |
@since 8.0
|
williamr@2
|
440 |
*/
|
williamr@2
|
441 |
IMPORT_C TInt RemoveLexicon(TLexiconID aLexiconID);
|
williamr@2
|
442 |
|
williamr@2
|
443 |
/**
|
williamr@2
|
444 |
Removes the specified model bank from the permanent storage.
|
williamr@2
|
445 |
|
williamr@2
|
446 |
Removing a model bank will remove all models within the model bank.
|
williamr@2
|
447 |
|
williamr@2
|
448 |
@param aModelBankID
|
williamr@2
|
449 |
The model bank ID.
|
williamr@2
|
450 |
|
williamr@2
|
451 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
williamr@2
|
452 |
another of the system-wide error codes.
|
williamr@2
|
453 |
|
williamr@2
|
454 |
@since 8.0
|
williamr@2
|
455 |
*/
|
williamr@2
|
456 |
IMPORT_C TInt RemoveModelBank(TModelBankID aModelBankID);
|
williamr@2
|
457 |
|
williamr@2
|
458 |
/**
|
williamr@2
|
459 |
Removes the specified model from the specified model bank permanently.
|
williamr@2
|
460 |
|
williamr@2
|
461 |
@param aModelBankID
|
williamr@2
|
462 |
The model bank ID.
|
williamr@2
|
463 |
@param aModelID
|
williamr@2
|
464 |
The model ID.
|
williamr@2
|
465 |
|
williamr@2
|
466 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
williamr@2
|
467 |
another of the system-wide error codes.
|
williamr@2
|
468 |
|
williamr@2
|
469 |
@since 8.0
|
williamr@2
|
470 |
*/
|
williamr@2
|
471 |
IMPORT_C TInt RemoveModel(TModelBankID aModelBankID,
|
williamr@2
|
472 |
TModelID aModelID);
|
williamr@2
|
473 |
|
williamr@2
|
474 |
/**
|
williamr@2
|
475 |
Removes the specified pronunciation from the specified lexicon permanently.
|
williamr@2
|
476 |
|
williamr@2
|
477 |
@param aLexiconID
|
williamr@2
|
478 |
The lexicon ID.
|
williamr@2
|
479 |
@param aPronunciationID
|
williamr@2
|
480 |
The pronunciation ID.
|
williamr@2
|
481 |
|
williamr@2
|
482 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
williamr@2
|
483 |
another of the system-wide error codes.
|
williamr@2
|
484 |
|
williamr@2
|
485 |
@since 8.0
|
williamr@2
|
486 |
*/
|
williamr@2
|
487 |
IMPORT_C TInt RemovePronunciation(TLexiconID aLexiconID,
|
williamr@2
|
488 |
TPronunciationID aPronunciationID);
|
williamr@2
|
489 |
|
williamr@2
|
490 |
/**
|
williamr@2
|
491 |
Removes the specified rule from the specified grammar permanently.
|
williamr@2
|
492 |
|
williamr@2
|
493 |
@param aGrammarID
|
williamr@2
|
494 |
The grammar ID.
|
williamr@2
|
495 |
@param aRuleID
|
williamr@2
|
496 |
The rule ID.
|
williamr@2
|
497 |
|
williamr@2
|
498 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
williamr@2
|
499 |
another of the system-wide error codes.
|
williamr@2
|
500 |
|
williamr@2
|
501 |
@since 8.0
|
williamr@2
|
502 |
*/
|
williamr@2
|
503 |
IMPORT_C TInt RemoveRule(TGrammarID aGrammarID, TRuleID aRuleID);
|
williamr@2
|
504 |
|
williamr@2
|
505 |
/**
|
williamr@2
|
506 |
Sets the client UID for client.
|
williamr@2
|
507 |
|
williamr@2
|
508 |
@param aClientUid
|
williamr@2
|
509 |
The client UID.
|
williamr@2
|
510 |
|
williamr@2
|
511 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
williamr@2
|
512 |
another of the system-wide error codes.
|
williamr@2
|
513 |
|
williamr@2
|
514 |
@since 8.0
|
williamr@2
|
515 |
*/
|
williamr@2
|
516 |
IMPORT_C TInt SetClientUid(TUid aClientUid);
|
williamr@2
|
517 |
|
williamr@2
|
518 |
/**
|
williamr@2
|
519 |
Starts a new recognition session.
|
williamr@2
|
520 |
|
williamr@2
|
521 |
@param aMode
|
williamr@2
|
522 |
The recognition mode.
|
williamr@2
|
523 |
|
williamr@2
|
524 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
williamr@2
|
525 |
another of the system-wide error codes.
|
williamr@2
|
526 |
|
williamr@2
|
527 |
@since 8.0
|
williamr@2
|
528 |
*/
|
williamr@2
|
529 |
IMPORT_C TInt StartRecSession(TRecognitionMode aMode);
|
williamr@2
|
530 |
|
williamr@2
|
531 |
/**
|
williamr@2
|
532 |
Trains a new model into the specified model bank.
|
williamr@2
|
533 |
|
williamr@2
|
534 |
@param aModelBankID
|
williamr@2
|
535 |
The model bank ID.
|
williamr@2
|
536 |
@param aModelID
|
williamr@2
|
537 |
The reference to where a new model ID is assigned.
|
williamr@2
|
538 |
|
williamr@2
|
539 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
williamr@2
|
540 |
another of the system-wide error codes.
|
williamr@2
|
541 |
|
williamr@2
|
542 |
@since 8.0
|
williamr@2
|
543 |
*/
|
williamr@2
|
544 |
IMPORT_C TInt Train(TModelBankID aModelBankID, TModelID& aModelID);
|
williamr@2
|
545 |
|
williamr@2
|
546 |
/**
|
williamr@2
|
547 |
Unloads the specified rule from the specified grammar in temporary
|
williamr@2
|
548 |
memory, previously loaded with LoadGrammarL(). The rule in the
|
williamr@2
|
549 |
permanent storage remains intact.
|
williamr@2
|
550 |
|
williamr@2
|
551 |
@param aGrammarID
|
williamr@2
|
552 |
The grammar ID.
|
williamr@2
|
553 |
@param aRuleID
|
williamr@2
|
554 |
The rule ID.
|
williamr@2
|
555 |
|
williamr@2
|
556 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
williamr@2
|
557 |
another of the system-wide error codes.
|
williamr@2
|
558 |
|
williamr@2
|
559 |
@since 8.0
|
williamr@2
|
560 |
*/
|
williamr@2
|
561 |
IMPORT_C TInt UnloadRule(TGrammarID aGrammarID, TRuleID aRuleID);
|
williamr@2
|
562 |
|
williamr@2
|
563 |
/**
|
williamr@2
|
564 |
Uploads the specified parameters into the engine.
|
williamr@2
|
565 |
|
williamr@2
|
566 |
@param aParameterId
|
williamr@2
|
567 |
An array of parameter IDs.
|
williamr@2
|
568 |
@param aParameterValue
|
williamr@2
|
569 |
An array of parameter values.
|
williamr@2
|
570 |
|
williamr@2
|
571 |
@return An error code indicating if the function call was successful. KErrNone on success, otherwise
|
williamr@2
|
572 |
another of the system-wide error codes.
|
williamr@2
|
573 |
|
williamr@2
|
574 |
@since 8.0
|
williamr@2
|
575 |
*/
|
williamr@2
|
576 |
IMPORT_C TInt LoadEngineParameters(const RArray<TInt>& aParameterId,
|
williamr@2
|
577 |
const RArray<TInt>& aParameterValue);
|
williamr@2
|
578 |
|
williamr@2
|
579 |
/**
|
williamr@2
|
580 |
Gets an array of pronunciation IDs previously requested by GetAllPronunciationIDs.
|
williamr@2
|
581 |
|
williamr@2
|
582 |
@param aPronunciationIDs
|
williamr@2
|
583 |
An array to store pronunciation IDs.
|
williamr@2
|
584 |
|
williamr@2
|
585 |
@since 8.0
|
williamr@2
|
586 |
*/
|
williamr@2
|
587 |
IMPORT_C void GetPronunciationIDArrayL(RArray<TPronunciationID>& aPronunciationIDs);
|
williamr@2
|
588 |
|
williamr@2
|
589 |
/**
|
williamr@2
|
590 |
Gets an array of rule IDs previously requested by GetAllRuleIDs.
|
williamr@2
|
591 |
|
williamr@2
|
592 |
@param aRuleIDs
|
williamr@2
|
593 |
An array to store rule IDs.
|
williamr@2
|
594 |
|
williamr@2
|
595 |
@since 8.0
|
williamr@2
|
596 |
*/
|
williamr@2
|
597 |
IMPORT_C void GetRuleIDArrayL(RArray<TRuleID>& aRuleIDs);
|
williamr@2
|
598 |
|
williamr@2
|
599 |
/**
|
williamr@2
|
600 |
Gets an array of model IDs previously requested by GetAllModelIDs.
|
williamr@2
|
601 |
|
williamr@2
|
602 |
@param aModelIDs
|
williamr@2
|
603 |
An array to store model IDs.
|
williamr@2
|
604 |
|
williamr@2
|
605 |
@since 8.0
|
williamr@2
|
606 |
*/
|
williamr@2
|
607 |
IMPORT_C void GetModelIDArrayL(RArray<TModelID>& aModelIDs);
|
williamr@2
|
608 |
|
williamr@2
|
609 |
/**
|
williamr@2
|
610 |
Gets an array of grammar IDs previously requested by GetAllGrammarIDs.
|
williamr@2
|
611 |
|
williamr@2
|
612 |
@param aGrammarIDs
|
williamr@2
|
613 |
An array to store grammar IDs.
|
williamr@2
|
614 |
|
williamr@2
|
615 |
@since 8.0
|
williamr@2
|
616 |
*/
|
williamr@2
|
617 |
IMPORT_C void GetGrammarIDArrayL(RArray<TGrammarID>& aGrammarIDs);
|
williamr@2
|
618 |
|
williamr@2
|
619 |
/**
|
williamr@2
|
620 |
Gets an array of lexicon IDs previously requested by GetAllLexiconIDs.
|
williamr@2
|
621 |
|
williamr@2
|
622 |
@param aLexiconIDs
|
williamr@2
|
623 |
An array to store lexicon IDs.
|
williamr@2
|
624 |
|
williamr@2
|
625 |
@since 8.0
|
williamr@2
|
626 |
*/
|
williamr@2
|
627 |
IMPORT_C void GetLexiconIDArrayL(RArray<TLexiconID>& aLexiconIDs);
|
williamr@2
|
628 |
|
williamr@2
|
629 |
|
williamr@2
|
630 |
/**
|
williamr@2
|
631 |
Gets an array of modelBank IDs previously requested by GetAllModelBankIDs.
|
williamr@2
|
632 |
|
williamr@2
|
633 |
@param aModelBankIDs
|
williamr@2
|
634 |
An array to store modelBank IDs.
|
williamr@2
|
635 |
|
williamr@2
|
636 |
@since 8.0
|
williamr@2
|
637 |
*/
|
williamr@2
|
638 |
IMPORT_C void GetModelBankIDArrayL(RArray<TModelBankID>& aModelBankIDs);
|
williamr@2
|
639 |
|
williamr@2
|
640 |
|
williamr@2
|
641 |
/**
|
williamr@2
|
642 |
Gets a client result set previously created by a call to Recognise().
|
williamr@2
|
643 |
|
williamr@2
|
644 |
@param aResultSet
|
williamr@2
|
645 |
The ResultSet used to contain the recognition results
|
williamr@2
|
646 |
|
williamr@2
|
647 |
@since 8.0
|
williamr@2
|
648 |
*/
|
williamr@2
|
649 |
IMPORT_C void GetResultSetL(CSDClientResultSet& aResultSet);
|
williamr@2
|
650 |
|
williamr@2
|
651 |
private:
|
williamr@2
|
652 |
void DoGetEnginePropertiesL(const RArray<TInt>& aPropertyId,
|
williamr@2
|
653 |
RArray<TInt>& aPropertyValue);
|
williamr@2
|
654 |
void DoLoadEngineParametersL(const RArray<TInt>& aParameterId,
|
williamr@2
|
655 |
const RArray<TInt>& aParameterValue);
|
williamr@2
|
656 |
|
williamr@2
|
657 |
|
williamr@2
|
658 |
CBufFlat* ExternalizeIntArrayL(const RArray<TInt>& aArray);
|
williamr@2
|
659 |
void InternalizeIntArrayL(TDes8& aDes, TInt aNumberElements, RArray<TInt>& aArray);
|
williamr@2
|
660 |
|
williamr@2
|
661 |
void DoRecognizeL(CSDClientResultSet& aResultSet);
|
williamr@2
|
662 |
private:
|
williamr@2
|
663 |
TAny* iReservedPtr_1; // reserved for future expansion
|
williamr@2
|
664 |
TAny* iReservedPtr_2; // reserved for future expansion
|
williamr@2
|
665 |
};
|
williamr@2
|
666 |
|
williamr@2
|
667 |
#endif // __SPEECHRECOGNITIONCUSTOMCOMMANDS_H__
|