[TWDAPI-51][voice-control]Add a guide and an api reference for Voice Control Web... 58/157558/4
authorsooyeon.kim <sooyeon.kim@samsung.com>
Wed, 25 Oct 2017 05:38:52 +0000 (14:38 +0900)
committerEditor Lionbridge <TizenEditor.SEL@lionbridge.com>
Fri, 27 Oct 2017 09:39:51 +0000 (12:39 +0300)
PS4: Reviewed

Change-Id: I23386d9661c2c82703435ed74d9f529fc89a9b8e
Signed-off-by: sooyeon.kim <sooyeon.kim@samsung.com>
13 files changed:
org.tizen.guides/html/index.htm
org.tizen.guides/html/web/guides_w.htm
org.tizen.guides/html/web/text_input/text_input_cover_w.htm
org.tizen.guides/html/web/text_input/voice_control_w.htm [new file with mode: 0755]
org.tizen.guides/index.xml
org.tizen.web.apireference/html/device_api/mobile/index.html
org.tizen.web.apireference/html/device_api/mobile/tizen/voicecontrol.html [new file with mode: 0644]
org.tizen.web.apireference/html/device_api/tv/index.html
org.tizen.web.apireference/html/device_api/tv/tizen/voicecontrol.html [new file with mode: 0644]
org.tizen.web.apireference/html/device_api/wearable/index.html
org.tizen.web.apireference/html/device_api/wearable/tizen/voicecontrol.html [new file with mode: 0644]
org.tizen.web.apireference/html/index.htm
org.tizen.web.apireference/index.xml

index 3822718..49bd70f 100644 (file)
                                <li><a href="web/sensors/ham_gesture_w.htm">Gesture Recognition</a></li>
                        </ul>
                </li>
-               <li><a href="web/text_input/text_input_cover_w.htm" target="content">Text Input</a>
+               <li><a href="web/text_input/text_input_cover_w.htm" target="content">Text Input and Voice</a>
                        <ul>
                                <li><a href="web/text_input/input_method_w.htm" target="content">IME Application</a></li>
                                <li><a href="web/text_input/input_device_w.htm" target="content">Input Device</a></li>
+                               <li><a href="web/text_input/voice_control_w.htm" target="content">Voice Control</a></li>
                        </ul>
                </li>
                <li><a href="web/personal/personal_cover_w.htm" target="content">Personal Data</a>
index b5d4c7e..8de9856 100644 (file)
@@ -88,9 +88,9 @@
 
 <p>The sensor features provide information about the surrounding environment of the device. You can access data from various device sensors, which provide information on the physical environment the device is in, and the gestures and activities the user is engages in.</p></li>
 
-<li><a href="text_input/text_input_cover_w.htm">Text Input</a> <strong>in mobile and wearable applications only</strong>
+<li><a href="text_input/text_input_cover_w.htm">Text Input and Voice</a>
 
-<p>The text input features introduce how you can provide customized keyboards. You can also define keyboard commands to trigger specific actions.</p></li>
+<p>The text input and voice features introduce how you can provide customized keyboards and voice commands. You can also define keyboard commands to trigger specific actions and voice commands to allow the user to control the Web application with their voice.</p></li>
 
 <li><a href="personal/personal_cover_w.htm">Personal Data</a> <strong>in mobile and wearable applications only</strong>
 
index e782692..a08aa73 100644 (file)
        <script type="text/javascript" src="../../scripts/core.js" charset="utf-8"></script>
        <script type="text/javascript" src="../../scripts/search.js" charset="utf-8"></script>
 
-       <title>Text Input</title>
+       <title>Text Input and Voice</title>
 </head>
 
 <body onload="prettyPrint()" style="overflow: auto;">
 
 <div id="toc-navigation">
        <div id="profile">
-               <p><img alt="Mobile Web" src="../../images/mobile_s_w_optional.png"/> <img alt="Wearable Web" src="../../images/wearable_s_w.png"/></p>
+               <p><img alt="Mobile Web" src="../../images/mobile_s_w.png"/> <img alt="Wearable Web" src="../../images/wearable_s_w.png"/> <img alt="TV Web" src="../../images/tv_s_w.png"/></p>
        </div>
                <div id="toc_border"><div id="toc">
                <p class="toc-title">Dependencies</p>
                <ul class="toc">
                        <li>Tizen 2.4 and Higher for Mobile</li>
                        <li>Tizen 2.3.1 and Higher for Wearable</li>
+                       <li>Tizen 4.0 and Higher for TV</li>
                </ul>
        </div></div>
 </div>
 
 <div id="container"><div id="contents"><div class="content">
-<h1>Text Input</h1>
+<h1>Text Input and Voice</h1>
 
-<p>The text input features introduce how you can provide customized keyboards, and define keyboard commands to trigger specific actions.</p>
+<p>The text input and voice features introduce how you can provide customized keyboards and voice commands. You can also define keyboard commands to trigger specific actions and voice commands to allow the user to control the Web application with their voice.</p>
 
-<p>You can use the following text input features in your Web applications:</p>
+<p>You can use the following text input and voice features in your Web applications:</p>
 <ul>
 <li><a href="input_method_w.htm">IME Application</a> <strong>in wearable applications only</strong>
 
 <li><a href="input_device_w.htm">Input Device</a> <strong>in mobile and wearable applications only</strong>
 
 <p>You can manage input keys in the application. You can retrieve information about the available keys, and add custom actions to be performed when specific input keys are pressed.</p></li>
+
+<li><a href="voice_control_w.htm">Voice Control</a>
+
+<p>You can register general voice commands and enable the user to control the Web application with their voice.</p>
 </ul>
 
 
diff --git a/org.tizen.guides/html/web/text_input/voice_control_w.htm b/org.tizen.guides/html/web/text_input/voice_control_w.htm
new file mode 100755 (executable)
index 0000000..2faba91
--- /dev/null
@@ -0,0 +1,263 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
+<head>
+       <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
+       <meta http-equiv="X-UA-Compatible" content="IE=9" />
+       <link rel="stylesheet" type="text/css" href="../../css/styles.css" />
+       <link rel="stylesheet" type="text/css" href="../../css/snippet.css" />
+       <script type="text/javascript" src="../../scripts/snippet.js"></script>
+       <script type="text/javascript" src="../../scripts/jquery.util.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../../scripts/common.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../../scripts/core.js" charset="utf-8"></script>
+       <script type="text/javascript" src="../../scripts/search.js" charset="utf-8"></script>
+       <title>Voice Control</title>
+</head>
+
+<body onload="prettyPrint()" style="overflow: auto;">
+       <div id="toc-navigation">
+               <div id="profile">
+                       <p><img alt="Mobile web" src="../../images/mobile_s_w.png"/> <img alt="Wearable web" src="../../images/wearable_s_w.png"/> <img alt="TV web" src="../../images/tv_s_w.png"/></p>
+               </div>
+
+               <div id="toc_border">
+                       <div id="toc">
+                               <p class="toc-title">Dependencies</p>
+                               <ul class="toc">
+                                       <li>Tizen 4.0 and Higher for Mobile</li>
+                                       <li>Tizen 4.0 and Higher for Wearable</li>
+                                       <li>Tizen 4.0 and Higher for TV</li>
+                               </ul>
+                               <p class="toc-title">Content</p>
+                               <ul class="toc">
+                                       <li><a href="#prerequisites">Prerequisites</a></li>
+                                       <li><a href="#callback">Managing Listeners</a></li>
+                                       <li><a href="#info">Retrieving the Current Language</a></li>
+                                       <li><a href="#commands">Managing Commands</a></li>
+                               </ul>
+                               <p class="toc-title">Related Info</p>
+                               <ul class="toc">
+                                       <li><a href="../../../../org.tizen.web.apireference/html/device_api/mobile/tizen/voicecontrol.html">Voice Control API for Mobile Web</a></li>
+                                       <li><a href="../../../../org.tizen.web.apireference/html/device_api/wearable/tizen/voicecontrol.html">Voice Control API for Wearable Web</a></li>
+                                       <li><a href="../../../../org.tizen.web.apireference/html/device_api/tv/tizen/voicecontrol.html">Voice Control API for TV Web</a></li>
+                               </ul>
+                       </div>
+               </div>
+       </div>
+
+       <div id="container">
+               <div id="contents">
+                       <div class="content">
+
+                       <h1>Voice Control</h1>
+
+                       <p>You can enable the user to control the device through their voice. You can register general voice commands, which trigger a listener when the user speaks them. The voice control service recognizes the sound data recorded by the user and sends the result as a predefined command.</p>
+
+                       <p>The Voice Control API is mandatory for Tizen mobile, wearable, and TV profiles, which means that it is supported on all mobile, wearable, and TV devices. All mandatory APIs are supported on the Tizen Emulators.</p>
+
+                       <p>The main features of the Voice Control API include:</p>
+                       <ul>
+                               <li>Managing commands
+                                       <p>You can use the voice control service to register commands as foreground type. When the user speaks a registered command, the listener returns the recognition result.</p>
+                               </li>
+                               <li>Retrieving information
+                                       <p>You can <a href="#info">get the current language</a>. A command is valid only when the command language is the same as the current language. The current language can be changed with the voice control setting application or by changing the display language on the device.</p>
+                                       <p>You can get a notification of the language change in a listener. If the display language is changed to a non-supported one, the voice control language changes to English.</p>
+                               </li>
+                       </ul>
+
+                       <p>To use the voice control:</p>
+                       <ol>
+                               <li>Set up the voice control and <a href="#callback">register listeners</a>.
+                                       <p>The initialization allows the voice control to distinguish your application from any other applications also using voice control. The registered listeners allow you to receive notifications about changes in the language, recognition result, and about any errors.</p>
+                               </li>
+                               <li>Set commands.
+                                       <p>You can <a href="#commands">create a command list</a>, and add or remove individual commands in the list. When creating an individual command, set the command text and type for each command handle. When all commands are created and added to the command list, set the command list to the voice control for recognition.</p>
+                               </li>
+                               <li>Get the recognition result.
+                                       <p>The recognition result is sent through a registered listener.</p>
+                                       <p>If the registered command is duplicated or the user speaks multiple commands, the recognition result can contain multiple results. If you set duplicated commands, the voice control service can reject the command. The rejection is shown in the result event.</p>
+                               </li>
+                               <li>When no longer needed, release the voice control instance.
+                                       <p>You must disconnect the voice control service and deinitialize the voice control using the <code>release()</code> function.</p>
+                               </li>
+                       </ol>
+
+
+                       <h2 id="prerequisites">Prerequisites</h2>
+
+                       <p>To enable your application to use the voice control functionality:</p>
+                       <ol>
+                               <li>Initialize a voice control client instance using the <code>getVoiceControlClient()</code> function:
+<pre class="prettyprint">
+var initializeVoiceControlClient()
+{
+    var client = tizen.voicecontrol.getVoiceControlClient();
+}
+</pre>
+                               </li>
+
+                               <li>When voice control is no longer needed, deinitialize the instance:
+<pre class="prettyprint">
+var releaseVoiceControlClient()
+{
+    var client = tizen.voicecontrol.getVoiceControlClient();
+
+    client.release();
+}
+</pre>
+
+                                       <div class="note">
+                                               <strong>Note</strong>
+                                               Do not call the <code>release()</code> function in a listener.
+                                       </div>
+                               </li>
+                       </ol>
+
+
+                       <h2 id="callback">Managing Listeners</h2>
+
+                       <p>To set and unset listeners to get notifications about recognition results and language changes:</p>
+                       <ul>
+                               <li>Add the current language change listener to be invoked when the system or application language changes:
+<pre class="prettyprint">
+/* Listener */
+var languageChangeListenerCallback = function(previous, current)
+{
+    console.log("Language change callback " + previous + "-&gt;" + current);
+}
+
+/* Add */
+var addCurrentLanguageChanged()
+{
+    var client = tizen.voicecontrol.getVoiceControlClient();
+    var id = client.addLanguageChangeListener(languageChangeListenerCallback);
+}
+
+/* Remove */
+var removeCurrentLanguageChanged()
+{
+    var client = tizen.voicecontrol.getVoiceControlClient();
+    var id = client.addLanguageChangeListener(languageChangeListenerCallback);
+
+    client.removeLanguageChangeListener(id);
+}
+</pre>
+                               </li>
+                               <li>Add the recognition result listener to be invoked when a voice command is recognized.
+                                       <div class="note">
+                                               <strong>Note</strong>
+                                               If the recognition result produces a reject event, the voice control service has rejected the recognized command. Make sure that the command does not conflict with other commands and there are no duplicated commands.
+                                       </div>
+
+                                       <p>To get the command, check the <code>list</code> parameter in the recognition result listener. The parameter is an array of recognized <code>VoiceControlCommand</code> instances. The <code>result</code> parameter contains the recognized text.</p>
+
+<pre class="prettyprint">
+/* Listener */
+var resultListenerCallback = function(event, list, result)
+{
+    console.log("Result callback - event: " + event + ", result: " + result);
+}
+
+/* Add */
+var addResultListener()
+{
+    var client = tizen.voicecontrol.getVoiceControlClient();
+    var id = client.addResultListener(resultListenerCallback);
+}
+
+/* Remove */
+var removeResultListener()
+{
+    var client = tizen.voicecontrol.getVoiceControlClient();
+    var id = client.addResultListener(resultListenerCallback);
+
+    client.removeResultListener(id);
+}
+</pre>
+                               </li>
+                       </ul>
+
+
+                       <h2 id="info">Retrieving the Current Language</h2>
+
+                       <p>To get the current language, use the <code>getCurrentLanguage()</code> function. The voice control recognition works for the current (default) language. To be notified of language changes, use the language change listener.</p>
+<pre class="prettyprint">
+var getCurrentLang()
+{
+    var client = tizen.voicecontrol.getVoiceControlClient();
+    var currentLanguage = client.getCurrentLanguage();
+    console.log("Current language is: " + currentLanguage);
+
+    /*
+       Expected output:
+       Current language is: en_US
+    */
+}
+</pre>
+
+
+
+                       <h2 id="commands">Managing Commands</h2>
+
+                       <p>To create a command list and commands:</p>
+                       <ol>
+                               <li>Create a command.
+                                       <p>Create a command with a command text and a command type. The command type is optional and the default command type is <code>FOREGROUND</code>.</p>
+<pre class="prettyprint">
+var createCommandList()
+{
+    var command1 = new tizen.VoiceControlCommand("alpha");
+    var command2 = new tizen.VoiceControlCommand("bravo", "FOREGROUND");
+    var command3 = new tizen.VoiceControlCommand("charlie")];
+</pre>
+                               </li>
+
+                               <li>Create a command list.
+                                       <p>The command list can include many commands, each with their own command text and type. The list can have <code>FOREGROUND</code> type commands, which are valid when the application is in a visible state.</p>
+                                       <p>You can access the command list after you set it to the voice control and when you get the recognition result.</p>
+
+<pre class="prettyprint">
+    var commands = [command1, command2, command3];
+</pre>
+                               </li>
+
+                               <li>Set and unset the command list.
+                                       <p>You can set the command list with commands using the <code>setCommandList()</code> function.</p>
+                                       <p>If you want to update the registered commands, set the command list again with the updated commands using the <code>setCommandList()</code> function.</p>
+<pre class="prettyprint">
+    client.setCommandList(commands, "FOREGROUND");
+</pre>
+                                       <p>When no longer needed, unset the command list using the <code>unsetCommandList()</code> function:</p>
+<pre class="prettyprint">
+    if ("FOREGROUND" == type)
+        client.unsetCommandList("FOREGROUND");
+}
+</pre>
+                               </li>
+                       </ol>
+
+
+                       <script type="text/javascript" src="../../scripts/jquery.zclip.min.js"></script>
+                       <script type="text/javascript" src="../../scripts/showhide.js"></script>
+                       </div>
+               </div>
+       </div>
+
+       <a class="top sms" href="#"><img src="../../images/btn_top.gif" alt="Go to top" /></a>
+
+       <div id="footer">
+               <p class="footer">Except as noted, this content - excluding the Code Examples - is licensed under <a href="http://creativecommons.org/licenses/by/3.0/legalcode" target="_blank">Creative Commons Attribution 3.0</a> and all of the Code Examples contained herein are licensed under <a href="https://www.tizen.org/bsd-3-clause-license" target="_blank">BSD-3-Clause</a>.<br/>For details, see the <a href="https://www.tizen.org/content-license" target="_blank">Content License</a>.</p>
+       </div>
+
+       <script type="text/javascript">
+               var _gaq = _gaq || [];
+               _gaq.push(['_setAccount', 'UA-25976949-1']);
+               _gaq.push(['_trackPageview']);
+               (function() {
+                       var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+                       ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+                       var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+               })();
+       </script>
+</body>
+</html>
index cb0b63e..3c912ec 100644 (file)
                <topic href="html/web/sensors/device_sensors_w.htm" label="Device Sensors"></topic>
                <topic href="html/web/sensors/ham_gesture_w.htm" label="Gesture Recognition"></topic>
        </topic>
