2 * Copyright (c) 2011-2014 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #ifndef __TIZEN_UIX_VOICE_CONTROL_DOC_H__
19 #define __TIZEN_UIX_VOICE_CONTROL_DOC_H__
22 * @defgroup CAPI_UIX_VOICE_CONTROL_MODULE Voice control
23 * @ingroup CAPI_UIX_FRAMEWORK
24 * @brief The @ref CAPI_UIX_VOICE_CONTROL_MODULE API provides functions for registering command and getting notification when registered command is recognized.
26 * @section CAPI_UIX_VOICE_CONTROL_MODULE_HEADER Required Header
27 * \#include <voice_control.h><br>
29 * @section CAPI_UIX_VOICE_CONTROL_MODULE_OVERVIEW Overview
30 * A main function of Voice Control API register command and gets notification for recognition result.
31 * Applications can add their own commands and be provided result when their command is recognized by user voice input.
33 * To use of Voice Control, use the following steps:
35 * 2. Register callback functions for notifications <br>
36 * 3. Connect to voice control service asynchronously. The state should be changed to Ready <br>
37 * 4. Make command list as the following step <br>
38 * 4-1. Create command list handle <br>
39 * 4-2. Create command handle <br>
40 * 4-3. Set command and type for command handle <br>
41 * 4-4. Add command handle to command list <br>
42 * Step 4 is called repeatedly for each command which an application wants <br>
43 * 5. Set command list for recognition <br>
44 * 6. If an application wants to finish voice control,<br>
45 * 6-1. Destroy command and command list handle <br>
46 * 6-2. Deinitialize <br>
48 * An application can obtain command handle from command list, and also get information from handle.
51 * The Voice Control API also notifies you (by callback mechanism) when the states of client and service are changed,
52 * command is recognized, current language is changed or error occurred.
53 * An application should register callback functions: vc_state_changed_cb(), vc_service_state_changed_cb(), vc_result_cb(),
54 * vc_current_language_changed_cb(), vc_error_cb().
56 * @section CAPI_UIX_VOICE_CONTROL_MODULE_STATE_DIAGRAM State Diagram
57 * The following diagram shows the life cycle and the states of the Voice Control.
59 * @image html capi_uix_voice_control_state_diagram.png "<State diagram> "
60 * The following diagram shows the states of Voice Control service.
61 * @image html capi_uix_voice_control_service_state_diagram.png "<Service state diagram>"
63 * @section CAPI_UIX_VOICE_CONTROL_MODULE_STATE_TRANSITIONS State Transitions
73 * <td>vc_initialize()</td>
75 * <td>Initialized</td>
79 * <td>vc_deinitialize()</td>
80 * <td>Initialized</td>
85 * <td>vc_prepare()</td>
86 * <td>Initialized</td>
91 * <td>vc_unprepare()</td>
93 * <td>Initialized</td>
99 * @section CAPI_UIX_VOICE_CONTROL_MODULE_STATE_DEPENDENT_FUNCTION_CALLS State Dependent Function Calls
100 * The following table shows state-dependent function calls.
101 * It is forbidden to call functions listed below in wrong states.
102 * Violation of this rule may result in an unpredictable behavior.
107 * <th>VALID STATES</th>
108 * <th>DESCRIPTION</th>
111 * <td>vc_initialize()</td>
113 * <td>All functions must be called after vc_initialize()</td>
116 * <td>vc_deinitialize()</td>
117 * <td>Initialized, Ready</td>
118 * <td>This function should be called when an application want to finalize voice control using</td>
121 * <td>vc_prepare()</td>
122 * <td>Initialized</td>
123 * <td>This function works asynchronously. If service start is failed, application gets the error callback.</td>
126 * <td>vc_unprepare()</td>
131 * <td>vc_foreach_supported_languages()</td>
132 * <td>Initialized, Ready</td>
136 * <td>vc_get_current_language()</td>
137 * <td>Initialized, Ready</td>
141 * <td>vc_get_state()</td>
142 * <td>Initialized, Ready</td>
146 * <td>vc_get_service_state()</td>
147 * <td>Initialized, Ready</td>
151 * <td>vc_set_command_list()</td>
156 * <td>vc_unset_command_list()</td>
162 * vc_set_result_cb()<br>
163 * vc_unset_result_cb()<br>
164 * vc_set_state_changed_cb()<br>
165 * vc_unset_state_changed_cb()<br>
166 * vc_set_service_state_changed_cb()<br>
167 * vc_unset_service_state_changed_cb()<br>
168 * vc_set_current_language_changed_cb()<br>
169 * vc_unset_current_language_changed_cb()<br>
170 * vc_set_error_cb()<br>
171 * vc_unset_error_cb()</td>
172 * <td>Initialized</td>
173 * <td> All callback function should be registered in Initialized state </td>
177 * @section CAPI_UIX_STT_MODULE_FEATURE Related Features
178 * This API is related with the following features:<br>
179 * - http://tizen.org/feature/microphone<br>
181 * It is recommended to design feature related codes in your application for reliability.<br>
182 * You can check if a device supports the related features for this API by using @ref CAPI_SYSTEM_SYSTEM_INFO_MODULE, thereby controlling the procedure of your application.<br>
183 * To ensure your application is only running on the device with specific features, please define the features in your manifest file using the manifest editor in the SDK.<br>
184 * More details on featuring your application can be found from <a href="../org.tizen.mobile.native.appprogramming/html/ide_sdk_tools/feature_element.htm"><b>Feature Element</b>.</a>
188 #endif /* __TIZEN_UIX_VOICE_CONTROL_DOC_H__ */