You are here

You are here

Page Example

Voice Control Sample Overview

The Voice Control sample application demonstrates how you can use the Voice control API to initialize, deinitialize, add, and remove voice commands and retrieve information.

The following figure illustrates the views of the Voice Control.

Figure: Voice control views

To register commands for voice control, click Select Command List and select the commands you want to register (command lists are shown in the second screenshot above).

A voice manager application (created by the device manufacturer) is used to start and stop the voice control. To start or stop the voice control, use the voice button in the quick panel (third screenshot above).

After the voice control has been start from the quick panel voice button, the voice manager application is shown at the bottom of the Voice Control screen (last screenshot above).

Implementation

To implement the Voice Control application:

Initialize voice control.

To use the Voice Control library, you must initialize voice control using the init_vc() function.

The function sets callback functions to receive the state change events and results from the Voice Control service. The application tries to connect to the Voice Control service for handshaking information and data using the vc_prepare() function.

If you set the service state change callback, you can check the voice control service state: ready, recording, or processing. Based on the service state, you can change the application mode, state, and look and feel.

The deinit_vc() function is called to disconnect the service and to destroy the command list when the application is terminated. If you only want to disconnect the service, use the vc_unprepare() function.