-       <topic href="html/web/text_input/text_input_cover_w.htm" label="Text Input">
+       <topic href="html/web/text_input/text_input_cover_w.htm" label="Text Input and Voice">
                <topic href="html/web/text_input/input_method_w.htm" label="IME Application"></topic>
                <topic href="html/web/text_input/input_device_w.htm" label="Input Device"></topic>
+               <topic href="html/web/text_input/voice_control_w.htm" label="Voice Control"></topic>
        </topic>
        <topic href="html/web/personal/personal_cover_w.htm" label="Personal Data">
                <topic href="html/web/personal/account_w.htm" label="Account Management"></topic>
index 52a4b83..4d71a20 100644 (file)
                 <td>Mandatory</td>
                 <td>Yes</td>
 
+                </tr></tbody></table><h4 id="UIX">UIX</h4>
+             <table class="api-list"><thead><tr><th>API</th><th>Description</th><th>Version (Since)</th><th>Mobile</th><th>Supported on<br>Mobile Emulator</th></tr>
+               </thead><tbody><tr><td><a href="tizen/voicecontrol.html">
+                        Voice Control</a></td>
+                    <td>This API provides functions for users to set voice commands and to control the web application through their voices.</td>
+                    <td>4.0</td>
+                    <td>Mandatory</td>
+                    <td>Yes</td>
+
                 </tr></tbody></table><h4 id="Cordova">Cordova</h4>
              <table class="api-list"><thead><tr><th>API</th><th>Description</th><th>Version (Since)</th><th>Mobile</th><th>Supported on<br>Mobile Emulator</th></tr>
        </thead><tbody><tr><td><a href="tizen/cordova/console.html">
