sl@0
|
1 |
// Copyright (c) 2002-2009 Nokia Corporation and/or its subsidiary(-ies).
|
sl@0
|
2 |
// All rights reserved.
|
sl@0
|
3 |
// This component and the accompanying materials are made available
|
sl@0
|
4 |
// under the terms of "Eclipse Public License v1.0"
|
sl@0
|
5 |
// which accompanies this distribution, and is available
|
sl@0
|
6 |
// at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
sl@0
|
7 |
//
|
sl@0
|
8 |
// Initial Contributors:
|
sl@0
|
9 |
// Nokia Corporation - initial contribution.
|
sl@0
|
10 |
//
|
sl@0
|
11 |
// Contributors:
|
sl@0
|
12 |
//
|
sl@0
|
13 |
// Description:
|
sl@0
|
14 |
//
|
sl@0
|
15 |
|
sl@0
|
16 |
#ifndef __SPEECHRECOGNTIONDATACOMMON_H__
|
sl@0
|
17 |
#define __SPEECHRECOGNTIONDATACOMMON_H__
|
sl@0
|
18 |
|
sl@0
|
19 |
// INCLUDES
|
sl@0
|
20 |
#include <e32base.h>
|
sl@0
|
21 |
#include <speechrecognitionuids.hrh>
|
sl@0
|
22 |
|
sl@0
|
23 |
// TYPEDEFS
|
sl@0
|
24 |
typedef TUint32 TModelBankID;
|
sl@0
|
25 |
typedef TUint32 TModelID;
|
sl@0
|
26 |
typedef TUint32 TPhonemeID;
|
sl@0
|
27 |
typedef TUint32 TLexiconID;
|
sl@0
|
28 |
typedef TUint32 TPronunciationID;
|
sl@0
|
29 |
typedef TUint32 TGrammarID;
|
sl@0
|
30 |
typedef TUint32 TRuleID;
|
sl@0
|
31 |
|
sl@0
|
32 |
typedef TInt TSpeechRecognitionEvent;
|
sl@0
|
33 |
typedef TInt TSpeechRecognitionResult;
|
sl@0
|
34 |
|
sl@0
|
35 |
static const TUid KUidMediaTypeASR = {KUidMediaTypeASRDefine};
|
sl@0
|
36 |
|
sl@0
|
37 |
// CONSTANTS
|
sl@0
|
38 |
const TInt KUidAsrEventTrainReadyVal = 0x101FBF9E;
|
sl@0
|
39 |
const TInt KUidAsrEventTrainVal = 0x101FBF9F;
|
sl@0
|
40 |
const TInt KUidAsrEventAddPronunciationVal = 0x101FBFA0;
|
sl@0
|
41 |
const TInt KUidAsrEventAddRuleVal = 0x101FBFA1;
|
sl@0
|
42 |
const TInt KUidAsrEventLoadModelsVal = 0x101FBFA2;
|
sl@0
|
43 |
const TInt KUidAsrEventLoadLexiconVal = 0x101FBFA3;
|
sl@0
|
44 |
const TInt KUidAsrEventLoadGrammarVal = 0x101FBFA4;
|
sl@0
|
45 |
const TInt KUidAsrEventRecognitionReadyVal = 0x101FBFA5;
|
sl@0
|
46 |
const TInt KUidAsrEventRecognitionVal = 0x101FBFA6;
|
sl@0
|
47 |
const TInt KUidAsrEventUnloadRuleVal = 0x101FBFA7;
|
sl@0
|
48 |
const TInt KUidAsrEventRecordStartedVal = 0x101FBFA8;
|
sl@0
|
49 |
const TInt KUidAsrEventRecordVal = 0x101FBFA9;
|
sl@0
|
50 |
const TInt KUidAsrEventEouDetectedVal = 0x101FBFAA;
|
sl@0
|
51 |
const TInt KUidAsrEventPlayStartedVal = 0x101FBFAB;
|
sl@0
|
52 |
const TInt KUidAsrEventPlayVal = 0x101FBFAC;
|
sl@0
|
53 |
const TInt KUidAsrEventCreateGrammarVal = 0x101FBFAD;
|
sl@0
|
54 |
const TInt KUidAsrEventCreateLexiconVal = 0x101FBFAE;
|
sl@0
|
55 |
const TInt KUidAsrEventCreateModelBankVal = 0x101FBFAF;
|
sl@0
|
56 |
const TInt KUidAsrEventRemoveGrammarVal = 0x101FBFB0;
|
sl@0
|
57 |
const TInt KUidAsrEventRemoveLexiconVal = 0x101FBFB1;
|
sl@0
|
58 |
const TInt KUidAsrEventRemoveModelBankVal = 0x101FBFB2;
|
sl@0
|
59 |
const TInt KUidAsrEventRemoveRuleVal = 0x101FBFB3;
|
sl@0
|
60 |
const TInt KUidAsrEventRemovePronunciationVal = 0x101FBFB4;
|
sl@0
|
61 |
const TInt KUidAsrEventRemoveModelVal = 0x101FBFB5;
|
sl@0
|
62 |
const TInt KUidAsrEventGetAvailableStorageVal = 0x101FBFB6;
|
sl@0
|
63 |
const TInt KUidAsrEventGetRuleValidityVal = 0x101FBFB7;
|
sl@0
|
64 |
const TInt KUidAsrEventGetUtteranceDurationVal = 0x101FBFB8;
|
sl@0
|
65 |
const TInt KUidAsrEventGetModelCountVal = 0x101FBFB9;
|
sl@0
|
66 |
const TInt KUidAsrEventGetAllRuleIDsVal = 0x101FBFBA;
|
sl@0
|
67 |
const TInt KUidAsrEventGetAllPronunciationIDsVal = 0x101FBFBB;
|
sl@0
|
68 |
const TInt KUidAsrEventGetAllModelIDsVal = 0x101FBFBC;
|
sl@0
|
69 |
const TInt KUidAsrEventGetAllClientGrammarIDsVal = 0x101FBFBD;
|
sl@0
|
70 |
const TInt KUidAsrEventGetAllClientLexiconIDsVal = 0x101FBFBE;
|
sl@0
|
71 |
const TInt KUidAsrEventGetAllClientModelBankIDsVal = 0x101FBFBF;
|
sl@0
|
72 |
const TInt KUidAsrEventGetAllGrammarIDsVal = 0x101FBFC0;
|
sl@0
|
73 |
const TInt KUidAsrEventGetAllLexiconIDsVal = 0x101FBFC1;
|
sl@0
|
74 |
const TInt KUidAsrEventGetAllModelBankIDsVal = 0x101FBFC2;
|
sl@0
|
75 |
|
sl@0
|
76 |
const TUid KUidAsrEventTrainReady = {KUidAsrEventTrainReadyVal};
|
sl@0
|
77 |
const TUid KUidAsrEventTrain = {KUidAsrEventTrainVal};
|
sl@0
|
78 |
const TUid KUidAsrEventAddPronunciation = {KUidAsrEventAddPronunciationVal};
|
sl@0
|
79 |
const TUid KUidAsrEventAddRule = {KUidAsrEventAddRuleVal};
|
sl@0
|
80 |
const TUid KUidAsrEventLoadModels = {KUidAsrEventLoadModelsVal};
|
sl@0
|
81 |
const TUid KUidAsrEventLoadLexicon = {KUidAsrEventLoadLexiconVal};
|
sl@0
|
82 |
const TUid KUidAsrEventLoadGrammar = {KUidAsrEventLoadGrammarVal};
|
sl@0
|
83 |
const TUid KUidAsrEventRecognitionReady = {KUidAsrEventRecognitionReadyVal};
|
sl@0
|
84 |
const TUid KUidAsrEventRecognition = {KUidAsrEventRecognitionVal};
|
sl@0
|
85 |
const TUid KUidAsrEventUnloadRule = {KUidAsrEventUnloadRuleVal};
|
sl@0
|
86 |
const TUid KUidAsrEventRecordStarted = {KUidAsrEventRecordStartedVal};
|
sl@0
|
87 |
const TUid KUidAsrEventRecord = {KUidAsrEventRecordVal};
|
sl@0
|
88 |
const TUid KUidAsrEventEouDetected = {KUidAsrEventEouDetectedVal};
|
sl@0
|
89 |
const TUid KUidAsrEventPlayStarted = {KUidAsrEventPlayStartedVal};
|
sl@0
|
90 |
const TUid KUidAsrEventPlay = {KUidAsrEventPlayVal};
|
sl@0
|
91 |
const TUid KUidAsrEventCreateGrammar = {KUidAsrEventCreateGrammarVal};
|
sl@0
|
92 |
const TUid KUidAsrEventCreateLexicon = {KUidAsrEventCreateLexiconVal};
|
sl@0
|
93 |
const TUid KUidAsrEventCreateModelBank = {KUidAsrEventCreateModelBankVal};
|
sl@0
|
94 |
const TUid KUidAsrEventRemoveGrammar = {KUidAsrEventRemoveGrammarVal};
|
sl@0
|
95 |
const TUid KUidAsrEventRemoveLexicon = {KUidAsrEventRemoveLexiconVal};
|
sl@0
|
96 |
const TUid KUidAsrEventRemoveModelBank = {KUidAsrEventRemoveModelBankVal};
|
sl@0
|
97 |
const TUid KUidAsrEventRemoveRule = {KUidAsrEventRemoveRuleVal};
|
sl@0
|
98 |
const TUid KUidAsrEventRemovePronunciation = {KUidAsrEventRemovePronunciationVal};
|
sl@0
|
99 |
const TUid KUidAsrEventRemoveModel = {KUidAsrEventRemoveModelVal};
|
sl@0
|
100 |
const TUid KUidAsrEventGetAvailableStorage = {KUidAsrEventGetAvailableStorageVal};
|
sl@0
|
101 |
const TUid KUidAsrEventGetRuleValidity = {KUidAsrEventGetRuleValidityVal};
|
sl@0
|
102 |
const TUid KUidAsrEventGetUtteranceDuration = {KUidAsrEventGetUtteranceDurationVal};
|
sl@0
|
103 |
const TUid KUidAsrEventGetModelCount = {KUidAsrEventGetModelCountVal};
|
sl@0
|
104 |
const TUid KUidAsrEventGetAllRuleIDs = {KUidAsrEventGetAllRuleIDsVal};
|
sl@0
|
105 |
const TUid KUidAsrEventGetAllPronunciationIDs = {KUidAsrEventGetAllPronunciationIDsVal};
|
sl@0
|
106 |
const TUid KUidAsrEventGetAllModelIDs = {KUidAsrEventGetAllModelIDsVal};
|
sl@0
|
107 |
const TUid KUidAsrEventGetAllClientGrammarIDs = {KUidAsrEventGetAllClientGrammarIDsVal};
|
sl@0
|
108 |
const TUid KUidAsrEventGetAllClientLexiconIDs = {KUidAsrEventGetAllClientLexiconIDsVal};
|
sl@0
|
109 |
const TUid KUidAsrEventGetAllClientModelBankIDs = {KUidAsrEventGetAllClientModelBankIDsVal};
|
sl@0
|
110 |
const TUid KUidAsrEventGetAllGrammarIDs = {KUidAsrEventGetAllGrammarIDsVal};
|
sl@0
|
111 |
const TUid KUidAsrEventGetAllLexiconIDs = {KUidAsrEventGetAllLexiconIDsVal};
|
sl@0
|
112 |
const TUid KUidAsrEventGetAllModelBankIDs = {KUidAsrEventGetAllModelBankIDsVal};
|
sl@0
|
113 |
|
sl@0
|
114 |
// Speech Recognition Errors
|
sl@0
|
115 |
const TInt KErrAsrNoSpeech = -12050;
|
sl@0
|
116 |
const TInt KErrAsrSpeechTooEarly = -12051;
|
sl@0
|
117 |
const TInt KErrAsrSpeechTooLong = -12052;
|
sl@0
|
118 |
const TInt KErrAsrSpeechTooShort = -12053;
|
sl@0
|
119 |
const TInt KErrAsrNoMatch = -12054;
|
sl@0
|
120 |
const TInt KErrAsrDataRightViolation = -12055;
|
sl@0
|
121 |
const TInt KErrAsrNotRegisted = -12056;
|
sl@0
|
122 |
const TInt KErrAsrInvalidState = -12057;
|
sl@0
|
123 |
const TInt KErrAsrInitializationFailure = -12058;
|
sl@0
|
124 |
|
sl@0
|
125 |
// Pre-defined Engine Parameter Identifiers starts from index 0x01
|
sl@0
|
126 |
// User-define Engine Parameter Identifiers starts from index 0x10000 and end at index KMaxTInt.
|
sl@0
|
127 |
const TInt KRecognizerMode = 0x01;
|
sl@0
|
128 |
const TInt KGrammarSupport = 0x02;
|
sl@0
|
129 |
const TInt KLoadMultipleGrammars = 0x03;
|
sl@0
|
130 |
const TInt KLoadMultipleLexicons = 0x04;
|
sl@0
|
131 |
const TInt KLoadMultipleModelBanks = 0x05;
|
sl@0
|
132 |
const TInt KModelStorageCapacity = 0x06;
|
sl@0
|
133 |
const TInt KMaxLoadableModels = 0x07;
|
sl@0
|
134 |
const TInt KMaxFrontEndBackEndDelay = 0x08;
|
sl@0
|
135 |
const TInt KSamplingRate = 0x09;
|
sl@0
|
136 |
const TInt KBitsPerSample = 0x0A;
|
sl@0
|
137 |
|
sl@0
|
138 |
/**
|
sl@0
|
139 |
@publishedAll
|
sl@0
|
140 |
@released
|
sl@0
|
141 |
|
sl@0
|
142 |
Speech recognition mode.
|
sl@0
|
143 |
*/
|
sl@0
|
144 |
enum TRecognitionMode
|
sl@0
|
145 |
{
|
sl@0
|
146 |
/** Speaker dependant recognition mode.
|
sl@0
|
147 |
*/
|
sl@0
|
148 |
ESdMode,
|
sl@0
|
149 |
/** Speaker independant recognition mode.
|
sl@0
|
150 |
*/
|
sl@0
|
151 |
ESiMode,
|
sl@0
|
152 |
/** Combined speaker dependant and independant recognition mode.
|
sl@0
|
153 |
*/
|
sl@0
|
154 |
ESdSiMode
|
sl@0
|
155 |
};
|
sl@0
|
156 |
|
sl@0
|
157 |
/**
|
sl@0
|
158 |
@publishedAll
|
sl@0
|
159 |
@released
|
sl@0
|
160 |
|
sl@0
|
161 |
Grammar Support.
|
sl@0
|
162 |
*/
|
sl@0
|
163 |
enum TGrammarSupport
|
sl@0
|
164 |
{
|
sl@0
|
165 |
/** Simple grammar support only.
|
sl@0
|
166 |
*/
|
sl@0
|
167 |
ESimpleGrammar,
|
sl@0
|
168 |
/** Full W3C grammar support.
|
sl@0
|
169 |
*/
|
sl@0
|
170 |
EW3CGrammar
|
sl@0
|
171 |
};
|
sl@0
|
172 |
|
sl@0
|
173 |
#endif // __SPEECHRECOGNTIONDATACOMMON_H__
|