|
1 /* |
|
2 * Copyright (c) 2003-2006 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: The MNssTrainVoiceEventHandler class provides the call back methods to handle |
|
15 * the events during Train operation. |
|
16 * |
|
17 */ |
|
18 |
|
19 |
|
20 #ifndef NSSVASMTRAINVOICEEVENTHANDLER_H |
|
21 #define NSSVASMTRAINVOICEEVENTHANDLER_H |
|
22 |
|
23 /** |
|
24 * The MNssTrainVoiceEventHandler class provides the call back methods to handle |
|
25 * the events during Train operation. |
|
26 * |
|
27 * @lib NssVASApi.lib |
|
28 * @since 2.0 |
|
29 */ |
|
30 class MNssTrainVoiceEventHandler |
|
31 { |
|
32 public: //enum |
|
33 |
|
34 /** |
|
35 * TNssTrainResult will have all the enums to represent the result values from |
|
36 * HandleTrainFailed method. |
|
37 * |
|
38 * NOTE: |
|
39 * The HandleTrainFailed() should handle the undefined error for TNssTrainResult. |
|
40 */ |
|
41 enum TNssTrainResult |
|
42 { |
|
43 EVasTrainFailed = 1, |
|
44 EVasRecordFailed, |
|
45 EVasTrainFailedNoSpeech, |
|
46 EVasTrainFailedTooEarly, |
|
47 EVasTrainFailedTooLong, |
|
48 EVasTrainFailedTooShort, |
|
49 EVasTagSpaceUnavailable, |
|
50 EVasTrainNoMemory, |
|
51 EVasTrainAccessDeny, |
|
52 EVasTrainUndefinedError10, // for place holder |
|
53 EVasTrainUndefinedError9, |
|
54 EVasTrainUndefinedError8, |
|
55 EVasTrainUndefinedError7, |
|
56 EVasTrainUndefinedError6, |
|
57 EVasTrainUndefinedError5, |
|
58 EVasTrainUndefinedError4, |
|
59 EVasTrainUndefinedError3, |
|
60 EVasTrainUndefinedError2, |
|
61 EVasTrainUndefinedError1 |
|
62 }; |
|
63 |
|
64 |
|
65 public: |
|
66 |
|
67 |
|
68 /** |
|
69 * Ready To Record Event - Recognizer is ready to receive the input speech |
|
70 * @since 2.0 |
|
71 * @param no parameter |
|
72 * @return no return value |
|
73 */ |
|
74 virtual void HandleReadyToRecord() = 0; |
|
75 |
|
76 |
|
77 /** |
|
78 * Record Started Event - Recognizer is receiving the input speech |
|
79 * @since 2.0 |
|
80 * @param no parameter |
|
81 * @return no return value |
|
82 */ |
|
83 virtual void HandleRecordStarted() = 0; |
|
84 |
|
85 /** |
|
86 * End Of Utterance Event - Recognizer has finished receiving the input speech |
|
87 * @since 2.0 |
|
88 * @param no parameter |
|
89 * @return no return value |
|
90 */ |
|
91 virtual void HandleEouDetected() = 0; |
|
92 |
|
93 /** |
|
94 * Train Complete Event - Recognizer has trained the input speech |
|
95 * by creating a model. |
|
96 * @since 2.0 |
|
97 * @param aErrorCode KErrNone if training was successfull |
|
98 * @return no return value |
|
99 */ |
|
100 virtual void HandleTrainComplete( TInt aErrorCode ) = 0; |
|
101 |
|
102 }; |
|
103 |
|
104 #endif // NSSVASMTRAINVOICEEVENTHANDLER_H |
|
105 |
|
106 // End of File |