diff --git a/org.tizen.web.apireference/html/device_api/mobile/tizen/voicecontrol.html b/org.tizen.web.apireference/html/device_api/mobile/tizen/voicecontrol.html
new file mode 100644 (file)
index 0000000..d0341e8
--- /dev/null
@@ -0,0 +1,965 @@
+<!DOCTYPE html PUBLIC "html">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<link rel="stylesheet" type="text/css" href="tizen.css" media="screen">
+<script type="text/javascript" src="snippet.js"></script><title>VoiceControl API</title>
+</head>
+<body id="page-content" onload="prettyPrint()">
+<div class="api" id="::VoiceControl">
+<div class="title"><h1>VoiceControl API</h1></div>
+<div class="brief">
+ The Voice Control API provides interfaces and methods for recognizing voice command.
+        </div>
+<div class="description">
+        <p>
+Voice control API offers functionality to recognize the voice and to send the result as predefined command.
+        </p>
+       </div>
+<p><span class="version">
+            Since: </span>
+ 4.0
+        </p>
+<h2>Table of Contents</h2>
+<ul class="toc">
+<li>1. <a href="#typedefs-section">Type Definitions</a><ul class="toc">
+<li>
+                    1.1. <a href="#VoiceControlResultEvent">VoiceControlResultEvent</a>
+</li>
+<li>
+                    1.2. <a href="#VoiceControlCommandType">VoiceControlCommandType</a>
+</li>
+</ul>
+</li>
+<li>2. <a href="#interfaces-section">Interfaces</a><ul class="toc">
+<li>2.1. <a href="#VoiceControlClientManagerObject">VoiceControlClientManagerObject</a>
+</li>
+<li>2.2. <a href="#VoiceControlClientManager">VoiceControlClientManager</a>
+</li>
+<li>2.3. <a href="#VoiceControlClient">VoiceControlClient</a>
+</li>
+<li>2.4. <a href="#VoiceControlCommand">VoiceControlCommand</a>
+</li>
+<li>2.5. <a href="#VoiceControlLanguageChangeCallback">VoiceControlLanguageChangeCallback</a>
+</li>
+<li>2.6. <a href="#VoiceControlResultCallback">VoiceControlResultCallback</a>
+</li>
+</ul>
+</li>
+<li>3. <a href="#api-features">Related Feature</a>
+</li>
+<li>4. <a href="#full-webidl">Full WebIDL</a>
+</li>
+</ul>
+<hr>
+<h2 id="method-summary">Summary of Interfaces and Methods</h2>
+<table class="informaltable">
+<thead><tr>
+<th>Interface</th>
+<th>Method</th>
+</tr></thead>
+<tbody>
+<tr>
+<td><a href="#VoiceControlClientManagerObject">VoiceControlClientManagerObject</a></td>
+<td></td>
+</tr>
+<tr>
+<td><a href="#VoiceControlClientManager">VoiceControlClientManager</a></td>
+<td><div>
+<a href="#VoiceControlClient">VoiceControlClient</a> <a href="#VoiceControlClientManager::getVoiceControlClient">getVoiceControlClient</a> ()</div></td>
+</tr>
+<tr>
+<td><a href="#VoiceControlClient">VoiceControlClient</a></td>
+<td>
+<div>DOMString <a href="#VoiceControlClient::getCurrentLanguage">getCurrentLanguage</a> ()</div>
+<div>void <a href="#VoiceControlClient::setCommandList">setCommandList</a> (<a href="#VoiceControlCommand">VoiceControlCommand</a>[] list, optional <a href="#VoiceControlCommandType">VoiceControlCommandType</a>? type)</div>
+<div>void <a href="#VoiceControlClient::unsetCommandList">unsetCommandList</a> (optional <a href="#VoiceControlCommandType">VoiceControlCommandType</a>? type)</div>
+<div>long <a href="#VoiceControlClient::addResultListener">addResultListener</a> (<a href="#VoiceControlResultCallback">VoiceControlResultCallback</a> listener)</div>
+<div>void <a href="#VoiceControlClient::removeResultListener">removeResultListener</a> (long id)</div>
+<div>long <a href="#VoiceControlClient::addLanguageChangeListener">addLanguageChangeListener</a> (<a href="#VoiceControlLanguageChangeCallback">VoiceControlLanguageChangeCallback</a> listener)</div>
+<div>void <a href="#VoiceControlClient::removeLanguageChangeListener">removeLanguageChangeListener</a> (long id)</div>
+<div>void <a href="#VoiceControlClient::release">release</a> ()</div>
+</td>
+</tr>
+<tr>
+<td><a href="#VoiceControlCommand">VoiceControlCommand</a></td>
+<td></td>
+</tr>
+<tr>
+<td><a href="#VoiceControlLanguageChangeCallback">VoiceControlLanguageChangeCallback</a></td>
+<td><div>void <a href="#VoiceControlLanguageChangeCallback::onlanguagechanged">onlanguagechanged</a> (DOMString previous, DOMString current)</div></td>
+</tr>
+<tr>
+<td><a href="#VoiceControlResultCallback">VoiceControlResultCallback</a></td>
+<td><div>void <a href="#VoiceControlResultCallback::onresult">onresult</a> (<a href="#VoiceControlResultEvent">VoiceControlResultEvent</a> event, <a href="#VoiceControlCommand">VoiceControlCommand</a>[] list, DOMString results)</div></td>
+</tr>
+</tbody>
+</table>
+<div class="typedefs" id="typedefs-section">
+<h2>1. Type Definitions</h2>
+<div class="enum" id="VoiceControlResultEvent">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlResultEvent"></a><h3>1.1. VoiceControlResultEvent</h3>
+<div class="brief">
+ Specifies the result event.
+          </div>
+<pre class="webidl prettyprint">    enum VoiceControlResultEvent {"SUCCESS", "FAILURE"};</pre>
+<p><span class="version">
+            Since: </span>
+ 4.0
+          </p>
+<div class="description">
+          <p>
+The result events defined by this enumeration are:
+          </p>
+          <ul>
+            <li>
+ SUCCESS - Successful result            </li>
+            <li>
+ FAILURE - Rejected result by voice control service            </li>
+          </ul>
+         </div>
+</div>
+<div class="enum" id="VoiceControlCommandType">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlCommandType"></a><h3>1.2. VoiceControlCommandType</h3>
+<div class="brief">
+ Specifies command type.
+          </div>
+<pre class="webidl prettyprint">    enum VoiceControlCommandType {"FOREGROUND"};</pre>
+<p><span class="version">
+            Since: </span>
+ 4.0
+          </p>
+<div class="description">
+          <p>
+The command type defined by this enumeration is:
+          </p>
+          <ul>
+            <li>
+ FOREGROUND - command type used when application is foreground            </li>
+          </ul>
+         </div>
+</div>
+</div>
+<div class="interfaces" id="interfaces-section">
+<h2>2. Interfaces</h2>
+<div class="interface" id="VoiceControlClientManagerObject">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlClientManagerObject"></a><h3>2.1. VoiceControlClientManagerObject</h3>
+<div class="brief">
+ The VoiceControlClientManagerObject interface defines what is instantiated in the <em>Tizen</em> object.
+          </div>
+<pre class="webidl prettyprint">    [NoInterfaceObject] interface VoiceControlClientManagerObject {
+       readonly attribute <a href="#VoiceControlClientManager">VoiceControlClientManager</a> voicecontrol;
+    };</pre>
+<pre class="webidl prettyprint">    <a href="tizen.html#Tizen">Tizen</a> implements <a href="#VoiceControlClientManagerObject">VoiceControlClientManagerObject</a>;</pre>
+<p><span class="version">
+            Since: </span>
+ 4.0
+          </p>
+<div class="description">
+          <p>
+The <em>tizen.voicecontrol</em> object provides access to the functionality of the voice control API.
+          </p>
+         </div>
+</div>
+<div class="interface" id="VoiceControlClientManager">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlClientManager"></a><h3>2.2. VoiceControlClientManager</h3>
+<div class="brief">
+ Voice Control Client Manager
+          </div>
+<pre class="webidl prettyprint">    [NoInterfaceObject] interface VoiceControlClientManager {
+       <a href="#VoiceControlClient">VoiceControlClient</a> getVoiceControlClient() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+    };</pre>
+<p><span class="version">
+            Since: </span>
+ 4.0
+          </p>
+<div class="methods">
+<h4>Methods</h4>
+<dl>
+<dt class="method" id="VoiceControlClientManager::getVoiceControlClient">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlClientManager::getVoiceControlClient"></a><code><b><span class="methodName">getVoiceControlClient</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Requests voice control Client instance.
+            </div>
+<div class="synopsis"><pre class="signature prettyprint"><a href="#VoiceControlClient">VoiceControlClient</a> getVoiceControlClient();
+             </pre></div>
+<p><span class="version">
+            Since: </span>
+ 4.0
+            </p>
+<p><span class="privilegelevel">
+            Privilege level: </span>
+ public
+            </p>
+<p><span class="privilege">
+            Privilege: </span>
+      http://tizen.org/privilege/recorder
+            </p>
+<p><span class="remark"> Remark : </span>
+ This method always returns the static voice control client object. That is, if you call a method
+using one of voice control client objects, it affects other objects.
+            </p>
+<div class="returntype">
+<p><span class="return">Return value:</span></p>
+ VoiceControlClient The object to manage voice control
+              </div>
+<div class="exceptionlist">
+<p><span class="except">Exceptions:</span></p>
+          <ul class="exception"><li>WebAPIException<ul>
+<li class="list"><p>
+ with error type NotSupportedError, if this feature is not supported.
+                </p></li>
+<li class="list"><p>
+ with error type SecurityError, if the application does not have the privilege to call this method.
+                </p></li>
+<li class="list"><p>
+ with error type AbortError, if the operation cannot be finished properly.
+                </p></li>
+</ul>
+</li></ul>
+        </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> /* client1 and client2 refer the same object */
+ var client1 = tizen.voicecontrol.getVoiceControlClient();
+ var client2 = tizen.voicecontrol.getVoiceControlClient();
+ </pre>
+</div>
+</dd>
+</dl>
+</div>
+</div>
+<div class="interface" id="VoiceControlClient">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlClient"></a><h3>2.3. VoiceControlClient</h3>
+<div class="brief">
+ Voice Control Client
+          </div>
+<pre class="webidl prettyprint">    [NoInterfaceObject] interface VoiceControlClient {
+
+       DOMString getCurrentLanguage() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       void setCommandList(<a href="#VoiceControlCommand">VoiceControlCommand</a>[] list, optional <a href="#VoiceControlCommandType">VoiceControlCommandType</a>? type) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       void unsetCommandList(optional <a href="#VoiceControlCommandType">VoiceControlCommandType</a>? type) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       long addResultListener(<a href="#VoiceControlResultCallback">VoiceControlResultCallback</a> listener) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       void removeResultListener(long id) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       long addLanguageChangeListener(<a href="#VoiceControlLanguageChangeCallback">VoiceControlLanguageChangeCallback</a> listener) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       void removeLanguageChangeListener(long id) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       void release() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+    };</pre>
+<p><span class="version">
+            Since: </span>
+ 4.0
+          </p>
+<div class="methods">
+<h4>Methods</h4>
+<dl>
+<dt class="method" id="VoiceControlClient::getCurrentLanguage">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlClient::getCurrentLanguage"></a><code><b><span class="methodName">getCurrentLanguage</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Gets current language.
+            </div>
+<div class="synopsis"><pre class="signature prettyprint">DOMString getCurrentLanguage();
+             </pre></div>
+<p><span class="version">
+            Since: </span>
+ 4.0
+            </p>
+<div class="description">
+            <p>
+A language is specified as an ISO 3166 alpha-2 two letter country-code followed by ISO 639-1 for the two-letter language code.
+For example, "ko_KR" for Korean, "en_US" for American English.
+            </p>
+           </div>
+<div class="exceptionlist">
+<p><span class="except">Exceptions:</span></p>
+          <ul class="exception"><li>WebAPIException<ul>
+<li class="list"><p>
+ with error type NotSupportedError, if this feature is not supported.
+                </p></li>
+<li class="list"><p>
+ with error type AbortError, if the operation cannot be finished properly.
+                </p></li>
+</ul>
+</li></ul>
+        </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var client = tizen.voicecontrol.getVoiceControlClient();
+ var currentLanguage = client.getCurrentLanguage();
+
+ console.log("Current language is: " + currentLanguage);
+ </pre>
+</div>
+<div class="output">
+<span class="title"><p>Output example:</p></span><pre> Current language is: en_US
+ </pre>
+</div>
+</dd>
+<dt class="method" id="VoiceControlClient::setCommandList">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlClient::setCommandList"></a><code><b><span class="methodName">setCommandList</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Sets command list.
+            </div>
+<div class="synopsis"><pre class="signature prettyprint">void setCommandList(<a href="#VoiceControlCommand">VoiceControlCommand</a>[] list, optional <a href="#VoiceControlCommandType">VoiceControlCommandType</a>? type);
+             </pre></div>
+<p><span class="version">
+            Since: </span>
+ 4.0
+            </p>
+<p><span class="privilegelevel">
+            Privilege level: </span>
+ public
+            </p>
+<p><span class="privilege">
+            Privilege: </span>
+      http://tizen.org/privilege/recorder
+            </p>
+<div class="parameters">
+<p><span class="param">Parameters:</span></p>
+<ul>
+          <li class="param">
+<span class="name">list</span>:
+ Command list handle
+                </li>
+          <li class="param">
+<span class="name">type</span><span class="optional"> [optional]</span><span class="optional"> [nullable]</span>:
+ Type of registered commands. The default value is <var>"FOREGROUND"</var>                </li>
+        </ul>
+</div>
+<div class="exceptionlist">
+<p><span class="except">Exceptions:</span></p>
+          <ul class="exception"><li>WebAPIException<ul>
+<li class="list"><p>
+ with error type TypeMismatchError, if the input parameter is not
+compatible with the expected type.
+                </p></li>
+<li class="list"><p>
+ with error type NotSupportedError, if this feature is not supported.
+                </p></li>
+<li class="list"><p>
+ with error type InvalidValuesError, if any of the input
+parameters contain an invalid value.
+                </p></li>
+<li class="list"><p>
+ with error type SecurityError, if the application does not have the privilege to call this method.
+                </p></li>
+<li class="list"><p>
+ with error type AbortError, if the operation cannot be finished properly.
+                </p></li>
+</ul>
+</li></ul>
+        </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var client = tizen.voicecontrol.getVoiceControlClient();
+
+ var commands = [
+            new tizen.VoiceControlCommand("alpha"),
+            new tizen.VoiceControlCommand("bravo"),
+            new tizen.VoiceControlCommand("charlie")];
+ client.setCommandList(commands, "FOREGROUND");
+ </pre>
+</div>
+</dd>
+<dt class="method" id="VoiceControlClient::unsetCommandList">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlClient::unsetCommandList"></a><code><b><span class="methodName">unsetCommandList</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Unsets command list.
+            </div>
+<div class="synopsis"><pre class="signature prettyprint">void unsetCommandList(optional <a href="#VoiceControlCommandType">VoiceControlCommandType</a>? type);
+             </pre></div>
+<p><span class="version">
+            Since: </span>
+ 4.0
+            </p>
+<p><span class="privilegelevel">
+            Privilege level: </span>
+ public
+            </p>
+<p><span class="privilege">
+            Privilege: </span>
+      http://tizen.org/privilege/recorder
+            </p>
+<div class="parameters">
+<p><span class="param">Parameters:</span></p>
+<ul>
+          <li class="param">
+<span class="name">type</span><span class="optional"> [optional]</span><span class="optional"> [nullable]</span>:
+ Type of commands that should be unset. The default value is <var>"FOREGROUND"</var>                </li>
+        </ul>
+</div>
+<div class="exceptionlist">
+<p><span class="except">Exceptions:</span></p>
+          <ul class="exception"><li>WebAPIException<ul>
+<li class="list"><p>
+ with error type TypeMismatchError, if the input parameter is not
+compatible with the expected type.
+                </p></li>
+<li class="list"><p>
+ with error type NotSupportedError, if this feature is not supported.
+                </p></li>
+<li class="list"><p>
+ with error type SecurityError, if the application does not have the privilege to call this method.
+                </p></li>
+<li class="list"><p>
+ with error type AbortError, if the operation cannot be finished properly.
+                </p></li>
+</ul>
+</li></ul>
+        </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var client = tizen.voicecontrol.getVoiceControlClient();
+
+ var commands = [
+            new tizen.VoiceControlCommand("alpha"),
+            new tizen.VoiceControlCommand("bravo"),
+            new tizen.VoiceControlCommand("charlie")];
+ client.setCommandList(commands, "FOREGROUND");
+
+ client.unsetCommandList("FOREGROUND");
+ </pre>
+</div>
+</dd>
+<dt class="method" id="VoiceControlClient::addResultListener">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlClient::addResultListener"></a><code><b><span class="methodName">addResultListener</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Registers a listener for getting recognition result.
+            </div>
+<div class="synopsis"><pre class="signature prettyprint">long addResultListener(<a href="#VoiceControlResultCallback">VoiceControlResultCallback</a> listener);
+             </pre></div>
+<p><span class="version">
+            Since: </span>
+ 4.0
+            </p>
+<div class="parameters">
+<p><span class="param">Parameters:</span></p>
+<ul>
+          <li class="param">
+<span class="name">listener</span>:
+ Callback function to register
+                </li>
+        </ul>
+</div>
+<div class="returntype">
+<p><span class="return">Return value:</span></p>
+ long Identifier used to clear the watch subscription.
+              </div>
+<div class="exceptionlist">
+<p><span class="except">Exceptions:</span></p>
+          <ul class="exception"><li>WebAPIException<ul>
+<li class="list"><p>
+ with error type TypeMismatchError, if the input parameter is not
+compatible with the expected type.
+                </p></li>
+<li class="list"><p>
+ with error type NotSupportedError, if this feature is not supported.
+                </p></li>
+<li class="list"><p>
+ with error type AbortError, if the operation cannot be finished properly.
+                </p></li>
+</ul>
+</li></ul>
+        </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var client = tizen.voicecontrol.getVoiceControlClient();
+
+ var commands = [
+            new tizen.VoiceControlCommand("alpha"),
+            new tizen.VoiceControlCommand("bravo"),
+            new tizen.VoiceControlCommand("charlie")];
+ client.setCommandList(commands, "FOREGROUND");
+
+ var resultListenerCallback = function(event, list, result)
+ {
+   console.log("Result callback - event: " + event + ", result: " + result);
+ }
+
+ var id = client.addResultListener(resultListenerCallback);
+ console.log("Result listener[" + id + "] is created");
+ </pre>
+</div>
+<div class="output">
+<span class="title"><p>Output example:</p></span><pre> Result listener[1] is created
+ </pre>
+</div>
+<div class="output">
+<span class="title"><p>Output example:</p></span><pre> /* (When a user says "alpha") */
+ Result callback - event: SUCCESS, result: alpha
+ </pre>
+</div>
+</dd>
+<dt class="method" id="VoiceControlClient::removeResultListener">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlClient::removeResultListener"></a><code><b><span class="methodName">removeResultListener</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Unregisters the listener.
+            </div>
+<div class="synopsis"><pre class="signature prettyprint">void removeResultListener(long id);
+             </pre></div>
+<p><span class="version">
+            Since: </span>
+ 4.0
+            </p>
+<div class="parameters">
+<p><span class="param">Parameters:</span></p>
+<ul>
+          <li class="param">
+<span class="name">id</span>:
+ Identifier used to clear the watch subscription
+                </li>
+        </ul>
+</div>
+<div class="exceptionlist">
+<p><span class="except">Exceptions:</span></p>
+          <ul class="exception"><li>WebAPIException<ul>
+<li class="list"><p>
+ with error type NotSupportedError, if this feature is not supported.
+                </p></li>
+<li class="list"><p>
+ with error type AbortError, if the operation cannot be finished properly.
+                </p></li>
+</ul>
+</li></ul>
+        </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var client = tizen.voicecontrol.getVoiceControlClient();
+
+ var commands = [
+            new tizen.VoiceControlCommand("alpha"),
+            new tizen.VoiceControlCommand("bravo"),
+            new tizen.VoiceControlCommand("charlie")];
+ client.setCommandList(commands, "FOREGROUND");
+
+ var resultListenerCallback = function(event, list, result)
+ {
+   console.log("Result callback - event: " + event + ", result: " + result);
+ }
+
+ var id = client.addResultListener(resultListenerCallback);
+
+ client.removeResultListener(id);
+ </pre>
+</div>
+</dd>
+<dt class="method" id="VoiceControlClient::addLanguageChangeListener">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlClient::addLanguageChangeListener"></a><code><b><span class="methodName">addLanguageChangeListener</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Registers a callback function to be called when current language is changed.
+            </div>
+<div class="synopsis"><pre class="signature prettyprint">long addLanguageChangeListener(<a href="#VoiceControlLanguageChangeCallback">VoiceControlLanguageChangeCallback</a> listener);
+             </pre></div>
+<p><span class="version">
+            Since: </span>
+ 4.0
+            </p>
+<div class="parameters">
+<p><span class="param">Parameters:</span></p>
+<ul>
+          <li class="param">
+<span class="name">listener</span>:
+ Callback function to register
+                </li>
+        </ul>
+</div>
+<div class="returntype">
+<p><span class="return">Return value:</span></p>
+ long Identifier used to clear the watch subscription.
+              </div>
+<div class="exceptionlist">
+<p><span class="except">Exceptions:</span></p>
+          <ul class="exception"><li>WebAPIException<ul>
+<li class="list"><p>
+ with error type TypeMismatchError, if the input parameter is not
+compatible with the expected type.
+                </p></li>
+<li class="list"><p>
+ with error type NotSupportedError, if this feature is not supported.
+                </p></li>
+<li class="list"><p>
+ with error type AbortError, if the operation cannot be finished properly.
+                </p></li>
+</ul>
+</li></ul>
+        </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var client = tizen.voicecontrol.getVoiceControlClient();
+
+ var languageChangeListenerCallback = function(previous, current)
+ {
+   console.log("Language change callback " + previous + "-&gt;" + current);
+ }
+
+ var id = client.addLanguageChangeListener(languageChangeListenerCallback);
+ console.log("Language change listener[" + id + "] is created");
+ </pre>
+</div>
+<div class="output">
+<span class="title"><p>Output example:</p></span><pre> Language change listener[1] is created
+ </pre>
+</div>
+<div class="output">
+<span class="title"><p>Output example:</p></span><pre> /* (When language is changed) */
+ Language change callback en_US-&gt;ko_KR
+ </pre>
+</div>
+</dd>
+<dt class="method" id="VoiceControlClient::removeLanguageChangeListener">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlClient::removeLanguageChangeListener"></a><code><b><span class="methodName">removeLanguageChangeListener</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Unregisters the callback function.
+            </div>
+<div class="synopsis"><pre class="signature prettyprint">void removeLanguageChangeListener(long id);
+             </pre></div>
+<p><span class="version">
+            Since: </span>
+ 4.0
+            </p>
+<div class="parameters">
+<p><span class="param">Parameters:</span></p>
+<ul>
+          <li class="param">
+<span class="name">id</span>:
+ Identifier used to clear the watch subscription
+                </li>
+        </ul>
+</div>
+<div class="exceptionlist">
+<p><span class="except">Exceptions:</span></p>
+          <ul class="exception"><li>WebAPIException<ul>
+<li class="list"><p>
+ with error type NotSupportedError, if this feature is not supported.
+                </p></li>
+<li class="list"><p>
+ with error type AbortError, if the operation cannot be finished properly.
+                </p></li>
+</ul>
+</li></ul>
+        </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var client = tizen.voicecontrol.getVoiceControlClient();
+
+ var languageChangeListenerCallback = function(previous, current)
+ {
+   console.log("Language change callback " + previous + "-&gt;" + current);;
+ }
+
+ var id = client.addLanguageChangeListener(languageChangeListenerCallback);
+
+ client.removeLanguageChangeListener(id);
+ </pre>
+</div>
+</dd>
+<dt class="method" id="VoiceControlClient::release">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlClient::release"></a><code><b><span class="methodName">release</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Releases all resources.
+            </div>
+<div class="synopsis"><pre class="signature prettyprint">void release();
+             </pre></div>
+<p><span class="version">
+            Since: </span>
+ 4.0
+            </p>
+<div class="description">
+            <p>
+Releases listeners and disconnects voice control service.
+You should call this method when you do not want to use voice control client instance any more.
+It is necessary to create new voice control client instance, if you want to use more after release.
+            </p>
+           </div>
+<p><span class="remark"> Remark : </span>
+ If you call this method, all other VoiceControlClient objects are also released.
+            </p>
+<div class="exceptionlist">
+<p><span class="except">Exceptions:</span></p>
+          <ul class="exception"><li>WebAPIException<ul><li class="list"><p>
+ with error type AbortError, if the operation cannot be finished properly.
+                </p></li></ul>
+</li></ul>
+        </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> /* Initialize the voice control client */
+ var client = tizen.voicecontrol.getVoiceControlClient();
+
+ var commands = [
+            new tizen.VoiceControlCommand("alpha"),
+            new tizen.VoiceControlCommand("bravo"),
+            new tizen.VoiceControlCommand("charlie")];
+ client.setCommandList(commands, "FOREGROUND");
+
+ var resultListenerCallback = function(event, list, result)
+ {
+   console.log("Result callback - event: " + event + ", result: " + result);
+ }
+
+ var id = client.addResultListener(resultListenerCallback);
+
+ /* Deinitialize the voice control client */
+ client.removeResultListener(id);
+ client.unsetCommandList("FOREGROUND");
+
+ /* After release() voice control does not work */
+ /* If you want to use voice control after release(), you should initialize the client again */
+ client.release();
+ </pre>
+</div>
+</dd>
+</dl>
+</div>
+</div>
+<div class="interface" id="VoiceControlCommand">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlCommand"></a><h3>2.4. VoiceControlCommand</h3>
+<div class="brief">
+ The VoiceControlCommand defines interface used to create command you want to be recognized.
+          </div>
+<pre class="webidl prettyprint">    [Constructor(DOMString command, optional <a href="#VoiceControlCommandType">VoiceControlCommandType</a>? type)]
+    interface VoiceControlCommand {
+
+       attribute DOMString command;
+
+       attribute <a href="#VoiceControlCommandType">VoiceControlCommandType</a> type;
+    };</pre>
+<div class="constructors">
+<h4 id="VoiceControlCommand::constructor">Constructors</h4>
+<dl>
+<div class="brief">
+ Command constructor
+              </div>
+<pre class="webidl prettyprint">VoiceControlCommand(DOMString command, optional <a href="#VoiceControlCommandType">VoiceControlCommandType</a>? type);</pre>
+</dl>
+</div>
+<div class="attributes">
+<h4>Attributes</h4>
+<ul>
+<li class="attribute" id="VoiceControlCommand::command">
+<span class="attrName"><span class="type">DOMString </span><span class="name">command</span></span><div class="brief">
+ The command text
+            </div>
+<div class="description">
+            <p>
+The command should be set as text you want to be recognized.
+            </p>
+           </div>
+</li>
+<li class="attribute" id="VoiceControlCommand::type">
+<span class="attrName"><span class="type">VoiceControlCommandType </span><span class="name">type</span></span><div class="brief">
+ The type of the command processing
+            </div>
+<div class="description">
+            <p>
+The default value is <var>"FOREGROUND"</var>            </p>
+           </div>
+</li>
+</ul>
+</div>
+</div>
+<div class="interface" id="VoiceControlLanguageChangeCallback">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlLanguageChangeCallback"></a><h3>2.5. VoiceControlLanguageChangeCallback</h3>
+<div class="brief">
+ Called when default language is changed.
+          </div>
+<pre class="webidl prettyprint">    [Callback=FunctionOnly, NoInterfaceObject] interface VoiceControlLanguageChangeCallback {
+       void onlanguagechanged (DOMString previous, DOMString current);
+    };</pre>
+<p><span class="version">
+            Since: </span>
+ 4.0
+          </p>
+<div class="methods">
+<h4>Methods</h4>
+<dl>
+<dt class="method" id="VoiceControlLanguageChangeCallback::onlanguagechanged">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlLanguageChangeCallback::onlanguagechanged"></a><code><b><span class="methodName">onlanguagechanged</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Called when default language is changed.
+            </div>
+<div class="synopsis"><pre class="signature prettyprint">void onlanguagechanged(DOMString previous, DOMString current);
+             </pre></div>
+<p><span class="version">
+            Since: </span>
+ 4.0
+            </p>
+<div class="parameters">
+<p><span class="param">Parameters:</span></p>
+<ul>
+          <li class="param">
+<span class="name">previous</span>:
+ Previous language
+                </li>
+          <li class="param">
+<span class="name">current</span>:
+ Current language
+                </li>
+        </ul>
+</div>
+</dd>
+</dl>
+</div>
+</div>
+<div class="interface" id="VoiceControlResultCallback">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlResultCallback"></a><h3>2.6. VoiceControlResultCallback</h3>
+<div class="brief">
+ Called when client gets the recognition result.
+          </div>
+<pre class="webidl prettyprint">    [Callback=FunctionOnly, NoInterfaceObject] interface VoiceControlResultCallback {
+       void onresult(<a href="#VoiceControlResultEvent">VoiceControlResultEvent</a> event, <a href="#VoiceControlCommand">VoiceControlCommand</a>[] list, DOMString results);
+    };</pre>
+<p><span class="version">
+            Since: </span>
+ 4.0
+          </p>
+<div class="methods">
+<h4>Methods</h4>
+<dl>
+<dt class="method" id="VoiceControlResultCallback::onresult">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlResultCallback::onresult"></a><code><b><span class="methodName">onresult</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Called when client gets the recognition result.
+            </div>
+<div class="synopsis"><pre class="signature prettyprint">void onresult(<a href="#VoiceControlResultEvent">VoiceControlResultEvent</a> event, <a href="#VoiceControlCommand">VoiceControlCommand</a>[] list, DOMString results);
+             </pre></div>
+<p><span class="version">
+            Since: </span>
+ 4.0
+            </p>
+<div class="parameters">
+<p><span class="param">Parameters:</span></p>
+<ul>
+          <li class="param">
+<span class="name">event</span>:
+ The result event
+                </li>
+          <li class="param">
+<span class="name">list</span>:
+ The recognized command list
+                </li>
+          <li class="param">
+<span class="name">results</span>:
+ The spoken text (e.g. registered command text like "play", "stop", etc.)
+                </li>
+        </ul>
+</div>
+</dd>
+</dl>
+</div>
+</div>
+</div>
+<h2 id="api-features">3. Related Feature</h2>
+<div id="def-api-features" class="def-api-features">
+        You can check if this API is supported with <em>tizen.systeminfo.getCapability()</em> and decide enable/disable codes that need this API.
+                    <div class="def-api-feature">
+<p><div class="description">
+            <p>
+To guarantee that the voice control application runs on a device with speech control feature, declare the following feature requirements in the config file:
+            </p>
+           </div></p>
+<li class="feature">http://tizen.org/feature/speech.control</li>
+</div>
+<div class="def-api-feature">
+<p><div class="description">
+            <p>
+To guarantee that the voice control application runs on a device with microphone feature, declare the following feature requirements in the config file:
+            </p>
+           </div></p>
+<li class="feature">http://tizen.org/feature/microphone</li>
+</div>
+<p></p>
+                    For more information, see <a href="https://developer.tizen.org/development/getting-started/web-application/understanding-tizen-programming/application-filtering">Application Filtering.</a>
+</div>
+<h2 id="full-webidl">4. Full WebIDL</h2>
+<pre class="webidl prettyprint">module VoiceControl {
+    enum VoiceControlResultEvent {"SUCCESS", "FAILURE"};
+
+    enum VoiceControlCommandType {"FOREGROUND"};
+
+    [NoInterfaceObject] interface VoiceControlClientManagerObject {
+       readonly attribute <a href="#VoiceControlClientManager">VoiceControlClientManager</a> voicecontrol;
+    };
+
+    <a href="tizen.html#Tizen">Tizen</a> implements <a href="#VoiceControlClientManagerObject">VoiceControlClientManagerObject</a>;
+
+    [NoInterfaceObject] interface VoiceControlClientManager {
+       <a href="#VoiceControlClient">VoiceControlClient</a> getVoiceControlClient() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+    };
+
+    [NoInterfaceObject] interface VoiceControlClient {
+
+       DOMString getCurrentLanguage() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       void setCommandList(<a href="#VoiceControlCommand">VoiceControlCommand</a>[] list, optional <a href="#VoiceControlCommandType">VoiceControlCommandType</a>? type) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       void unsetCommandList(optional <a href="#VoiceControlCommandType">VoiceControlCommandType</a>? type) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       long addResultListener(<a href="#VoiceControlResultCallback">VoiceControlResultCallback</a> listener) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       void removeResultListener(long id) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       long addLanguageChangeListener(<a href="#VoiceControlLanguageChangeCallback">VoiceControlLanguageChangeCallback</a> listener) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       void removeLanguageChangeListener(long id) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       void release() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+    };
+
+    [Constructor(DOMString command, optional <a href="#VoiceControlCommandType">VoiceControlCommandType</a>? type)]
+    interface VoiceControlCommand {
+
+       attribute DOMString command;
+
+       attribute <a href="#VoiceControlCommandType">VoiceControlCommandType</a> type;
+    };
+
+    [Callback=FunctionOnly, NoInterfaceObject] interface VoiceControlLanguageChangeCallback {
+       void onlanguagechanged (DOMString previous, DOMString current);
+    };
+
+    [Callback=FunctionOnly, NoInterfaceObject] interface VoiceControlResultCallback {
+       void onresult(<a href="#VoiceControlResultEvent">VoiceControlResultEvent</a> event, <a href="#VoiceControlCommand">VoiceControlCommand</a>[] list, DOMString results);
+    };
+};</pre>
+</div>
+<div id="page-footer">
+<div class="copyright" align="center">
+         Except as noted, this content - excluding the Code Examples - is licensed under <a href="http://creativecommons.org/licenses/by/3.0/legalcode" target="_blank">Creative Commons Attribution 3.0</a> and all of the Code Examples contained herein are licensed under <a href="https://www.tizen.org/bsd-3-clause-license" target="_blank">BSD-3-Clause</a>. <br>For details, see the <a href="https://www.tizen.org/content-license" target="_blank">Content License</a>.
+            </div>
+<script type="text/javascript">
+
+              var _gaq = _gaq || [];
+              _gaq.push(['_setAccount', 'UA-25976949-1']);
+              _gaq.push(['_setDomainName', 'tizen.org']);
+              _gaq.push(['_trackPageview']);
+
+              (function() {
+                var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+                ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+                var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+              })();
+
+            </script>
+</div>
+</body>
+</html>
index 37575f8..31492d0 100755 (executable)
                 </tr>
                 </tbody>
               </table>
+            <h4 id="UIX">UIX</h4>
+             <table width="90%">
+                <thead>
+                <tr><th style="width:20%">API</th><th>Description</th><th style="width:5%">Version</th></tr>
+                </thead>
+                <tbody>
+                <tr><td><a href="tizen/voicecontrol.html">
+                        Voice Control</a></td>
+                <td>This API provides functions for users to set voice commands and to control the web application through their voices.</td>
+                <td>4.0</td>
+                </tr>
+                </tbody>
+              </table>
             <h4 id="Cordova">Cordova</h4>
              <table width="90%">
                 <thead>
diff --git a/org.tizen.web.apireference/html/device_api/tv/tizen/voicecontrol.html b/org.tizen.web.apireference/html/device_api/tv/tizen/voicecontrol.html
new file mode 100644 (file)
index 0000000..d0341e8
--- /dev/null
@@ -0,0 +1,965 @@
+<!DOCTYPE html PUBLIC "html">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<link rel="stylesheet" type="text/css" href="tizen.css" media="screen">
+<script type="text/javascript" src="snippet.js"></script><title>VoiceControl API</title>
+</head>
+<body id="page-content" onload="prettyPrint()">
+<div class="api" id="::VoiceControl">
+<div class="title"><h1>VoiceControl API</h1></div>
+<div class="brief">
+ The Voice Control API provides interfaces and methods for recognizing voice command.
+        </div>
+<div class="description">
+        <p>
+Voice control API offers functionality to recognize the voice and to send the result as predefined command.
+        </p>
+       </div>
+<p><span class="version">
+            Since: </span>
+ 4.0
+        </p>
+<h2>Table of Contents</h2>
+<ul class="toc">
+<li>1. <a href="#typedefs-section">Type Definitions</a><ul class="toc">
+<li>
+                    1.1. <a href="#VoiceControlResultEvent">VoiceControlResultEvent</a>
+</li>
+<li>
+                    1.2. <a href="#VoiceControlCommandType">VoiceControlCommandType</a>
+</li>
+</ul>
+</li>
+<li>2. <a href="#interfaces-section">Interfaces</a><ul class="toc">
+<li>2.1. <a href="#VoiceControlClientManagerObject">VoiceControlClientManagerObject</a>
+</li>
+<li>2.2. <a href="#VoiceControlClientManager">VoiceControlClientManager</a>
+</li>
+<li>2.3. <a href="#VoiceControlClient">VoiceControlClient</a>
+</li>
+<li>2.4. <a href="#VoiceControlCommand">VoiceControlCommand</a>
+</li>
+<li>2.5. <a href="#VoiceControlLanguageChangeCallback">VoiceControlLanguageChangeCallback</a>
+</li>
+<li>2.6. <a href="#VoiceControlResultCallback">VoiceControlResultCallback</a>
+</li>
+</ul>
+</li>
+<li>3. <a href="#api-features">Related Feature</a>
+</li>
+<li>4. <a href="#full-webidl">Full WebIDL</a>
+</li>
+</ul>
+<hr>
+<h2 id="method-summary">Summary of Interfaces and Methods</h2>
+<table class="informaltable">
+<thead><tr>
+<th>Interface</th>
+<th>Method</th>
+</tr></thead>
+<tbody>
+<tr>
+<td><a href="#VoiceControlClientManagerObject">VoiceControlClientManagerObject</a></td>
+<td></td>
+</tr>
+<tr>
+<td><a href="#VoiceControlClientManager">VoiceControlClientManager</a></td>
+<td><div>
+<a href="#VoiceControlClient">VoiceControlClient</a> <a href="#VoiceControlClientManager::getVoiceControlClient">getVoiceControlClient</a> ()</div></td>
+</tr>
+<tr>
+<td><a href="#VoiceControlClient">VoiceControlClient</a></td>
+<td>
+<div>DOMString <a href="#VoiceControlClient::getCurrentLanguage">getCurrentLanguage</a> ()</div>
+<div>void <a href="#VoiceControlClient::setCommandList">setCommandList</a> (<a href="#VoiceControlCommand">VoiceControlCommand</a>[] list, optional <a href="#VoiceControlCommandType">VoiceControlCommandType</a>? type)</div>
+<div>void <a href="#VoiceControlClient::unsetCommandList">unsetCommandList</a> (optional <a href="#VoiceControlCommandType">VoiceControlCommandType</a>? type)</div>
+<div>long <a href="#VoiceControlClient::addResultListener">addResultListener</a> (<a href="#VoiceControlResultCallback">VoiceControlResultCallback</a> listener)</div>
+<div>void <a href="#VoiceControlClient::removeResultListener">removeResultListener</a> (long id)</div>
+<div>long <a href="#VoiceControlClient::addLanguageChangeListener">addLanguageChangeListener</a> (<a href="#VoiceControlLanguageChangeCallback">VoiceControlLanguageChangeCallback</a> listener)</div>
+<div>void <a href="#VoiceControlClient::removeLanguageChangeListener">removeLanguageChangeListener</a> (long id)</div>
+<div>void <a href="#VoiceControlClient::release">release</a> ()</div>
+</td>
+</tr>
+<tr>
+<td><a href="#VoiceControlCommand">VoiceControlCommand</a></td>
+<td></td>
+</tr>
+<tr>
+<td><a href="#VoiceControlLanguageChangeCallback">VoiceControlLanguageChangeCallback</a></td>
+<td><div>void <a href="#VoiceControlLanguageChangeCallback::onlanguagechanged">onlanguagechanged</a> (DOMString previous, DOMString current)</div></td>
+</tr>
+<tr>
+<td><a href="#VoiceControlResultCallback">VoiceControlResultCallback</a></td>
+<td><div>void <a href="#VoiceControlResultCallback::onresult">onresult</a> (<a href="#VoiceControlResultEvent">VoiceControlResultEvent</a> event, <a href="#VoiceControlCommand">VoiceControlCommand</a>[] list, DOMString results)</div></td>
+</tr>
+</tbody>
+</table>
+<div class="typedefs" id="typedefs-section">
+<h2>1. Type Definitions</h2>
+<div class="enum" id="VoiceControlResultEvent">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlResultEvent"></a><h3>1.1. VoiceControlResultEvent</h3>
+<div class="brief">
+ Specifies the result event.
+          </div>
+<pre class="webidl prettyprint">    enum VoiceControlResultEvent {"SUCCESS", "FAILURE"};</pre>
+<p><span class="version">
+            Since: </span>
+ 4.0
+          </p>
+<div class="description">
+          <p>
+The result events defined by this enumeration are:
+          </p>
+          <ul>
+            <li>
+ SUCCESS - Successful result            </li>
+            <li>
+ FAILURE - Rejected result by voice control service            </li>
+          </ul>
+         </div>
+</div>
+<div class="enum" id="VoiceControlCommandType">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlCommandType"></a><h3>1.2. VoiceControlCommandType</h3>
+<div class="brief">
+ Specifies command type.
+          </div>
+<pre class="webidl prettyprint">    enum VoiceControlCommandType {"FOREGROUND"};</pre>
+<p><span class="version">
+            Since: </span>
+ 4.0
+          </p>
+<div class="description">
+          <p>
+The command type defined by this enumeration is:
+          </p>
+          <ul>
+            <li>
+ FOREGROUND - command type used when application is foreground            </li>
+          </ul>
+         </div>
+</div>
+</div>
+<div class="interfaces" id="interfaces-section">
+<h2>2. Interfaces</h2>
+<div class="interface" id="VoiceControlClientManagerObject">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlClientManagerObject"></a><h3>2.1. VoiceControlClientManagerObject</h3>
+<div class="brief">
+ The VoiceControlClientManagerObject interface defines what is instantiated in the <em>Tizen</em> object.
+          </div>
+<pre class="webidl prettyprint">    [NoInterfaceObject] interface VoiceControlClientManagerObject {
+       readonly attribute <a href="#VoiceControlClientManager">VoiceControlClientManager</a> voicecontrol;
+    };</pre>
+<pre class="webidl prettyprint">    <a href="tizen.html#Tizen">Tizen</a> implements <a href="#VoiceControlClientManagerObject">VoiceControlClientManagerObject</a>;</pre>
+<p><span class="version">
+            Since: </span>
+ 4.0
+          </p>
+<div class="description">
+          <p>
+The <em>tizen.voicecontrol</em> object provides access to the functionality of the voice control API.
+          </p>
+         </div>
+</div>
+<div class="interface" id="VoiceControlClientManager">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlClientManager"></a><h3>2.2. VoiceControlClientManager</h3>
+<div class="brief">
+ Voice Control Client Manager
+          </div>
+<pre class="webidl prettyprint">    [NoInterfaceObject] interface VoiceControlClientManager {
+       <a href="#VoiceControlClient">VoiceControlClient</a> getVoiceControlClient() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+    };</pre>
+<p><span class="version">
+            Since: </span>
+ 4.0
+          </p>
+<div class="methods">
+<h4>Methods</h4>
+<dl>
+<dt class="method" id="VoiceControlClientManager::getVoiceControlClient">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlClientManager::getVoiceControlClient"></a><code><b><span class="methodName">getVoiceControlClient</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Requests voice control Client instance.
+            </div>
+<div class="synopsis"><pre class="signature prettyprint"><a href="#VoiceControlClient">VoiceControlClient</a> getVoiceControlClient();
+             </pre></div>
+<p><span class="version">
+            Since: </span>
+ 4.0
+            </p>
+<p><span class="privilegelevel">
+            Privilege level: </span>
+ public
+            </p>
+<p><span class="privilege">
+            Privilege: </span>
+      http://tizen.org/privilege/recorder
+            </p>
+<p><span class="remark"> Remark : </span>
+ This method always returns the static voice control client object. That is, if you call a method
+using one of voice control client objects, it affects other objects.
+            </p>
+<div class="returntype">
+<p><span class="return">Return value:</span></p>
+ VoiceControlClient The object to manage voice control
+              </div>
+<div class="exceptionlist">
+<p><span class="except">Exceptions:</span></p>
+          <ul class="exception"><li>WebAPIException<ul>
+<li class="list"><p>
+ with error type NotSupportedError, if this feature is not supported.
+                </p></li>
+<li class="list"><p>
+ with error type SecurityError, if the application does not have the privilege to call this method.
+                </p></li>
+<li class="list"><p>
+ with error type AbortError, if the operation cannot be finished properly.
+                </p></li>
+</ul>
+</li></ul>
+        </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> /* client1 and client2 refer the same object */
+ var client1 = tizen.voicecontrol.getVoiceControlClient();
+ var client2 = tizen.voicecontrol.getVoiceControlClient();
+ </pre>
+</div>
+</dd>
+</dl>
+</div>
+</div>
+<div class="interface" id="VoiceControlClient">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlClient"></a><h3>2.3. VoiceControlClient</h3>
+<div class="brief">
+ Voice Control Client
+          </div>
+<pre class="webidl prettyprint">    [NoInterfaceObject] interface VoiceControlClient {
+
+       DOMString getCurrentLanguage() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       void setCommandList(<a href="#VoiceControlCommand">VoiceControlCommand</a>[] list, optional <a href="#VoiceControlCommandType">VoiceControlCommandType</a>? type) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       void unsetCommandList(optional <a href="#VoiceControlCommandType">VoiceControlCommandType</a>? type) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       long addResultListener(<a href="#VoiceControlResultCallback">VoiceControlResultCallback</a> listener) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       void removeResultListener(long id) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       long addLanguageChangeListener(<a href="#VoiceControlLanguageChangeCallback">VoiceControlLanguageChangeCallback</a> listener) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       void removeLanguageChangeListener(long id) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       void release() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+    };</pre>
+<p><span class="version">
+            Since: </span>
+ 4.0
+          </p>
+<div class="methods">
+<h4>Methods</h4>
+<dl>
+<dt class="method" id="VoiceControlClient::getCurrentLanguage">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlClient::getCurrentLanguage"></a><code><b><span class="methodName">getCurrentLanguage</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Gets current language.
+            </div>
+<div class="synopsis"><pre class="signature prettyprint">DOMString getCurrentLanguage();
+             </pre></div>
+<p><span class="version">
+            Since: </span>
+ 4.0
+            </p>
+<div class="description">
+            <p>
+A language is specified as an ISO 3166 alpha-2 two letter country-code followed by ISO 639-1 for the two-letter language code.
+For example, "ko_KR" for Korean, "en_US" for American English.
+            </p>
+           </div>
+<div class="exceptionlist">
+<p><span class="except">Exceptions:</span></p>
+          <ul class="exception"><li>WebAPIException<ul>
+<li class="list"><p>
+ with error type NotSupportedError, if this feature is not supported.
+                </p></li>
+<li class="list"><p>
+ with error type AbortError, if the operation cannot be finished properly.
+                </p></li>
+</ul>
+</li></ul>
+        </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var client = tizen.voicecontrol.getVoiceControlClient();
+ var currentLanguage = client.getCurrentLanguage();
+
+ console.log("Current language is: " + currentLanguage);
+ </pre>
+</div>
+<div class="output">
+<span class="title"><p>Output example:</p></span><pre> Current language is: en_US
+ </pre>
+</div>
+</dd>
+<dt class="method" id="VoiceControlClient::setCommandList">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlClient::setCommandList"></a><code><b><span class="methodName">setCommandList</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Sets command list.
+            </div>
+<div class="synopsis"><pre class="signature prettyprint">void setCommandList(<a href="#VoiceControlCommand">VoiceControlCommand</a>[] list, optional <a href="#VoiceControlCommandType">VoiceControlCommandType</a>? type);
+             </pre></div>
+<p><span class="version">
+            Since: </span>
+ 4.0
+            </p>
+<p><span class="privilegelevel">
+            Privilege level: </span>
+ public
+            </p>
+<p><span class="privilege">
+            Privilege: </span>
+      http://tizen.org/privilege/recorder
+            </p>
+<div class="parameters">
+<p><span class="param">Parameters:</span></p>
+<ul>
+          <li class="param">
+<span class="name">list</span>:
+ Command list handle
+                </li>
+          <li class="param">
+<span class="name">type</span><span class="optional"> [optional]</span><span class="optional"> [nullable]</span>:
+ Type of registered commands. The default value is <var>"FOREGROUND"</var>                </li>
+        </ul>
+</div>
+<div class="exceptionlist">
+<p><span class="except">Exceptions:</span></p>
+          <ul class="exception"><li>WebAPIException<ul>
+<li class="list"><p>
+ with error type TypeMismatchError, if the input parameter is not
+compatible with the expected type.
+                </p></li>
+<li class="list"><p>
+ with error type NotSupportedError, if this feature is not supported.
+                </p></li>
+<li class="list"><p>
+ with error type InvalidValuesError, if any of the input
+parameters contain an invalid value.
+                </p></li>
+<li class="list"><p>
+ with error type SecurityError, if the application does not have the privilege to call this method.
+                </p></li>
+<li class="list"><p>
+ with error type AbortError, if the operation cannot be finished properly.
+                </p></li>
+</ul>
+</li></ul>
+        </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var client = tizen.voicecontrol.getVoiceControlClient();
+
+ var commands = [
+            new tizen.VoiceControlCommand("alpha"),
+            new tizen.VoiceControlCommand("bravo"),
+            new tizen.VoiceControlCommand("charlie")];
+ client.setCommandList(commands, "FOREGROUND");
+ </pre>
+</div>
+</dd>
+<dt class="method" id="VoiceControlClient::unsetCommandList">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlClient::unsetCommandList"></a><code><b><span class="methodName">unsetCommandList</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Unsets command list.
+            </div>
+<div class="synopsis"><pre class="signature prettyprint">void unsetCommandList(optional <a href="#VoiceControlCommandType">VoiceControlCommandType</a>? type);
+             </pre></div>
+<p><span class="version">
+            Since: </span>
+ 4.0
+            </p>
+<p><span class="privilegelevel">
+            Privilege level: </span>
+ public
+            </p>
+<p><span class="privilege">
+            Privilege: </span>
+      http://tizen.org/privilege/recorder
+            </p>
+<div class="parameters">
+<p><span class="param">Parameters:</span></p>
+<ul>
+          <li class="param">
+<span class="name">type</span><span class="optional"> [optional]</span><span class="optional"> [nullable]</span>:
+ Type of commands that should be unset. The default value is <var>"FOREGROUND"</var>                </li>
+        </ul>
+</div>
+<div class="exceptionlist">
+<p><span class="except">Exceptions:</span></p>
+          <ul class="exception"><li>WebAPIException<ul>
+<li class="list"><p>
+ with error type TypeMismatchError, if the input parameter is not
+compatible with the expected type.
+                </p></li>
+<li class="list"><p>
+ with error type NotSupportedError, if this feature is not supported.
+                </p></li>
+<li class="list"><p>
+ with error type SecurityError, if the application does not have the privilege to call this method.
+                </p></li>
+<li class="list"><p>
+ with error type AbortError, if the operation cannot be finished properly.
+                </p></li>
+</ul>
+</li></ul>
+        </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var client = tizen.voicecontrol.getVoiceControlClient();
+
+ var commands = [
+            new tizen.VoiceControlCommand("alpha"),
+            new tizen.VoiceControlCommand("bravo"),
+            new tizen.VoiceControlCommand("charlie")];
+ client.setCommandList(commands, "FOREGROUND");
+
+ client.unsetCommandList("FOREGROUND");
+ </pre>
+</div>
+</dd>
+<dt class="method" id="VoiceControlClient::addResultListener">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlClient::addResultListener"></a><code><b><span class="methodName">addResultListener</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Registers a listener for getting recognition result.
+            </div>
+<div class="synopsis"><pre class="signature prettyprint">long addResultListener(<a href="#VoiceControlResultCallback">VoiceControlResultCallback</a> listener);
+             </pre></div>
+<p><span class="version">
+            Since: </span>
+ 4.0
+            </p>
+<div class="parameters">
+<p><span class="param">Parameters:</span></p>
+<ul>
+          <li class="param">
+<span class="name">listener</span>:
+ Callback function to register
+                </li>
+        </ul>
+</div>
+<div class="returntype">
+<p><span class="return">Return value:</span></p>
+ long Identifier used to clear the watch subscription.
+              </div>
+<div class="exceptionlist">
+<p><span class="except">Exceptions:</span></p>
+          <ul class="exception"><li>WebAPIException<ul>
+<li class="list"><p>
+ with error type TypeMismatchError, if the input parameter is not
+compatible with the expected type.
+                </p></li>
+<li class="list"><p>
+ with error type NotSupportedError, if this feature is not supported.
+                </p></li>
+<li class="list"><p>
+ with error type AbortError, if the operation cannot be finished properly.
+                </p></li>
+</ul>
+</li></ul>
+        </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var client = tizen.voicecontrol.getVoiceControlClient();
+
+ var commands = [
+            new tizen.VoiceControlCommand("alpha"),
+            new tizen.VoiceControlCommand("bravo"),
+            new tizen.VoiceControlCommand("charlie")];
+ client.setCommandList(commands, "FOREGROUND");
+
+ var resultListenerCallback = function(event, list, result)
+ {
+   console.log("Result callback - event: " + event + ", result: " + result);
+ }
+
+ var id = client.addResultListener(resultListenerCallback);
+ console.log("Result listener[" + id + "] is created");
+ </pre>
+</div>
+<div class="output">
+<span class="title"><p>Output example:</p></span><pre> Result listener[1] is created
+ </pre>
+</div>
+<div class="output">
+<span class="title"><p>Output example:</p></span><pre> /* (When a user says "alpha") */
+ Result callback - event: SUCCESS, result: alpha
+ </pre>
+</div>
+</dd>
+<dt class="method" id="VoiceControlClient::removeResultListener">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlClient::removeResultListener"></a><code><b><span class="methodName">removeResultListener</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Unregisters the listener.
+            </div>
+<div class="synopsis"><pre class="signature prettyprint">void removeResultListener(long id);
+             </pre></div>
+<p><span class="version">
+            Since: </span>
+ 4.0
+            </p>
+<div class="parameters">
+<p><span class="param">Parameters:</span></p>
+<ul>
+          <li class="param">
+<span class="name">id</span>:
+ Identifier used to clear the watch subscription
+                </li>
+        </ul>
+</div>
+<div class="exceptionlist">
+<p><span class="except">Exceptions:</span></p>
+          <ul class="exception"><li>WebAPIException<ul>
+<li class="list"><p>
+ with error type NotSupportedError, if this feature is not supported.
+                </p></li>
+<li class="list"><p>
+ with error type AbortError, if the operation cannot be finished properly.
+                </p></li>
+</ul>
+</li></ul>
+        </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var client = tizen.voicecontrol.getVoiceControlClient();
+
+ var commands = [
+            new tizen.VoiceControlCommand("alpha"),
+            new tizen.VoiceControlCommand("bravo"),
+            new tizen.VoiceControlCommand("charlie")];
+ client.setCommandList(commands, "FOREGROUND");
+
+ var resultListenerCallback = function(event, list, result)
+ {
+   console.log("Result callback - event: " + event + ", result: " + result);
+ }
+
+ var id = client.addResultListener(resultListenerCallback);
+
+ client.removeResultListener(id);
+ </pre>
+</div>
+</dd>
+<dt class="method" id="VoiceControlClient::addLanguageChangeListener">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlClient::addLanguageChangeListener"></a><code><b><span class="methodName">addLanguageChangeListener</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Registers a callback function to be called when current language is changed.
+            </div>
+<div class="synopsis"><pre class="signature prettyprint">long addLanguageChangeListener(<a href="#VoiceControlLanguageChangeCallback">VoiceControlLanguageChangeCallback</a> listener);
+             </pre></div>
+<p><span class="version">
+            Since: </span>
+ 4.0
+            </p>
+<div class="parameters">
+<p><span class="param">Parameters:</span></p>
+<ul>
+          <li class="param">
+<span class="name">listener</span>:
+ Callback function to register
+                </li>
+        </ul>
+</div>
+<div class="returntype">
+<p><span class="return">Return value:</span></p>
+ long Identifier used to clear the watch subscription.
+              </div>
+<div class="exceptionlist">
+<p><span class="except">Exceptions:</span></p>
+          <ul class="exception"><li>WebAPIException<ul>
+<li class="list"><p>
+ with error type TypeMismatchError, if the input parameter is not
+compatible with the expected type.
+                </p></li>
+<li class="list"><p>
+ with error type NotSupportedError, if this feature is not supported.
+                </p></li>
+<li class="list"><p>
+ with error type AbortError, if the operation cannot be finished properly.
+                </p></li>
+</ul>
+</li></ul>
+        </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var client = tizen.voicecontrol.getVoiceControlClient();
+
+ var languageChangeListenerCallback = function(previous, current)
+ {
+   console.log("Language change callback " + previous + "-&gt;" + current);
+ }
+
+ var id = client.addLanguageChangeListener(languageChangeListenerCallback);
+ console.log("Language change listener[" + id + "] is created");
+ </pre>
+</div>
+<div class="output">
+<span class="title"><p>Output example:</p></span><pre> Language change listener[1] is created
+ </pre>
+</div>
+<div class="output">
+<span class="title"><p>Output example:</p></span><pre> /* (When language is changed) */
+ Language change callback en_US-&gt;ko_KR
+ </pre>
+</div>
+</dd>
+<dt class="method" id="VoiceControlClient::removeLanguageChangeListener">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlClient::removeLanguageChangeListener"></a><code><b><span class="methodName">removeLanguageChangeListener</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Unregisters the callback function.
+            </div>
+<div class="synopsis"><pre class="signature prettyprint">void removeLanguageChangeListener(long id);
+             </pre></div>
+<p><span class="version">
+            Since: </span>
+ 4.0
+            </p>
+<div class="parameters">
+<p><span class="param">Parameters:</span></p>
+<ul>
+          <li class="param">
+<span class="name">id</span>:
+ Identifier used to clear the watch subscription
+                </li>
+        </ul>
+</div>
+<div class="exceptionlist">
+<p><span class="except">Exceptions:</span></p>
+          <ul class="exception"><li>WebAPIException<ul>
+<li class="list"><p>
+ with error type NotSupportedError, if this feature is not supported.
+                </p></li>
+<li class="list"><p>
+ with error type AbortError, if the operation cannot be finished properly.
+                </p></li>
+</ul>
+</li></ul>
+        </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var client = tizen.voicecontrol.getVoiceControlClient();
+
+ var languageChangeListenerCallback = function(previous, current)
+ {
+   console.log("Language change callback " + previous + "-&gt;" + current);;
+ }
+
+ var id = client.addLanguageChangeListener(languageChangeListenerCallback);
+
+ client.removeLanguageChangeListener(id);
+ </pre>
+</div>
+</dd>
+<dt class="method" id="VoiceControlClient::release">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlClient::release"></a><code><b><span class="methodName">release</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Releases all resources.
+            </div>
+<div class="synopsis"><pre class="signature prettyprint">void release();
+             </pre></div>
+<p><span class="version">
+            Since: </span>
+ 4.0
+            </p>
+<div class="description">
+            <p>
+Releases listeners and disconnects voice control service.
+You should call this method when you do not want to use voice control client instance any more.
+It is necessary to create new voice control client instance, if you want to use more after release.
+            </p>
+           </div>
+<p><span class="remark"> Remark : </span>
+ If you call this method, all other VoiceControlClient objects are also released.
+            </p>
+<div class="exceptionlist">
+<p><span class="except">Exceptions:</span></p>
+          <ul class="exception"><li>WebAPIException<ul><li class="list"><p>
+ with error type AbortError, if the operation cannot be finished properly.
+                </p></li></ul>
+</li></ul>
+        </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> /* Initialize the voice control client */
+ var client = tizen.voicecontrol.getVoiceControlClient();
+
+ var commands = [
+            new tizen.VoiceControlCommand("alpha"),
+            new tizen.VoiceControlCommand("bravo"),
+            new tizen.VoiceControlCommand("charlie")];
+ client.setCommandList(commands, "FOREGROUND");
+
+ var resultListenerCallback = function(event, list, result)
+ {
+   console.log("Result callback - event: " + event + ", result: " + result);
+ }
+
+ var id = client.addResultListener(resultListenerCallback);
+
+ /* Deinitialize the voice control client */
+ client.removeResultListener(id);
+ client.unsetCommandList("FOREGROUND");
+
+ /* After release() voice control does not work */
+ /* If you want to use voice control after release(), you should initialize the client again */
+ client.release();
+ </pre>
+</div>
+</dd>
+</dl>
+</div>
+</div>
+<div class="interface" id="VoiceControlCommand">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlCommand"></a><h3>2.4. VoiceControlCommand</h3>
+<div class="brief">
+ The VoiceControlCommand defines interface used to create command you want to be recognized.
+          </div>
+<pre class="webidl prettyprint">    [Constructor(DOMString command, optional <a href="#VoiceControlCommandType">VoiceControlCommandType</a>? type)]
+    interface VoiceControlCommand {
+
+       attribute DOMString command;
+
+       attribute <a href="#VoiceControlCommandType">VoiceControlCommandType</a> type;
+    };</pre>
+<div class="constructors">
+<h4 id="VoiceControlCommand::constructor">Constructors</h4>
+<dl>
+<div class="brief">
+ Command constructor
+              </div>
+<pre class="webidl prettyprint">VoiceControlCommand(DOMString command, optional <a href="#VoiceControlCommandType">VoiceControlCommandType</a>? type);</pre>
+</dl>
+</div>
+<div class="attributes">
+<h4>Attributes</h4>
+<ul>
+<li class="attribute" id="VoiceControlCommand::command">
+<span class="attrName"><span class="type">DOMString </span><span class="name">command</span></span><div class="brief">
+ The command text
+            </div>
+<div class="description">
+            <p>
+The command should be set as text you want to be recognized.
+            </p>
+           </div>
+</li>
+<li class="attribute" id="VoiceControlCommand::type">
+<span class="attrName"><span class="type">VoiceControlCommandType </span><span class="name">type</span></span><div class="brief">
+ The type of the command processing
+            </div>
+<div class="description">
+            <p>
+The default value is <var>"FOREGROUND"</var>            </p>
+           </div>
+</li>
+</ul>
+</div>
+</div>
+<div class="interface" id="VoiceControlLanguageChangeCallback">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlLanguageChangeCallback"></a><h3>2.5. VoiceControlLanguageChangeCallback</h3>
+<div class="brief">
+ Called when default language is changed.
+          </div>
+<pre class="webidl prettyprint">    [Callback=FunctionOnly, NoInterfaceObject] interface VoiceControlLanguageChangeCallback {
+       void onlanguagechanged (DOMString previous, DOMString current);
+    };</pre>
+<p><span class="version">
+            Since: </span>
+ 4.0
+          </p>
+<div class="methods">
+<h4>Methods</h4>
+<dl>
+<dt class="method" id="VoiceControlLanguageChangeCallback::onlanguagechanged">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlLanguageChangeCallback::onlanguagechanged"></a><code><b><span class="methodName">onlanguagechanged</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Called when default language is changed.
+            </div>
+<div class="synopsis"><pre class="signature prettyprint">void onlanguagechanged(DOMString previous, DOMString current);
+             </pre></div>
+<p><span class="version">
+            Since: </span>
+ 4.0
+            </p>
+<div class="parameters">
+<p><span class="param">Parameters:</span></p>
+<ul>
+          <li class="param">
+<span class="name">previous</span>:
+ Previous language
+                </li>
+          <li class="param">
+<span class="name">current</span>:
+ Current language
+                </li>
+        </ul>
+</div>
+</dd>
+</dl>
+</div>
+</div>
+<div class="interface" id="VoiceControlResultCallback">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlResultCallback"></a><h3>2.6. VoiceControlResultCallback</h3>
+<div class="brief">
+ Called when client gets the recognition result.
+          </div>
+<pre class="webidl prettyprint">    [Callback=FunctionOnly, NoInterfaceObject] interface VoiceControlResultCallback {
+       void onresult(<a href="#VoiceControlResultEvent">VoiceControlResultEvent</a> event, <a href="#VoiceControlCommand">VoiceControlCommand</a>[] list, DOMString results);
+    };</pre>
+<p><span class="version">
+            Since: </span>
+ 4.0
+          </p>
+<div class="methods">
+<h4>Methods</h4>
+<dl>
+<dt class="method" id="VoiceControlResultCallback::onresult">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlResultCallback::onresult"></a><code><b><span class="methodName">onresult</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Called when client gets the recognition result.
+            </div>
+<div class="synopsis"><pre class="signature prettyprint">void onresult(<a href="#VoiceControlResultEvent">VoiceControlResultEvent</a> event, <a href="#VoiceControlCommand">VoiceControlCommand</a>[] list, DOMString results);
+             </pre></div>
+<p><span class="version">
+            Since: </span>
+ 4.0
+            </p>
+<div class="parameters">
+<p><span class="param">Parameters:</span></p>
+<ul>
+          <li class="param">
+<span class="name">event</span>:
+ The result event
+                </li>
+          <li class="param">
+<span class="name">list</span>:
+ The recognized command list
+                </li>
+          <li class="param">
+<span class="name">results</span>:
+ The spoken text (e.g. registered command text like "play", "stop", etc.)
+                </li>
+        </ul>
+</div>
+</dd>
+</dl>
+</div>
+</div>
+</div>
+<h2 id="api-features">3. Related Feature</h2>
+<div id="def-api-features" class="def-api-features">
+        You can check if this API is supported with <em>tizen.systeminfo.getCapability()</em> and decide enable/disable codes that need this API.
+                    <div class="def-api-feature">
+<p><div class="description">
+            <p>
+To guarantee that the voice control application runs on a device with speech control feature, declare the following feature requirements in the config file:
+            </p>
+           </div></p>
+<li class="feature">http://tizen.org/feature/speech.control</li>
+</div>
+<div class="def-api-feature">
+<p><div class="description">
+            <p>
+To guarantee that the voice control application runs on a device with microphone feature, declare the following feature requirements in the config file:
+            </p>
+           </div></p>
+<li class="feature">http://tizen.org/feature/microphone</li>
+</div>
+<p></p>
+                    For more information, see <a href="https://developer.tizen.org/development/getting-started/web-application/understanding-tizen-programming/application-filtering">Application Filtering.</a>
+</div>
+<h2 id="full-webidl">4. Full WebIDL</h2>
+<pre class="webidl prettyprint">module VoiceControl {
+    enum VoiceControlResultEvent {"SUCCESS", "FAILURE"};
+
+    enum VoiceControlCommandType {"FOREGROUND"};
+
+    [NoInterfaceObject] interface VoiceControlClientManagerObject {
+       readonly attribute <a href="#VoiceControlClientManager">VoiceControlClientManager</a> voicecontrol;
+    };
+
+    <a href="tizen.html#Tizen">Tizen</a> implements <a href="#VoiceControlClientManagerObject">VoiceControlClientManagerObject</a>;
+
+    [NoInterfaceObject] interface VoiceControlClientManager {
+       <a href="#VoiceControlClient">VoiceControlClient</a> getVoiceControlClient() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+    };
+
+    [NoInterfaceObject] interface VoiceControlClient {
+
+       DOMString getCurrentLanguage() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       void setCommandList(<a href="#VoiceControlCommand">VoiceControlCommand</a>[] list, optional <a href="#VoiceControlCommandType">VoiceControlCommandType</a>? type) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       void unsetCommandList(optional <a href="#VoiceControlCommandType">VoiceControlCommandType</a>? type) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       long addResultListener(<a href="#VoiceControlResultCallback">VoiceControlResultCallback</a> listener) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       void removeResultListener(long id) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       long addLanguageChangeListener(<a href="#VoiceControlLanguageChangeCallback">VoiceControlLanguageChangeCallback</a> listener) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       void removeLanguageChangeListener(long id) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       void release() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+    };
+
+    [Constructor(DOMString command, optional <a href="#VoiceControlCommandType">VoiceControlCommandType</a>? type)]
+    interface VoiceControlCommand {
+
+       attribute DOMString command;
+
+       attribute <a href="#VoiceControlCommandType">VoiceControlCommandType</a> type;
+    };
+
+    [Callback=FunctionOnly, NoInterfaceObject] interface VoiceControlLanguageChangeCallback {
+       void onlanguagechanged (DOMString previous, DOMString current);
+    };
+
+    [Callback=FunctionOnly, NoInterfaceObject] interface VoiceControlResultCallback {
+       void onresult(<a href="#VoiceControlResultEvent">VoiceControlResultEvent</a> event, <a href="#VoiceControlCommand">VoiceControlCommand</a>[] list, DOMString results);
+    };
+};</pre>
+</div>
+<div id="page-footer">
+<div class="copyright" align="center">
+         Except as noted, this content - excluding the Code Examples - is licensed under <a href="http://creativecommons.org/licenses/by/3.0/legalcode" target="_blank">Creative Commons Attribution 3.0</a> and all of the Code Examples contained herein are licensed under <a href="https://www.tizen.org/bsd-3-clause-license" target="_blank">BSD-3-Clause</a>. <br>For details, see the <a href="https://www.tizen.org/content-license" target="_blank">Content License</a>.
+            </div>
+<script type="text/javascript">
+
+              var _gaq = _gaq || [];
+              _gaq.push(['_setAccount', 'UA-25976949-1']);
+              _gaq.push(['_setDomainName', 'tizen.org']);
+              _gaq.push(['_trackPageview']);
+
+              (function() {
+                var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+                ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+                var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+              })();
+
+            </script>
+</div>
+</body>
+</html>
index b725a07..6027bdd 100644 (file)
                 <td>Mandatory</td>
                 <td>Yes</td>
 
+                </tr></tbody></table><h4 id="UIX">UIX</h4>
+             <table class="api-list"><thead><tr><th>API</th><th>Description</th><th>Version (Since)</th><th>Wearable</th><th>Supported on<br>Wearable Emulator</th></tr>
+                </thead><tbody><tr><td><a href="tizen/voicecontrol.html">
+                        Voice Control</a></td>
+                <td>This API provides functions for users to set voice commands and to control the web application through their voices.</td>
+                <td>4.0</td>
+                <td>Mandatory</td>
+                <td>Yes</td>
+
                 </tr></tbody></table><h4 id="Cordova">Cordova</h4>
              <table class="api-list"><thead><tr><th>API</th><th>Description</th><th>Version (Since)</th><th>Wearable</th><th>Supported on<br>Wearable Emulator</th></tr>
        </thead><tbody><tr><td><a href="tizen/cordova/console.html">
diff --git a/org.tizen.web.apireference/html/device_api/wearable/tizen/voicecontrol.html b/org.tizen.web.apireference/html/device_api/wearable/tizen/voicecontrol.html
new file mode 100644 (file)
index 0000000..d0341e8
--- /dev/null
@@ -0,0 +1,965 @@
+<!DOCTYPE html PUBLIC "html">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
+<link rel="stylesheet" type="text/css" href="tizen.css" media="screen">
+<script type="text/javascript" src="snippet.js"></script><title>VoiceControl API</title>
+</head>
+<body id="page-content" onload="prettyPrint()">
+<div class="api" id="::VoiceControl">
+<div class="title"><h1>VoiceControl API</h1></div>
+<div class="brief">
+ The Voice Control API provides interfaces and methods for recognizing voice command.
+        </div>
+<div class="description">
+        <p>
+Voice control API offers functionality to recognize the voice and to send the result as predefined command.
+        </p>
+       </div>
+<p><span class="version">
+            Since: </span>
+ 4.0
+        </p>
+<h2>Table of Contents</h2>
+<ul class="toc">
+<li>1. <a href="#typedefs-section">Type Definitions</a><ul class="toc">
+<li>
+                    1.1. <a href="#VoiceControlResultEvent">VoiceControlResultEvent</a>
+</li>
+<li>
+                    1.2. <a href="#VoiceControlCommandType">VoiceControlCommandType</a>
+</li>
+</ul>
+</li>
+<li>2. <a href="#interfaces-section">Interfaces</a><ul class="toc">
+<li>2.1. <a href="#VoiceControlClientManagerObject">VoiceControlClientManagerObject</a>
+</li>
+<li>2.2. <a href="#VoiceControlClientManager">VoiceControlClientManager</a>
+</li>
+<li>2.3. <a href="#VoiceControlClient">VoiceControlClient</a>
+</li>
+<li>2.4. <a href="#VoiceControlCommand">VoiceControlCommand</a>
+</li>
+<li>2.5. <a href="#VoiceControlLanguageChangeCallback">VoiceControlLanguageChangeCallback</a>
+</li>
+<li>2.6. <a href="#VoiceControlResultCallback">VoiceControlResultCallback</a>
+</li>
+</ul>
+</li>
+<li>3. <a href="#api-features">Related Feature</a>
+</li>
+<li>4. <a href="#full-webidl">Full WebIDL</a>
+</li>
+</ul>
+<hr>
+<h2 id="method-summary">Summary of Interfaces and Methods</h2>
+<table class="informaltable">
+<thead><tr>
+<th>Interface</th>
+<th>Method</th>
+</tr></thead>
+<tbody>
+<tr>
+<td><a href="#VoiceControlClientManagerObject">VoiceControlClientManagerObject</a></td>
+<td></td>
+</tr>
+<tr>
+<td><a href="#VoiceControlClientManager">VoiceControlClientManager</a></td>
+<td><div>
+<a href="#VoiceControlClient">VoiceControlClient</a> <a href="#VoiceControlClientManager::getVoiceControlClient">getVoiceControlClient</a> ()</div></td>
+</tr>
+<tr>
+<td><a href="#VoiceControlClient">VoiceControlClient</a></td>
+<td>
+<div>DOMString <a href="#VoiceControlClient::getCurrentLanguage">getCurrentLanguage</a> ()</div>
+<div>void <a href="#VoiceControlClient::setCommandList">setCommandList</a> (<a href="#VoiceControlCommand">VoiceControlCommand</a>[] list, optional <a href="#VoiceControlCommandType">VoiceControlCommandType</a>? type)</div>
+<div>void <a href="#VoiceControlClient::unsetCommandList">unsetCommandList</a> (optional <a href="#VoiceControlCommandType">VoiceControlCommandType</a>? type)</div>
+<div>long <a href="#VoiceControlClient::addResultListener">addResultListener</a> (<a href="#VoiceControlResultCallback">VoiceControlResultCallback</a> listener)</div>
+<div>void <a href="#VoiceControlClient::removeResultListener">removeResultListener</a> (long id)</div>
+<div>long <a href="#VoiceControlClient::addLanguageChangeListener">addLanguageChangeListener</a> (<a href="#VoiceControlLanguageChangeCallback">VoiceControlLanguageChangeCallback</a> listener)</div>
+<div>void <a href="#VoiceControlClient::removeLanguageChangeListener">removeLanguageChangeListener</a> (long id)</div>
+<div>void <a href="#VoiceControlClient::release">release</a> ()</div>
+</td>
+</tr>
+<tr>
+<td><a href="#VoiceControlCommand">VoiceControlCommand</a></td>
+<td></td>
+</tr>
+<tr>
+<td><a href="#VoiceControlLanguageChangeCallback">VoiceControlLanguageChangeCallback</a></td>
+<td><div>void <a href="#VoiceControlLanguageChangeCallback::onlanguagechanged">onlanguagechanged</a> (DOMString previous, DOMString current)</div></td>
+</tr>
+<tr>
+<td><a href="#VoiceControlResultCallback">VoiceControlResultCallback</a></td>
+<td><div>void <a href="#VoiceControlResultCallback::onresult">onresult</a> (<a href="#VoiceControlResultEvent">VoiceControlResultEvent</a> event, <a href="#VoiceControlCommand">VoiceControlCommand</a>[] list, DOMString results)</div></td>
+</tr>
+</tbody>
+</table>
+<div class="typedefs" id="typedefs-section">
+<h2>1. Type Definitions</h2>
+<div class="enum" id="VoiceControlResultEvent">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlResultEvent"></a><h3>1.1. VoiceControlResultEvent</h3>
+<div class="brief">
+ Specifies the result event.
+          </div>
+<pre class="webidl prettyprint">    enum VoiceControlResultEvent {"SUCCESS", "FAILURE"};</pre>
+<p><span class="version">
+            Since: </span>
+ 4.0
+          </p>
+<div class="description">
+          <p>
+The result events defined by this enumeration are:
+          </p>
+          <ul>
+            <li>
+ SUCCESS - Successful result            </li>
+            <li>
+ FAILURE - Rejected result by voice control service            </li>
+          </ul>
+         </div>
+</div>
+<div class="enum" id="VoiceControlCommandType">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlCommandType"></a><h3>1.2. VoiceControlCommandType</h3>
+<div class="brief">
+ Specifies command type.
+          </div>
+<pre class="webidl prettyprint">    enum VoiceControlCommandType {"FOREGROUND"};</pre>
+<p><span class="version">
+            Since: </span>
+ 4.0
+          </p>
+<div class="description">
+          <p>
+The command type defined by this enumeration is:
+          </p>
+          <ul>
+            <li>
+ FOREGROUND - command type used when application is foreground            </li>
+          </ul>
+         </div>
+</div>
+</div>
+<div class="interfaces" id="interfaces-section">
+<h2>2. Interfaces</h2>
+<div class="interface" id="VoiceControlClientManagerObject">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlClientManagerObject"></a><h3>2.1. VoiceControlClientManagerObject</h3>
+<div class="brief">
+ The VoiceControlClientManagerObject interface defines what is instantiated in the <em>Tizen</em> object.
+          </div>
+<pre class="webidl prettyprint">    [NoInterfaceObject] interface VoiceControlClientManagerObject {
+       readonly attribute <a href="#VoiceControlClientManager">VoiceControlClientManager</a> voicecontrol;
+    };</pre>
+<pre class="webidl prettyprint">    <a href="tizen.html#Tizen">Tizen</a> implements <a href="#VoiceControlClientManagerObject">VoiceControlClientManagerObject</a>;</pre>
+<p><span class="version">
+            Since: </span>
+ 4.0
+          </p>
+<div class="description">
+          <p>
+The <em>tizen.voicecontrol</em> object provides access to the functionality of the voice control API.
+          </p>
+         </div>
+</div>
+<div class="interface" id="VoiceControlClientManager">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlClientManager"></a><h3>2.2. VoiceControlClientManager</h3>
+<div class="brief">
+ Voice Control Client Manager
+          </div>
+<pre class="webidl prettyprint">    [NoInterfaceObject] interface VoiceControlClientManager {
+       <a href="#VoiceControlClient">VoiceControlClient</a> getVoiceControlClient() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+    };</pre>
+<p><span class="version">
+            Since: </span>
+ 4.0
+          </p>
+<div class="methods">
+<h4>Methods</h4>
+<dl>
+<dt class="method" id="VoiceControlClientManager::getVoiceControlClient">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlClientManager::getVoiceControlClient"></a><code><b><span class="methodName">getVoiceControlClient</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Requests voice control Client instance.
+            </div>
+<div class="synopsis"><pre class="signature prettyprint"><a href="#VoiceControlClient">VoiceControlClient</a> getVoiceControlClient();
+             </pre></div>
+<p><span class="version">
+            Since: </span>
+ 4.0
+            </p>
+<p><span class="privilegelevel">
+            Privilege level: </span>
+ public
+            </p>
+<p><span class="privilege">
+            Privilege: </span>
+      http://tizen.org/privilege/recorder
+            </p>
+<p><span class="remark"> Remark : </span>
+ This method always returns the static voice control client object. That is, if you call a method
+using one of voice control client objects, it affects other objects.
+            </p>
+<div class="returntype">
+<p><span class="return">Return value:</span></p>
+ VoiceControlClient The object to manage voice control
+              </div>
+<div class="exceptionlist">
+<p><span class="except">Exceptions:</span></p>
+          <ul class="exception"><li>WebAPIException<ul>
+<li class="list"><p>
+ with error type NotSupportedError, if this feature is not supported.
+                </p></li>
+<li class="list"><p>
+ with error type SecurityError, if the application does not have the privilege to call this method.
+                </p></li>
+<li class="list"><p>
+ with error type AbortError, if the operation cannot be finished properly.
+                </p></li>
+</ul>
+</li></ul>
+        </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> /* client1 and client2 refer the same object */
+ var client1 = tizen.voicecontrol.getVoiceControlClient();
+ var client2 = tizen.voicecontrol.getVoiceControlClient();
+ </pre>
+</div>
+</dd>
+</dl>
+</div>
+</div>
+<div class="interface" id="VoiceControlClient">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlClient"></a><h3>2.3. VoiceControlClient</h3>
+<div class="brief">
+ Voice Control Client
+          </div>
+<pre class="webidl prettyprint">    [NoInterfaceObject] interface VoiceControlClient {
+
+       DOMString getCurrentLanguage() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       void setCommandList(<a href="#VoiceControlCommand">VoiceControlCommand</a>[] list, optional <a href="#VoiceControlCommandType">VoiceControlCommandType</a>? type) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       void unsetCommandList(optional <a href="#VoiceControlCommandType">VoiceControlCommandType</a>? type) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       long addResultListener(<a href="#VoiceControlResultCallback">VoiceControlResultCallback</a> listener) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       void removeResultListener(long id) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       long addLanguageChangeListener(<a href="#VoiceControlLanguageChangeCallback">VoiceControlLanguageChangeCallback</a> listener) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       void removeLanguageChangeListener(long id) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       void release() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+    };</pre>
+<p><span class="version">
+            Since: </span>
+ 4.0
+          </p>
+<div class="methods">
+<h4>Methods</h4>
+<dl>
+<dt class="method" id="VoiceControlClient::getCurrentLanguage">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlClient::getCurrentLanguage"></a><code><b><span class="methodName">getCurrentLanguage</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Gets current language.
+            </div>
+<div class="synopsis"><pre class="signature prettyprint">DOMString getCurrentLanguage();
+             </pre></div>
+<p><span class="version">
+            Since: </span>
+ 4.0
+            </p>
+<div class="description">
+            <p>
+A language is specified as an ISO 3166 alpha-2 two letter country-code followed by ISO 639-1 for the two-letter language code.
+For example, "ko_KR" for Korean, "en_US" for American English.
+            </p>
+           </div>
+<div class="exceptionlist">
+<p><span class="except">Exceptions:</span></p>
+          <ul class="exception"><li>WebAPIException<ul>
+<li class="list"><p>
+ with error type NotSupportedError, if this feature is not supported.
+                </p></li>
+<li class="list"><p>
+ with error type AbortError, if the operation cannot be finished properly.
+                </p></li>
+</ul>
+</li></ul>
+        </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var client = tizen.voicecontrol.getVoiceControlClient();
+ var currentLanguage = client.getCurrentLanguage();
+
+ console.log("Current language is: " + currentLanguage);
+ </pre>
+</div>
+<div class="output">
+<span class="title"><p>Output example:</p></span><pre> Current language is: en_US
+ </pre>
+</div>
+</dd>
+<dt class="method" id="VoiceControlClient::setCommandList">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlClient::setCommandList"></a><code><b><span class="methodName">setCommandList</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Sets command list.
+            </div>
+<div class="synopsis"><pre class="signature prettyprint">void setCommandList(<a href="#VoiceControlCommand">VoiceControlCommand</a>[] list, optional <a href="#VoiceControlCommandType">VoiceControlCommandType</a>? type);
+             </pre></div>
+<p><span class="version">
+            Since: </span>
+ 4.0
+            </p>
+<p><span class="privilegelevel">
+            Privilege level: </span>
+ public
+            </p>
+<p><span class="privilege">
+            Privilege: </span>
+      http://tizen.org/privilege/recorder
+            </p>
+<div class="parameters">
+<p><span class="param">Parameters:</span></p>
+<ul>
+          <li class="param">
+<span class="name">list</span>:
+ Command list handle
+                </li>
+          <li class="param">
+<span class="name">type</span><span class="optional"> [optional]</span><span class="optional"> [nullable]</span>:
+ Type of registered commands. The default value is <var>"FOREGROUND"</var>                </li>
+        </ul>
+</div>
+<div class="exceptionlist">
+<p><span class="except">Exceptions:</span></p>
+          <ul class="exception"><li>WebAPIException<ul>
+<li class="list"><p>
+ with error type TypeMismatchError, if the input parameter is not
+compatible with the expected type.
+                </p></li>
+<li class="list"><p>
+ with error type NotSupportedError, if this feature is not supported.
+                </p></li>
+<li class="list"><p>
+ with error type InvalidValuesError, if any of the input
+parameters contain an invalid value.
+                </p></li>
+<li class="list"><p>
+ with error type SecurityError, if the application does not have the privilege to call this method.
+                </p></li>
+<li class="list"><p>
+ with error type AbortError, if the operation cannot be finished properly.
+                </p></li>
+</ul>
+</li></ul>
+        </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var client = tizen.voicecontrol.getVoiceControlClient();
+
+ var commands = [
+            new tizen.VoiceControlCommand("alpha"),
+            new tizen.VoiceControlCommand("bravo"),
+            new tizen.VoiceControlCommand("charlie")];
+ client.setCommandList(commands, "FOREGROUND");
+ </pre>
+</div>
+</dd>
+<dt class="method" id="VoiceControlClient::unsetCommandList">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlClient::unsetCommandList"></a><code><b><span class="methodName">unsetCommandList</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Unsets command list.
+            </div>
+<div class="synopsis"><pre class="signature prettyprint">void unsetCommandList(optional <a href="#VoiceControlCommandType">VoiceControlCommandType</a>? type);
+             </pre></div>
+<p><span class="version">
+            Since: </span>
+ 4.0
+            </p>
+<p><span class="privilegelevel">
+            Privilege level: </span>
+ public
+            </p>
+<p><span class="privilege">
+            Privilege: </span>
+      http://tizen.org/privilege/recorder
+            </p>
+<div class="parameters">
+<p><span class="param">Parameters:</span></p>
+<ul>
+          <li class="param">
+<span class="name">type</span><span class="optional"> [optional]</span><span class="optional"> [nullable]</span>:
+ Type of commands that should be unset. The default value is <var>"FOREGROUND"</var>                </li>
+        </ul>
+</div>
+<div class="exceptionlist">
+<p><span class="except">Exceptions:</span></p>
+          <ul class="exception"><li>WebAPIException<ul>
+<li class="list"><p>
+ with error type TypeMismatchError, if the input parameter is not
+compatible with the expected type.
+                </p></li>
+<li class="list"><p>
+ with error type NotSupportedError, if this feature is not supported.
+                </p></li>
+<li class="list"><p>
+ with error type SecurityError, if the application does not have the privilege to call this method.
+                </p></li>
+<li class="list"><p>
+ with error type AbortError, if the operation cannot be finished properly.
+                </p></li>
+</ul>
+</li></ul>
+        </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var client = tizen.voicecontrol.getVoiceControlClient();
+
+ var commands = [
+            new tizen.VoiceControlCommand("alpha"),
+            new tizen.VoiceControlCommand("bravo"),
+            new tizen.VoiceControlCommand("charlie")];
+ client.setCommandList(commands, "FOREGROUND");
+
+ client.unsetCommandList("FOREGROUND");
+ </pre>
+</div>
+</dd>
+<dt class="method" id="VoiceControlClient::addResultListener">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlClient::addResultListener"></a><code><b><span class="methodName">addResultListener</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Registers a listener for getting recognition result.
+            </div>
+<div class="synopsis"><pre class="signature prettyprint">long addResultListener(<a href="#VoiceControlResultCallback">VoiceControlResultCallback</a> listener);
+             </pre></div>
+<p><span class="version">
+            Since: </span>
+ 4.0
+            </p>
+<div class="parameters">
+<p><span class="param">Parameters:</span></p>
+<ul>
+          <li class="param">
+<span class="name">listener</span>:
+ Callback function to register
+                </li>
+        </ul>
+</div>
+<div class="returntype">
+<p><span class="return">Return value:</span></p>
+ long Identifier used to clear the watch subscription.
+              </div>
+<div class="exceptionlist">
+<p><span class="except">Exceptions:</span></p>
+          <ul class="exception"><li>WebAPIException<ul>
+<li class="list"><p>
+ with error type TypeMismatchError, if the input parameter is not
+compatible with the expected type.
+                </p></li>
+<li class="list"><p>
+ with error type NotSupportedError, if this feature is not supported.
+                </p></li>
+<li class="list"><p>
+ with error type AbortError, if the operation cannot be finished properly.
+                </p></li>
+</ul>
+</li></ul>
+        </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var client = tizen.voicecontrol.getVoiceControlClient();
+
+ var commands = [
+            new tizen.VoiceControlCommand("alpha"),
+            new tizen.VoiceControlCommand("bravo"),
+            new tizen.VoiceControlCommand("charlie")];
+ client.setCommandList(commands, "FOREGROUND");
+
+ var resultListenerCallback = function(event, list, result)
+ {
+   console.log("Result callback - event: " + event + ", result: " + result);
+ }
+
+ var id = client.addResultListener(resultListenerCallback);
+ console.log("Result listener[" + id + "] is created");
+ </pre>
+</div>
+<div class="output">
+<span class="title"><p>Output example:</p></span><pre> Result listener[1] is created
+ </pre>
+</div>
+<div class="output">
+<span class="title"><p>Output example:</p></span><pre> /* (When a user says "alpha") */
+ Result callback - event: SUCCESS, result: alpha
+ </pre>
+</div>
+</dd>
+<dt class="method" id="VoiceControlClient::removeResultListener">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlClient::removeResultListener"></a><code><b><span class="methodName">removeResultListener</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Unregisters the listener.
+            </div>
+<div class="synopsis"><pre class="signature prettyprint">void removeResultListener(long id);
+             </pre></div>
+<p><span class="version">
+            Since: </span>
+ 4.0
+            </p>
+<div class="parameters">
+<p><span class="param">Parameters:</span></p>
+<ul>
+          <li class="param">
+<span class="name">id</span>:
+ Identifier used to clear the watch subscription
+                </li>
+        </ul>
+</div>
+<div class="exceptionlist">
+<p><span class="except">Exceptions:</span></p>
+          <ul class="exception"><li>WebAPIException<ul>
+<li class="list"><p>
+ with error type NotSupportedError, if this feature is not supported.
+                </p></li>
+<li class="list"><p>
+ with error type AbortError, if the operation cannot be finished properly.
+                </p></li>
+</ul>
+</li></ul>
+        </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var client = tizen.voicecontrol.getVoiceControlClient();
+
+ var commands = [
+            new tizen.VoiceControlCommand("alpha"),
+            new tizen.VoiceControlCommand("bravo"),
+            new tizen.VoiceControlCommand("charlie")];
+ client.setCommandList(commands, "FOREGROUND");
+
+ var resultListenerCallback = function(event, list, result)
+ {
+   console.log("Result callback - event: " + event + ", result: " + result);
+ }
+
+ var id = client.addResultListener(resultListenerCallback);
+
+ client.removeResultListener(id);
+ </pre>
+</div>
+</dd>
+<dt class="method" id="VoiceControlClient::addLanguageChangeListener">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlClient::addLanguageChangeListener"></a><code><b><span class="methodName">addLanguageChangeListener</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Registers a callback function to be called when current language is changed.
+            </div>
+<div class="synopsis"><pre class="signature prettyprint">long addLanguageChangeListener(<a href="#VoiceControlLanguageChangeCallback">VoiceControlLanguageChangeCallback</a> listener);
+             </pre></div>
+<p><span class="version">
+            Since: </span>
+ 4.0
+            </p>
+<div class="parameters">
+<p><span class="param">Parameters:</span></p>
+<ul>
+          <li class="param">
+<span class="name">listener</span>:
+ Callback function to register
+                </li>
+        </ul>
+</div>
+<div class="returntype">
+<p><span class="return">Return value:</span></p>
+ long Identifier used to clear the watch subscription.
+              </div>
+<div class="exceptionlist">
+<p><span class="except">Exceptions:</span></p>
+          <ul class="exception"><li>WebAPIException<ul>
+<li class="list"><p>
+ with error type TypeMismatchError, if the input parameter is not
+compatible with the expected type.
+                </p></li>
+<li class="list"><p>
+ with error type NotSupportedError, if this feature is not supported.
+                </p></li>
+<li class="list"><p>
+ with error type AbortError, if the operation cannot be finished properly.
+                </p></li>
+</ul>
+</li></ul>
+        </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var client = tizen.voicecontrol.getVoiceControlClient();
+
+ var languageChangeListenerCallback = function(previous, current)
+ {
+   console.log("Language change callback " + previous + "-&gt;" + current);
+ }
+
+ var id = client.addLanguageChangeListener(languageChangeListenerCallback);
+ console.log("Language change listener[" + id + "] is created");
+ </pre>
+</div>
+<div class="output">
+<span class="title"><p>Output example:</p></span><pre> Language change listener[1] is created
+ </pre>
+</div>
+<div class="output">
+<span class="title"><p>Output example:</p></span><pre> /* (When language is changed) */
+ Language change callback en_US-&gt;ko_KR
+ </pre>
+</div>
+</dd>
+<dt class="method" id="VoiceControlClient::removeLanguageChangeListener">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlClient::removeLanguageChangeListener"></a><code><b><span class="methodName">removeLanguageChangeListener</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Unregisters the callback function.
+            </div>
+<div class="synopsis"><pre class="signature prettyprint">void removeLanguageChangeListener(long id);
+             </pre></div>
+<p><span class="version">
+            Since: </span>
+ 4.0
+            </p>
+<div class="parameters">
+<p><span class="param">Parameters:</span></p>
+<ul>
+          <li class="param">
+<span class="name">id</span>:
+ Identifier used to clear the watch subscription
+                </li>
+        </ul>
+</div>
+<div class="exceptionlist">
+<p><span class="except">Exceptions:</span></p>
+          <ul class="exception"><li>WebAPIException<ul>
+<li class="list"><p>
+ with error type NotSupportedError, if this feature is not supported.
+                </p></li>
+<li class="list"><p>
+ with error type AbortError, if the operation cannot be finished properly.
+                </p></li>
+</ul>
+</li></ul>
+        </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> var client = tizen.voicecontrol.getVoiceControlClient();
+
+ var languageChangeListenerCallback = function(previous, current)
+ {
+   console.log("Language change callback " + previous + "-&gt;" + current);;
+ }
+
+ var id = client.addLanguageChangeListener(languageChangeListenerCallback);
+
+ client.removeLanguageChangeListener(id);
+ </pre>
+</div>
+</dd>
+<dt class="method" id="VoiceControlClient::release">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlClient::release"></a><code><b><span class="methodName">release</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Releases all resources.
+            </div>
+<div class="synopsis"><pre class="signature prettyprint">void release();
+             </pre></div>
+<p><span class="version">
+            Since: </span>
+ 4.0
+            </p>
+<div class="description">
+            <p>
+Releases listeners and disconnects voice control service.
+You should call this method when you do not want to use voice control client instance any more.
+It is necessary to create new voice control client instance, if you want to use more after release.
+            </p>
+           </div>
+<p><span class="remark"> Remark : </span>
+ If you call this method, all other VoiceControlClient objects are also released.
+            </p>
+<div class="exceptionlist">
+<p><span class="except">Exceptions:</span></p>
+          <ul class="exception"><li>WebAPIException<ul><li class="list"><p>
+ with error type AbortError, if the operation cannot be finished properly.
+                </p></li></ul>
+</li></ul>
+        </div>
+<div class="example">
+<span class="example"><p>Code example:</p></span><pre name="code" class="examplecode prettyprint"> /* Initialize the voice control client */
+ var client = tizen.voicecontrol.getVoiceControlClient();
+
+ var commands = [
+            new tizen.VoiceControlCommand("alpha"),
+            new tizen.VoiceControlCommand("bravo"),
+            new tizen.VoiceControlCommand("charlie")];
+ client.setCommandList(commands, "FOREGROUND");
+
+ var resultListenerCallback = function(event, list, result)
+ {
+   console.log("Result callback - event: " + event + ", result: " + result);
+ }
+
+ var id = client.addResultListener(resultListenerCallback);
+
+ /* Deinitialize the voice control client */
+ client.removeResultListener(id);
+ client.unsetCommandList("FOREGROUND");
+
+ /* After release() voice control does not work */
+ /* If you want to use voice control after release(), you should initialize the client again */
+ client.release();
+ </pre>
+</div>
+</dd>
+</dl>
+</div>
+</div>
+<div class="interface" id="VoiceControlCommand">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlCommand"></a><h3>2.4. VoiceControlCommand</h3>
+<div class="brief">
+ The VoiceControlCommand defines interface used to create command you want to be recognized.
+          </div>
+<pre class="webidl prettyprint">    [Constructor(DOMString command, optional <a href="#VoiceControlCommandType">VoiceControlCommandType</a>? type)]
+    interface VoiceControlCommand {
+
+       attribute DOMString command;
+
+       attribute <a href="#VoiceControlCommandType">VoiceControlCommandType</a> type;
+    };</pre>
+<div class="constructors">
+<h4 id="VoiceControlCommand::constructor">Constructors</h4>
+<dl>
+<div class="brief">
+ Command constructor
+              </div>
+<pre class="webidl prettyprint">VoiceControlCommand(DOMString command, optional <a href="#VoiceControlCommandType">VoiceControlCommandType</a>? type);</pre>
+</dl>
+</div>
+<div class="attributes">
+<h4>Attributes</h4>
+<ul>
+<li class="attribute" id="VoiceControlCommand::command">
+<span class="attrName"><span class="type">DOMString </span><span class="name">command</span></span><div class="brief">
+ The command text
+            </div>
+<div class="description">
+            <p>
+The command should be set as text you want to be recognized.
+            </p>
+           </div>
+</li>
+<li class="attribute" id="VoiceControlCommand::type">
+<span class="attrName"><span class="type">VoiceControlCommandType </span><span class="name">type</span></span><div class="brief">
+ The type of the command processing
+            </div>
+<div class="description">
+            <p>
+The default value is <var>"FOREGROUND"</var>            </p>
+           </div>
+</li>
+</ul>
+</div>
+</div>
+<div class="interface" id="VoiceControlLanguageChangeCallback">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlLanguageChangeCallback"></a><h3>2.5. VoiceControlLanguageChangeCallback</h3>
+<div class="brief">
+ Called when default language is changed.
+          </div>
+<pre class="webidl prettyprint">    [Callback=FunctionOnly, NoInterfaceObject] interface VoiceControlLanguageChangeCallback {
+       void onlanguagechanged (DOMString previous, DOMString current);
+    };</pre>
+<p><span class="version">
+            Since: </span>
+ 4.0
+          </p>
+<div class="methods">
+<h4>Methods</h4>
+<dl>
+<dt class="method" id="VoiceControlLanguageChangeCallback::onlanguagechanged">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlLanguageChangeCallback::onlanguagechanged"></a><code><b><span class="methodName">onlanguagechanged</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Called when default language is changed.
+            </div>
+<div class="synopsis"><pre class="signature prettyprint">void onlanguagechanged(DOMString previous, DOMString current);
+             </pre></div>
+<p><span class="version">
+            Since: </span>
+ 4.0
+            </p>
+<div class="parameters">
+<p><span class="param">Parameters:</span></p>
+<ul>
+          <li class="param">
+<span class="name">previous</span>:
+ Previous language
+                </li>
+          <li class="param">
+<span class="name">current</span>:
+ Current language
+                </li>
+        </ul>
+</div>
+</dd>
+</dl>
+</div>
+</div>
+<div class="interface" id="VoiceControlResultCallback">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlResultCallback"></a><h3>2.6. VoiceControlResultCallback</h3>
+<div class="brief">
+ Called when client gets the recognition result.
+          </div>
+<pre class="webidl prettyprint">    [Callback=FunctionOnly, NoInterfaceObject] interface VoiceControlResultCallback {
+       void onresult(<a href="#VoiceControlResultEvent">VoiceControlResultEvent</a> event, <a href="#VoiceControlCommand">VoiceControlCommand</a>[] list, DOMString results);
+    };</pre>
+<p><span class="version">
+            Since: </span>
+ 4.0
+          </p>
+<div class="methods">
+<h4>Methods</h4>
+<dl>
+<dt class="method" id="VoiceControlResultCallback::onresult">
+<a class="backward-compatibility-anchor" name="::VoiceControl::VoiceControlResultCallback::onresult"></a><code><b><span class="methodName">onresult</span></b></code>
+</dt>
+<dd>
+<div class="brief">
+ Called when client gets the recognition result.
+            </div>
+<div class="synopsis"><pre class="signature prettyprint">void onresult(<a href="#VoiceControlResultEvent">VoiceControlResultEvent</a> event, <a href="#VoiceControlCommand">VoiceControlCommand</a>[] list, DOMString results);
+             </pre></div>
+<p><span class="version">
+            Since: </span>
+ 4.0
+            </p>
+<div class="parameters">
+<p><span class="param">Parameters:</span></p>
+<ul>
+          <li class="param">
+<span class="name">event</span>:
+ The result event
+                </li>
+          <li class="param">
+<span class="name">list</span>:
+ The recognized command list
+                </li>
+          <li class="param">
+<span class="name">results</span>:
+ The spoken text (e.g. registered command text like "play", "stop", etc.)
+                </li>
+        </ul>
+</div>
+</dd>
+</dl>
+</div>
+</div>
+</div>
+<h2 id="api-features">3. Related Feature</h2>
+<div id="def-api-features" class="def-api-features">
+        You can check if this API is supported with <em>tizen.systeminfo.getCapability()</em> and decide enable/disable codes that need this API.
+                    <div class="def-api-feature">
+<p><div class="description">
+            <p>
+To guarantee that the voice control application runs on a device with speech control feature, declare the following feature requirements in the config file:
+            </p>
+           </div></p>
+<li class="feature">http://tizen.org/feature/speech.control</li>
+</div>
+<div class="def-api-feature">
+<p><div class="description">
+            <p>
+To guarantee that the voice control application runs on a device with microphone feature, declare the following feature requirements in the config file:
+            </p>
+           </div></p>
+<li class="feature">http://tizen.org/feature/microphone</li>
+</div>
+<p></p>
+                    For more information, see <a href="https://developer.tizen.org/development/getting-started/web-application/understanding-tizen-programming/application-filtering">Application Filtering.</a>
+</div>
+<h2 id="full-webidl">4. Full WebIDL</h2>
+<pre class="webidl prettyprint">module VoiceControl {
+    enum VoiceControlResultEvent {"SUCCESS", "FAILURE"};
+
+    enum VoiceControlCommandType {"FOREGROUND"};
+
+    [NoInterfaceObject] interface VoiceControlClientManagerObject {
+       readonly attribute <a href="#VoiceControlClientManager">VoiceControlClientManager</a> voicecontrol;
+    };
+
+    <a href="tizen.html#Tizen">Tizen</a> implements <a href="#VoiceControlClientManagerObject">VoiceControlClientManagerObject</a>;
+
+    [NoInterfaceObject] interface VoiceControlClientManager {
+       <a href="#VoiceControlClient">VoiceControlClient</a> getVoiceControlClient() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+    };
+
+    [NoInterfaceObject] interface VoiceControlClient {
+
+       DOMString getCurrentLanguage() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       void setCommandList(<a href="#VoiceControlCommand">VoiceControlCommand</a>[] list, optional <a href="#VoiceControlCommandType">VoiceControlCommandType</a>? type) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       void unsetCommandList(optional <a href="#VoiceControlCommandType">VoiceControlCommandType</a>? type) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       long addResultListener(<a href="#VoiceControlResultCallback">VoiceControlResultCallback</a> listener) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       void removeResultListener(long id) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       long addLanguageChangeListener(<a href="#VoiceControlLanguageChangeCallback">VoiceControlLanguageChangeCallback</a> listener) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       void removeLanguageChangeListener(long id) raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+
+       void release() raises(<a href="tizen.html#WebAPIException">WebAPIException</a>);
+    };
+
+    [Constructor(DOMString command, optional <a href="#VoiceControlCommandType">VoiceControlCommandType</a>? type)]
+    interface VoiceControlCommand {
+
+       attribute DOMString command;
+
+       attribute <a href="#VoiceControlCommandType">VoiceControlCommandType</a> type;
+    };
+
+    [Callback=FunctionOnly, NoInterfaceObject] interface VoiceControlLanguageChangeCallback {
+       void onlanguagechanged (DOMString previous, DOMString current);
+    };
+
+    [Callback=FunctionOnly, NoInterfaceObject] interface VoiceControlResultCallback {
+       void onresult(<a href="#VoiceControlResultEvent">VoiceControlResultEvent</a> event, <a href="#VoiceControlCommand">VoiceControlCommand</a>[] list, DOMString results);
+    };
+};</pre>
+</div>
+<div id="page-footer">
+<div class="copyright" align="center">
+         Except as noted, this content - excluding the Code Examples - is licensed under <a href="http://creativecommons.org/licenses/by/3.0/legalcode" target="_blank">Creative Commons Attribution 3.0</a> and all of the Code Examples contained herein are licensed under <a href="https://www.tizen.org/bsd-3-clause-license" target="_blank">BSD-3-Clause</a>. <br>For details, see the <a href="https://www.tizen.org/content-license" target="_blank">Content License</a>.
+            </div>
+<script type="text/javascript">
+
+              var _gaq = _gaq || [];
+              _gaq.push(['_setAccount', 'UA-25976949-1']);
+              _gaq.push(['_setDomainName', 'tizen.org']);
+              _gaq.push(['_trackPageview']);
+
+              (function() {
+                var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
+                ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
+                var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
+              })();
+
+            </script>
+</div>
+</body>
+</html>
index ea99dc2..630e44a 100644 (file)
                                                                <li><a href="device_api/mobile/tizen/websetting.html">Web Setting</a></li>
                                                        </ul>
                                                </li>
+                                               <li><a href="device_api/mobile/index.html#UIX">UIX</a>
+                                                       <ul>
+                                                               <li><a href="device_api/mobile/tizen/voicecontrol.html">Voice Control</a></li>
+                                                       </ul>
+                                               </li>
                                                <li><a href="device_api/mobile/index.html#Cordova">Cordova</a>
                                                        <ul>
                                                                <li><a href="device_api/mobile/tizen/cordova/console.html">Console</a></li>
                                                                <li><a href="device_api/wearable/tizen/time.html">Time</a></li>
                                                        </ul>
                                                </li>
+                                               <li><a href="device_api/wearable/index.html#UIX">UIX</a>
+                                                       <ul>
+                                                               <li><a href="device_api/wearable/tizen/voicecontrol.html">Voice Control</a></li>
+                                                       </ul>
+                                               </li>
                                                <li><a href="device_api/wearable/index.html#Cordova">Cordova</a>
                                                        <ul>
                                                                <li><a href="device_api/wearable/tizen/cordova/console.html">Console</a></li>
                                                                <li><a href="device_api/tv/tizen/tvinfo.html">TV Information</a></li>
                                                        </ul>
                                                </li>
+                                               <li><a href="device_api/tv/index.html#UIX">UIX</a>
+                                                       <ul>
+                                                               <li><a href="device_api/tv/tizen/voicecontrol.html">Voice Control</a></li>
+                                                       </ul>
+                                               </li>
                                                <li><a href="device_api/tv/index.html#Cordova">Cordova</a>
                                                        <ul>
                                                                <li><a href="device_api/tv/tizen/cordova/console.html">Console</a></li>
index 10bbb2d..f2e3e4a 100644 (file)
                                        <topic href="html/device_api/mobile/tizen/websetting.html" label="Web Setting" ></topic>
                                </topic>
 
+                               <topic href="html/device_api/mobile/index.html#UIX" label="UIX">
+                                       <topic href="html/device_api/mobile/tizen/voicecontrol.html" label="Voice Control" ></topic>
+                               </topic>
+
                                <topic href="html/device_api/mobile/index.html#Cordova" label="Cordova">
                                        <topic href="html/device_api/mobile/tizen/cordova/console.html" label="Console" ></topic>
                                        <topic href="html/device_api/mobile/tizen/cordova/cordova.html" label="Cordova" ></topic>
                                        <topic href="html/device_api/wearable/tizen/time.html" label="Time" ></topic>
                                </topic>
 
+                               <topic href="html/device_api/wearable/index.html#UIX" label="UIX">
+                                       <topic href="html/device_api/wearable/tizen/voicecontrol.html" label="Voice Control" ></topic>
+                               </topic>
+
                                <topic href="html/device_api/wearable/index.html#Cordova" label="Cordova">
                                        <topic href="html/device_api/wearable/tizen/cordova/console.html" label="Console" ></topic>
                                        <topic href="html/device_api/wearable/tizen/cordova/cordova.html" label="Cordova" ></topic>
                                        <topic href="html/device_api/tv/tizen/tvwindow.html" label="TV Window" ></topic>
                                        <topic href="html/device_api/tv/tizen/tvinfo.html" label="TV Information" ></topic>
                                </topic>
+                               <topic href="html/device_api/tv/index.html#UIX" label="UIX">
+                                       <topic href="html/device_api/tv/tizen/voicecontrol.html" label="Voice Control" ></topic>
+                               </topic>
                                <topic href="html/device_api/tv/index.html#Cordova" label="Cordova">
                                        <topic href="html/device_api/tv/tizen/cordova/console.html" label="Console" ></topic>
                                        <topic href="html/device_api/tv/tizen/cordova/cordova.html" label="Cordova" ></topic>