Merge remote-tracking branch 'uix-stt/tizen'
authorWonYoung Choi <wy80.choi@samsung.com>
Thu, 10 Aug 2017 02:11:16 +0000 (11:11 +0900)
committerWonYoung Choi <wy80.choi@samsung.com>
Thu, 10 Aug 2017 02:11:16 +0000 (11:11 +0900)
Change-Id: Ia70cda991b74f5ed5ad2506b62be1794f7e8ac44

13 files changed:
src/Tizen.Uix.Stt/Interop/Interop.Libraries.cs [new file with mode: 0755]
src/Tizen.Uix.Stt/Interop/Interop.Stt.cs [new file with mode: 0755]
src/Tizen.Uix.Stt/Tizen.Uix.Stt.csproj [new file with mode: 0644]
src/Tizen.Uix.Stt/Tizen.Uix.Stt.snk [new file with mode: 0755]
src/Tizen.Uix.Stt/Tizen.Uix.Stt/DefaultLanguageChangedEventArgs.cs [new file with mode: 0755]
src/Tizen.Uix.Stt/Tizen.Uix.Stt/EngineChangedEventArgs.cs [new file with mode: 0755]
src/Tizen.Uix.Stt/Tizen.Uix.Stt/ErrorOccurredEventArgs.cs [new file with mode: 0755]
src/Tizen.Uix.Stt/Tizen.Uix.Stt/ExceptionFactory.cs [new file with mode: 0755]
src/Tizen.Uix.Stt/Tizen.Uix.Stt/RecognitionResultEventArgs.cs [new file with mode: 0755]
src/Tizen.Uix.Stt/Tizen.Uix.Stt/ResultTime.cs [new file with mode: 0755]
src/Tizen.Uix.Stt/Tizen.Uix.Stt/StateChangedEventArgs.cs [new file with mode: 0755]
src/Tizen.Uix.Stt/Tizen.Uix.Stt/SttClient.cs [new file with mode: 0644]
src/Tizen.Uix.Stt/Tizen.Uix.Stt/SupportedEngine.cs [new file with mode: 0755]

diff --git a/src/Tizen.Uix.Stt/Interop/Interop.Libraries.cs b/src/Tizen.Uix.Stt/Interop/Interop.Libraries.cs
new file mode 100755 (executable)
index 0000000..52501fb
--- /dev/null
@@ -0,0 +1,30 @@
+/*
+* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* Licensed under the Apache License, Version 2.0 (the License);
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an AS IS BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+
+/// <summary>
+/// Partial Interop Class
+/// </summary>
+internal static partial class Interop
+{
+    /// <summary>
+    /// Partial Libraries Class
+    /// </summary>
+    internal static partial class Libraries
+    {
+        public const string Stt = "libstt.so";
+    }
+}
diff --git a/src/Tizen.Uix.Stt/Interop/Interop.Stt.cs b/src/Tizen.Uix.Stt/Interop/Interop.Stt.cs
new file mode 100755 (executable)
index 0000000..cbf6f0d
--- /dev/null
@@ -0,0 +1,188 @@
+/*
+* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* Licensed under the Apache License, Version 2.0 (the License);
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an AS IS BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+
+using System;
+using System.Runtime.InteropServices;
+
+/// <summary>
+/// Partial Interop Class
+/// </summary>
+internal static partial class Interop
+{
+    /// <summary>
+    /// Stt Interop Class
+    /// </summary>
+    internal static class Stt
+    {
+        internal static string LogTag = "Tizen.Uix.Stt";
+
+        private const int ErrorStt = -0x02F00000;
+
+        internal enum SttError
+        {
+            None = Tizen.Internals.Errors.ErrorCode.None,                           /**< Successful */
+            OutOfMemory = Tizen.Internals.Errors.ErrorCode.OutOfMemory,             /**< Out of Memory */
+            IoError = Tizen.Internals.Errors.ErrorCode.IoError,                     /**< I/O error */
+            InvalidParameter = Tizen.Internals.Errors.ErrorCode.InvalidParameter,   /**< Invalid parameter */
+            TimedOut = Tizen.Internals.Errors.ErrorCode.TimedOut,                   /**< No answer from the STT service */
+            RecorderBusy = Tizen.Internals.Errors.ErrorCode.ResourceBusy,           /**< Device or resource busy */
+            OutOfNetwork = Tizen.Internals.Errors.ErrorCode.Networkdown,            /**< Network is down */
+            PermissionDenied = Tizen.Internals.Errors.ErrorCode.PermissionDenied,   /**< Permission denied */
+            NotSupported = Tizen.Internals.Errors.ErrorCode.NotSupported,           /**< STT NOT supported */
+            InvalidState = ErrorStt | 0x01,                                         /**< Invalid state */
+            InvalidLanguage = ErrorStt | 0x02,                                      /**< Invalid language */
+            EngineNotFound = ErrorStt | 0x03,                                       /**< No available engine  */
+            OperationFailed = ErrorStt | 0x04,                                      /**< Operation failed  */
+            NotSupportedFeature = ErrorStt | 0x05,                                  /**< Not supported feature of current engine */
+            RecordingTimedOut = ErrorStt | 0x06,                                    /**< Recording timed out */
+            NoSpeech = ErrorStt | 0x07,                                             /**< No speech while recording*/
+            InProgressToReady = ErrorStt | 0x08,                                    /**< Progress to ready is not finished*/
+            InProgressToRecording = ErrorStt | 0x09,                                /**< Progress to recording is not finished*/
+            InProgressToProcessing = ErrorStt | 0x10,                               /**< Progress to processing is not finished*/
+            ServiceReset = ErrorStt | 0x11                                          /**< Service reset*/
+        };
+
+        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+        internal delegate bool SupportedEngineCallback(IntPtr handle, IntPtr engineId, IntPtr engineName, IntPtr userData);
+
+        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+        internal delegate void RecognitionResultCallback(IntPtr handle, Tizen.Uix.Stt.ResultEvent e, IntPtr data, int dataCount, IntPtr msg, IntPtr userData);
+
+        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+        internal delegate bool ResultTimeCallback(IntPtr handle, int index, Tizen.Uix.Stt.TimeEvent e, IntPtr text, IntPtr startTime, IntPtr endTime, IntPtr userData);
+
+        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+        internal delegate void StateChangedCallback(IntPtr handle, Tizen.Uix.Stt.State previous, Tizen.Uix.Stt.State current, IntPtr userData);
+
+        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+        internal delegate void ErrorCallback(IntPtr handle, SttError reason, IntPtr userData);
+
+        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+        internal delegate bool SupportedLanguageCallback(IntPtr handle, IntPtr language, IntPtr userData);
+
+        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+        internal delegate void DefaultLanguageChangedCallback(IntPtr handle, IntPtr previousLanguage, IntPtr currentLanguage, IntPtr userData);
+
+        [UnmanagedFunctionPointer(CallingConvention.Cdecl)]
+        internal delegate void EngineChangedCallback(IntPtr handle, IntPtr engineId, IntPtr language, bool supportSilence, bool needCredential, IntPtr userData);
+
+        [DllImport(Libraries.Stt, EntryPoint = "stt_create", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern SttError SttCreate(out IntPtr handle);
+
+        [DllImport(Libraries.Stt, EntryPoint = "stt_destroy", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern SttError SttDestroy(IntPtr handle);
+
+        [DllImport(Libraries.Stt, EntryPoint = "stt_foreach_supported_engines", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern SttError SttForeEachSupportedEngines(IntPtr handle, SupportedEngineCallback callback, IntPtr userData);
+
+        [DllImport(Libraries.Stt, EntryPoint = "stt_get_engine", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern SttError SttGetEngine(IntPtr handle, out string engineId);
+
+        [DllImport(Libraries.Stt, EntryPoint = "stt_set_engine", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern SttError SttSetEngine(IntPtr handle, string engineId);
+
+        [DllImport(Libraries.Stt, EntryPoint = "stt_set_credential", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern SttError SttSetcredential(IntPtr handle, string credential);
+
+        [DllImport(Libraries.Stt, EntryPoint = "stt_set_private_data", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern SttError SttSetPrivateData(IntPtr handle, string key, string data);
+
+        [DllImport(Libraries.Stt, EntryPoint = "stt_get_private_data", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern SttError SttGetPrivateData(IntPtr handle, string key, out string data);
+
+        [DllImport(Libraries.Stt, EntryPoint = "stt_prepare", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern SttError SttPrepare(IntPtr handle);
+
+        [DllImport(Libraries.Stt, EntryPoint = "stt_unprepare", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern SttError SttUnprepare(IntPtr handle);
+
+        [DllImport(Libraries.Stt, EntryPoint = "stt_foreach_supported_languages", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern SttError SttForeachSupportedLanguages(IntPtr handle, SupportedLanguageCallback callback, IntPtr userData);
+
+        [DllImport(Libraries.Stt, EntryPoint = "stt_get_default_language", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern SttError SttGetDefaultLanguage(IntPtr handle, out string language);
+
+        [DllImport(Libraries.Stt, EntryPoint = "stt_get_state", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern SttError SttGetState(IntPtr handle, out Tizen.Uix.Stt.State state);
+
+        [DllImport(Libraries.Stt, EntryPoint = "stt_get_error_message", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern SttError SttGetErrorMessage(IntPtr handle, out string err_msg);
+
+        [DllImport(Libraries.Stt, EntryPoint = "stt_is_recognition_type_supported", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern SttError SttIsRecognitionTypeSupported(IntPtr handle, string type, out bool support);
+
+        [DllImport(Libraries.Stt, EntryPoint = "stt_set_silence_detection", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern SttError SttSetSilenceDetection(IntPtr handle, Tizen.Uix.Stt.SilenceDetection type);
+
+        [DllImport(Libraries.Stt, EntryPoint = "stt_set_start_sound", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern SttError SttSetStartSound(IntPtr handle, string filename);
+
+        [DllImport(Libraries.Stt, EntryPoint = "stt_unset_start_sound", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern SttError SttUnsetStartSound(IntPtr handle);
+
+        [DllImport(Libraries.Stt, EntryPoint = "stt_set_stop_sound", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern SttError SttSetStopSound(IntPtr handle, string filename);
+
+        [DllImport(Libraries.Stt, EntryPoint = "stt_unset_stop_sound", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern SttError SttUnsetStopSound(IntPtr handle);
+
+        [DllImport(Libraries.Stt, EntryPoint = "stt_start", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern SttError SttStart(IntPtr handle, string language, string type);
+
+        [DllImport(Libraries.Stt, EntryPoint = "stt_stop", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern SttError SttStop(IntPtr handle);
+
+        [DllImport(Libraries.Stt, EntryPoint = "stt_cancel", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern SttError SttCancel(IntPtr handle);
+
+        [DllImport(Libraries.Stt, EntryPoint = "stt_get_recording_volume", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern SttError SttGetRecordingVolume(IntPtr handle, out float volume);
+
+        [DllImport(Libraries.Stt, EntryPoint = "stt_foreach_detailed_result", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern SttError SttForeachDetailedResult(IntPtr handle, ResultTimeCallback callback, IntPtr userData);
+
+        [DllImport(Libraries.Stt, EntryPoint = "stt_set_recognition_result_cb", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern SttError SttSetRecognitionResultCB(IntPtr handle, RecognitionResultCallback callback, IntPtr userData);
+
+        [DllImport(Libraries.Stt, EntryPoint = "stt_unset_recognition_result_cb", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern SttError SttUnsetRecognitionResultCB(IntPtr handle);
+
+        [DllImport(Libraries.Stt, EntryPoint = "stt_set_state_changed_cb", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern SttError SttSetStateChangedCB(IntPtr handle, StateChangedCallback callback, IntPtr userData);
+
+        [DllImport(Libraries.Stt, EntryPoint = "stt_unset_state_changed_cb", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern SttError SttUnsetStateChangedCB(IntPtr handle);
+
+        [DllImport(Libraries.Stt, EntryPoint = "stt_set_error_cb", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern SttError SttSetErrorCB(IntPtr handle, ErrorCallback callback, IntPtr userData);
+
+        [DllImport(Libraries.Stt, EntryPoint = "stt_unset_error_cb", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern SttError SttUnsetErrorCB(IntPtr handle);
+
+        [DllImport(Libraries.Stt, EntryPoint = "stt_set_default_language_changed_cb", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern SttError SttSetDefaultLanguageChangedCB(IntPtr handle, DefaultLanguageChangedCallback callback, IntPtr userData);
+
+        [DllImport(Libraries.Stt, EntryPoint = "stt_unset_default_language_changed_cb", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern SttError SttUnsetDefaultLanguageChangedCB(IntPtr handle);
+
+        [DllImport(Libraries.Stt, EntryPoint = "stt_set_engine_changed_cb", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern SttError SttSetEngineChangedCB(IntPtr handle, EngineChangedCallback callback, IntPtr userData);
+
+        [DllImport(Libraries.Stt, EntryPoint = "stt_unset_engine_changed_cb", CallingConvention = CallingConvention.Cdecl)]
+        internal static extern SttError SttUnsetEngineChangedCB(IntPtr handle);
+    }
+}
\ No newline at end of file
diff --git a/src/Tizen.Uix.Stt/Tizen.Uix.Stt.csproj b/src/Tizen.Uix.Stt/Tizen.Uix.Stt.csproj
new file mode 100644 (file)
index 0000000..8ce6d50
--- /dev/null
@@ -0,0 +1,25 @@
+<Project Sdk="Microsoft.NET.Sdk">
+
+  <PropertyGroup>
+    <Version>1.0.3</Version>
+    <Authors>Samsung Electronics</Authors>
+    <Copyright>© Samsung Electronics Co., Ltd All Rights Reserved</Copyright>
+    <Description>STT Uix API for Tizen .NET</Description>
+    <PackageProjectUrl>https://www.tizen.org/</PackageProjectUrl>
+    <PackageLicenseUrl>https://www.apache.org/licenses/LICENSE-2.0</PackageLicenseUrl>
+    <PackageIconUrl>https://developer.tizen.org/sites/default/files/images/tizen-pinwheel-on-light-rgb_64_64.png</PackageIconUrl>
+  </PropertyGroup>
+
+  <PropertyGroup>
+    <TargetFramework>netstandard1.3</TargetFramework>
+    <AllowUnsafeBlocks>True</AllowUnsafeBlocks>
+    <SignAssembly>True</SignAssembly>
+    <AssemblyOriginatorKeyFile>Tizen.Uix.Stt.snk</AssemblyOriginatorKeyFile>
+    <PublicSign Condition="'$(OS)' != 'Windows_NT'">true</PublicSign>
+  </PropertyGroup>
+
+  <ItemGroup>
+    <PackageReference Include="Tizen" Version="1.0.5" />
+  </ItemGroup>
+
+</Project>
diff --git a/src/Tizen.Uix.Stt/Tizen.Uix.Stt.snk b/src/Tizen.Uix.Stt/Tizen.Uix.Stt.snk
new file mode 100755 (executable)
index 0000000..e8bc1df
Binary files /dev/null and b/src/Tizen.Uix.Stt/Tizen.Uix.Stt.snk differ
diff --git a/src/Tizen.Uix.Stt/Tizen.Uix.Stt/DefaultLanguageChangedEventArgs.cs b/src/Tizen.Uix.Stt/Tizen.Uix.Stt/DefaultLanguageChangedEventArgs.cs
new file mode 100755 (executable)
index 0000000..7031f5d
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* Licensed under the Apache License, Version 2.0 (the License);
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an AS IS BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+
+
+namespace Tizen.Uix.Stt
+{
+    /// <summary>
+    /// This class holds information about the DefaultLanguageChanged Event
+    /// </summary>
+    /// <since_tizen> 3 </since_tizen>
+    public class DefaultLanguageChangedEventArgs
+    {
+        internal DefaultLanguageChangedEventArgs(string previous, string current)
+        {
+            PreviousLanguage = previous;
+            CurrentLanguage = current;
+        }
+
+        /// <summary>
+        /// The previous language
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        public string PreviousLanguage
+        {
+            get;
+            internal set;
+        }
+
+        /// <summary>
+        /// The current language
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        public string CurrentLanguage
+        {
+            get;
+            internal set;
+        }
+    }
+}
diff --git a/src/Tizen.Uix.Stt/Tizen.Uix.Stt/EngineChangedEventArgs.cs b/src/Tizen.Uix.Stt/Tizen.Uix.Stt/EngineChangedEventArgs.cs
new file mode 100755 (executable)
index 0000000..c6b5eee
--- /dev/null
@@ -0,0 +1,74 @@
+/*
+* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* Licensed under the Apache License, Version 2.0 (the License);
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an AS IS BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+
+namespace Tizen.Uix.Stt
+{
+    /// <summary>
+    /// This class holds information related to Engine Changed Event
+    /// </summary>
+    /// <since_tizen> 3 </since_tizen>
+    public class EngineChangedEventArgs
+    {
+        internal EngineChangedEventArgs(string engineId, string language, bool supportSilence, bool needCredential)
+        {
+            this.EngineId = engineId;
+            this.Language = language;
+            this.SupportSilence = supportSilence;
+            this.NeedCredential = needCredential;
+        }
+
+        /// <summary>
+        /// Engine Id
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        public string EngineId
+        {
+            get;
+            internal set;
+        }
+
+        /// <summary>
+        /// Default Language
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        public string Language
+        {
+            get;
+            internal set;
+        }
+
+        /// <summary>
+        /// The necessity of credential
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        public bool NeedCredential
+        {
+            get;
+            internal set;
+        }
+
+        /// <summary>
+        /// Whether the silence detection is supported or not
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        public bool SupportSilence
+        {
+            get;
+            internal set;
+        }
+    }
+}
diff --git a/src/Tizen.Uix.Stt/Tizen.Uix.Stt/ErrorOccurredEventArgs.cs b/src/Tizen.Uix.Stt/Tizen.Uix.Stt/ErrorOccurredEventArgs.cs
new file mode 100755 (executable)
index 0000000..f479c2e
--- /dev/null
@@ -0,0 +1,193 @@
+/*
+* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* Licensed under the Apache License, Version 2.0 (the License);
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an AS IS BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+
+using System;
+using static Interop.Stt;
+
+namespace Tizen.Uix.Stt
+{
+    /// <summary>
+    /// This class holds information related to the STT ErrorOccurred Event
+    /// </summary>
+    /// <since_tizen> 3 </since_tizen>
+    public class ErrorOccurredEventArgs
+    {
+        private IntPtr _handle;
+
+        internal ErrorOccurredEventArgs(IntPtr handle, Interop.Stt.SttError error)
+        {
+            this._handle = handle;
+            switch (error)
+            {
+                case Interop.Stt.SttError.None:
+                    {
+                        ErrorValue = Error.None;
+                        break;
+                    }
+
+                case Interop.Stt.SttError.OutOfMemory:
+                    {
+                        ErrorValue = Error.OutOfMemory;
+                        break;
+                    }
+
+                case Interop.Stt.SttError.IoError:
+                    {
+                        ErrorValue = Error.IoError;
+                        break;
+                    }
+
+                case Interop.Stt.SttError.InvalidParameter:
+                    {
+                        ErrorValue = Error.InvalidParameter;
+                        break;
+                    }
+
+                case Interop.Stt.SttError.TimedOut:
+                    {
+                        ErrorValue = Error.TimedOut;
+                        break;
+                    }
+
+                case Interop.Stt.SttError.RecorderBusy:
+                    {
+                        ErrorValue = Error.RecorderBusy;
+                        break;
+                    }
+
+                case Interop.Stt.SttError.OutOfNetwork:
+                    {
+                        ErrorValue = Error.OutOfNetwork;
+                        break;
+                    }
+
+                case Interop.Stt.SttError.PermissionDenied:
+                    {
+                        ErrorValue = Error.PermissionDenied;
+                        break;
+                    }
+
+                case Interop.Stt.SttError.NotSupported:
+                    {
+                        ErrorValue = Error.NotSupported;
+                        break;
+                    }
+
+                case Interop.Stt.SttError.InvalidState:
+                    {
+                        ErrorValue = Error.InvalidState;
+                        break;
+                    }
+
+                case Interop.Stt.SttError.InvalidLanguage:
+                    {
+                        ErrorValue = Error.InvalidLanguage;
+                        break;
+                    }
+
+                case Interop.Stt.SttError.EngineNotFound:
+                    {
+                        ErrorValue = Error.EngineNotFound;
+                        break;
+                    }
+
+                case Interop.Stt.SttError.OperationFailed:
+                    {
+                        ErrorValue = Error.OperationFailed;
+                        break;
+                    }
+
+                case Interop.Stt.SttError.NotSupportedFeature:
+                    {
+                        ErrorValue = Error.NotSupportedFeature;
+                        break;
+                    }
+
+                case Interop.Stt.SttError.RecordingTimedOut:
+                    {
+                        ErrorValue = Error.RecordingTimedOut;
+                        break;
+                    }
+
+                case Interop.Stt.SttError.NoSpeech:
+                    {
+                        ErrorValue = Error.NoSpeech;
+                        break;
+                    }
+
+                case Interop.Stt.SttError.InProgressToReady:
+                    {
+                        ErrorValue = Error.InProgressToReady;
+                        break;
+                    }
+
+                case Interop.Stt.SttError.InProgressToRecording:
+                    {
+                        ErrorValue = Error.InProgressToRecording;
+                        break;
+                    }
+
+                case Interop.Stt.SttError.InProgressToProcessing:
+                    {
+                        ErrorValue = Error.InProgressToProcessing;
+                        break;
+                    }
+
+                case Interop.Stt.SttError.ServiceReset:
+                    {
+                        ErrorValue = Error.ServiceReset;
+                        break;
+                    }
+
+            }
+        }
+
+        /// <summary>
+        /// The Error Value
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        public Error ErrorValue
+        {
+            get;
+            internal set;
+        }
+
+        /// <summary>
+        /// Gets the current error message.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        /// <returns>
+        /// string error message
+        /// </returns>
+        public string ErrorMessage
+        {
+            get
+            {
+                string errorMesage = "";
+                SttError error = SttGetErrorMessage(_handle, out errorMesage);
+                if (error != SttError.None)
+                {
+                    Log.Error(LogTag, "GetErrorMessage Failed with error " + error);
+                    return "";
+                }
+
+                return errorMesage;
+            }
+
+        }
+    }
+}
diff --git a/src/Tizen.Uix.Stt/Tizen.Uix.Stt/ExceptionFactory.cs b/src/Tizen.Uix.Stt/Tizen.Uix.Stt/ExceptionFactory.cs
new file mode 100755 (executable)
index 0000000..6636ec3
--- /dev/null
@@ -0,0 +1,151 @@
+/*
+* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* Licensed under the Apache License, Version 2.0 (the License);
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an AS IS BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+
+using System;
+using static Interop.Stt;
+
+namespace Tizen.Uix.Stt
+{
+    internal static class ExceptionFactory
+    {
+        internal static Exception CreateException(SttError err)
+        {
+            Tizen.Log.Error(LogTag, "Error " + err);
+            Exception exp;
+            switch (err)
+            {
+                case SttError.OutOfMemory:
+                    {
+                        exp = new OutOfMemoryException("Out Of Memory");
+                        break;
+                    }
+
+                case SttError.IoError:
+                    {
+                        exp = new InvalidOperationException("I/O Error Occurred");
+                        break;
+                    }
+
+                case SttError.InvalidParameter:
+                    {
+                        exp = new ArgumentException("Invalid Parameters Provided");
+                        break;
+                    }
+
+                case SttError.TimedOut:
+                    {
+                        exp = new TimeoutException("No answer from the STT service");
+                        break;
+                    }
+
+                case SttError.OutOfNetwork:
+                    {
+                        exp = new InvalidOperationException("Network is down");
+                        break;
+                    }
+
+                case SttError.PermissionDenied:
+                    {
+                        exp = new UnauthorizedAccessException("Permission Denied");
+                        break;
+                    }
+
+                case SttError.NotSupported:
+                    {
+                        exp = new NotSupportedException("STT NOT supported");
+                        break;
+                    }
+
+                case SttError.InvalidState:
+                    {
+                        exp = new InvalidOperationException("Invalid state");
+                        break;
+                    }
+
+                case SttError.InvalidLanguage:
+                    {
+                        exp = new InvalidOperationException("Invalid language");
+                        break;
+                    }
+
+                case SttError.EngineNotFound:
+                    {
+                        exp = new InvalidOperationException("No available engine");
+                        break;
+                    }
+
+                case SttError.OperationFailed:
+                    {
+                        exp = new InvalidOperationException("Operation Failed");
+                        break;
+                    }
+
+                case SttError.NotSupportedFeature:
+                    {
+                        exp = new InvalidOperationException("Not supported feature of current engine");
+                        break;
+                    }
+
+                case SttError.RecordingTimedOut:
+                    {
+                        exp = new InvalidOperationException("Recording timed out");
+                        break;
+                    }
+
+                case SttError.NoSpeech:
+                    {
+                        exp = new InvalidOperationException("No speech while recording");
+                        break;
+                    }
+
+                case SttError.InProgressToReady:
+                    {
+                        exp = new InvalidOperationException("Progress to ready is not finished");
+                        break;
+                    }
+
+                case SttError.InProgressToRecording:
+                    {
+                        exp = new InvalidOperationException("Progress to recording is not finished");
+                        break;
+                    }
+
+                case SttError.InProgressToProcessing:
+                    {
+                        exp = new InvalidOperationException("Progress to processing is not finished");
+                        break;
+                    }
+
+                case SttError.ServiceReset:
+                    {
+                        exp = new InvalidOperationException("Service reset");
+                        break;
+                    }
+
+                default:
+                    {
+                        exp = new Exception("");
+                        break;
+                    }
+
+            }
+
+            return exp;
+
+        }
+    }
+}
diff --git a/src/Tizen.Uix.Stt/Tizen.Uix.Stt/RecognitionResultEventArgs.cs b/src/Tizen.Uix.Stt/Tizen.Uix.Stt/RecognitionResultEventArgs.cs
new file mode 100755 (executable)
index 0000000..2618585
--- /dev/null
@@ -0,0 +1,149 @@
+/*
+* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* Licensed under the Apache License, Version 2.0 (the License);
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an AS IS BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+
+using System;
+using System.Collections.Generic;
+using System.Runtime.InteropServices;
+using static Interop.Stt;
+using static Tizen.Uix.Stt.ResultTime;
+
+namespace Tizen.Uix.Stt
+{
+    /// <summary>
+    /// The recognition result from the engine.
+    /// </summary>
+    /// <since_tizen> 3 </since_tizen>
+    public class RecognitionResultEventArgs
+    {
+        private ResultEvent _result;
+        private List<string> _data = new List<string>();
+        private ResultMessage _msg;
+        private int _dataCount;
+
+        internal RecognitionResultEventArgs(ResultEvent e, IntPtr data, int count, string msg)
+        {
+            _result = e;
+            switch (msg)
+            {
+                case "stt.result.message.none":
+                    {
+                        _msg = ResultMessage.None;
+                        break;
+                    }
+
+                case "stt.result.message.error.too.soon":
+                    {
+                        _msg = ResultMessage.TooSoon;
+                        break;
+                    }
+
+                case "stt.result.message.error.too.short":
+                    {
+                        _msg = ResultMessage.TooShort;
+                        break;
+                    }
+
+                case "stt.result.message.error.too.long":
+                    {
+                        _msg = ResultMessage.TooLong;
+                        break;
+                    }
+
+                case "stt.result.message.error.too.quiet":
+                    {
+                        _msg = ResultMessage.TooQuiet;
+                        break;
+                    }
+
+                case "stt.result.message.error.too.loud":
+                    {
+                        _msg = ResultMessage.TooLoud;
+                        break;
+                    }
+
+                case "stt.result.message.error.too.fast":
+                    {
+                        _msg = ResultMessage.TooFast;
+                        break;
+                    }
+
+            }
+
+            this._dataCount = count;
+
+            _data.Clear();
+            if (count > 0)
+            {
+                IntPtr[] dataArray = new IntPtr[count];
+                Marshal.Copy(data, dataArray, 0, count);
+                foreach (IntPtr handle in dataArray)
+                {
+                    string info = Marshal.PtrToStringAnsi(handle);
+                    _data.Add(info);
+                }
+            }
+        }
+
+        /// <summary>
+        /// The result event
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        public ResultEvent Result
+        {
+            get
+            {
+                return _result;
+            }
+        }
+
+        /// <summary>
+        /// Result texts.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        public IEnumerable<string> Data
+        {
+            get
+            {
+                return _data;
+            }
+        }
+
+        /// <summary>
+        /// Returns the Result text count.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        public int DataCount
+        {
+            get
+            {
+                return _dataCount;
+            }
+        }
+
+        /// <summary>
+        /// Engine message
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        public ResultMessage Message
+        {
+            get
+            {
+                return _msg;
+            }
+        }
+    }
+}
diff --git a/src/Tizen.Uix.Stt/Tizen.Uix.Stt/ResultTime.cs b/src/Tizen.Uix.Stt/Tizen.Uix.Stt/ResultTime.cs
new file mode 100755 (executable)
index 0000000..ecf0b91
--- /dev/null
@@ -0,0 +1,87 @@
+/*
+* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* Licensed under the Apache License, Version 2.0 (the License);
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an AS IS BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+
+using static Interop.Stt;
+
+namespace Tizen.Uix.Stt
+{
+    /// <summary>
+    /// This Class represents the result of recognition result from the engine.
+    /// </summary>
+    /// <since_tizen> 3 </since_tizen>
+    public class ResultTime
+    {
+        internal ResultTime(int index, TimeEvent e, string text, long startTime, long endTime)
+        {
+            Index = index;
+            TokenEvent = e;
+            Text = text;
+            StartTime = startTime;
+            EndTime = endTime;
+        }
+
+        /// <summary>
+        /// The result index
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        public int Index
+        {
+            get;
+            internal set;
+        }
+
+        /// <summary>
+        /// The token event
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        public TimeEvent TokenEvent
+        {
+            get;
+            internal set;
+        }
+
+        /// <summary>
+        /// The result text
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        public string Text
+        {
+            get;
+            internal set;
+        }
+
+        /// <summary>
+        /// The start time of result text
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        public long StartTime
+        {
+            get;
+            internal set;
+        }
+
+        /// <summary>
+        /// The end time of result text
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        public long EndTime
+        {
+            get;
+            internal set;
+        }
+    }
+}
diff --git a/src/Tizen.Uix.Stt/Tizen.Uix.Stt/StateChangedEventArgs.cs b/src/Tizen.Uix.Stt/Tizen.Uix.Stt/StateChangedEventArgs.cs
new file mode 100755 (executable)
index 0000000..eb55c4c
--- /dev/null
@@ -0,0 +1,51 @@
+/*
+* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* Licensed under the Apache License, Version 2.0 (the License);
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an AS IS BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+
+namespace Tizen.Uix.Stt
+{
+    /// <summary>
+    /// This class holds information related to the STT StateChanged event
+    /// </summary>
+    /// <since_tizen> 3 </since_tizen>
+    public class StateChangedEventArgs
+    {
+        internal StateChangedEventArgs(State previous, State current)
+        {
+            Previous = previous;
+            Current = current;
+        }
+
+        /// <summary>
+        /// A previous state
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        public State Previous
+        {
+            get;
+            internal set;
+        }
+        /// <summary>
+        /// A current state
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        public State Current
+        {
+            get;
+            internal set;
+        }
+    }
+}
diff --git a/src/Tizen.Uix.Stt/Tizen.Uix.Stt/SttClient.cs b/src/Tizen.Uix.Stt/Tizen.Uix.Stt/SttClient.cs
new file mode 100644 (file)
index 0000000..c08f390
--- /dev/null
@@ -0,0 +1,1519 @@
+/*
+* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* Licensed under the Apache License, Version 2.0 (the License);
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an AS IS BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+
+using System;
+using System.Collections.Generic;
+using System.Runtime.InteropServices;
+using static Interop.Stt;
+
+namespace Tizen.Uix.Stt
+{
+    /// <summary>
+    /// The token event
+    /// </summary>
+    /// <since_tizen> 3 </since_tizen>
+    public enum ResultEvent
+    {
+        /// <summary>
+        /// Event when the recognition full or last result is ready
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        FinalResult = 0,
+        /// <summary>
+        /// Event when the recognition partial result is ready
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        PartialResult,
+        /// <summary>
+        /// Event when the recognition has failed
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        Error
+    };
+
+    /// <summary>
+    /// Enumeration representing the result message
+    /// </summary>
+    /// <since_tizen> 3 </since_tizen>
+    public enum ResultMessage
+    {
+        /// <summary>
+        /// No Error
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        None,
+        /// <summary>
+        /// Recognition failed  because the speech started too soon.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        TooSoon,
+        /// <summary>
+        /// Recognition failed  because the speech is too short.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        TooShort,
+        /// <summary>
+        /// Recognition failed  because the speech is too long.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        TooLong,
+        /// <summary>
+        /// Recognition failed  because the speech is too quiet to listen.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        TooQuiet,
+        /// <summary>
+        /// Recognition failed  because the speech is too loud to listen.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        TooLoud,
+        /// <summary>
+        /// Recognition failed  because the speech is too fast to listen.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        TooFast
+    };
+
+    /// <summary>
+    /// Enumeration for the Token type
+    /// </summary>
+    /// <since_tizen> 3 </since_tizen>
+    public enum TimeEvent
+    {
+        /// <summary>
+        /// Event when the token is beginning type
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        Beginning = 0,
+        /// <summary>
+        /// Event when the token is middle type
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        Middle = 1,
+        /// <summary>
+        /// Event when the token is end type
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        End = 2
+    };
+
+    /// <summary>
+    /// Enum for Error values that can occur
+    /// </summary>
+    /// <since_tizen> 3 </since_tizen>
+    public enum Error
+    {
+        /// <summary>
+        /// Successful, No error
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        None,
+        /// <summary>
+        /// Out of Memory
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        OutOfMemory,
+        /// <summary>
+        /// I/O error
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        IoError,
+        /// <summary>
+        /// Invalid parameter
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        InvalidParameter,
+        /// <summary>
+        /// No answer from the STT service
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        TimedOut,
+        /// <summary>
+        /// Device or resource busy
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        RecorderBusy,
+        /// <summary>
+        /// Network is down
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        OutOfNetwork,
+        /// <summary>
+        /// Permission denied
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        PermissionDenied,
+        /// <summary>
+        /// STT NOT supported
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        NotSupported,
+        /// <summary>
+        /// Invalid state
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        InvalidState,
+        /// <summary>
+        /// Invalid language
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        InvalidLanguage,
+        /// <summary>
+        /// No available engine
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        EngineNotFound,
+        /// <summary>
+        /// Operation failed
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        OperationFailed,
+        /// <summary>
+        /// Not supported feature of current engine
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        NotSupportedFeature,
+        /// <summary>
+        /// Recording timed out
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        RecordingTimedOut,
+        /// <summary>
+        /// No speech while recording
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        NoSpeech,
+        /// <summary>
+        /// Progress to ready is not finished
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        InProgressToReady,
+        /// <summary>
+        /// Progress to recording is not finished
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        InProgressToRecording,
+        /// <summary>
+        /// Progress to processing is not finished
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        InProgressToProcessing,
+        /// <summary>
+        /// Service reset
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        ServiceReset
+    };
+
+    /// <summary>
+    /// Enumeration for Recognition Types
+    /// </summary>
+    /// <since_tizen> 3 </since_tizen>
+    public enum RecognitionType
+    {
+        /// <summary>
+        /// Free form dictation
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        Free,
+        /// <summary>
+        /// Continuous free dictation.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        Partial,
+        /// <summary>
+        /// Search
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        Search,
+        /// <summary>
+        /// Web Search
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        WebSearch,
+        /// <summary>
+        /// Map
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        Map
+    };
+
+    /// <summary>
+    /// Enumeration for the State types
+    /// </summary>
+    /// <since_tizen> 3 </since_tizen>
+    public enum State
+    {
+        /// <summary>
+        /// Created state
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        Created = 0,
+        /// <summary>
+        /// Ready state
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        Ready = 1,
+        /// <summary>
+        /// Recording state
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        Recording = 2,
+        /// <summary>
+        /// Processing state
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        Processing = 3,
+        /// <summary>
+        /// Unavailable
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        Unavailable
+    };
+
+    /// <summary>
+    /// Enumeration for the Silence Detection types
+    /// </summary>
+    /// <since_tizen> 3 </since_tizen>
+    public enum SilenceDetection
+    {
+        /// <summary>
+        /// Silence detection type - False
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        False = 0,
+        /// <summary>
+        /// Silence detection type - True
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        True = 1,
+        /// <summary>
+        /// Silence detection type - Auto
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        Auto = 2
+    };
+
+    /// <summary>
+    /// A main function of Speech-To-Text (below STT) API recognizes sound data recorded by users.
+    /// After choosing a language, applications will start recording and recognizing.
+    /// After recording, the applications will receive the recognized result.
+    /// The STT has a client-server for the service of multi-applications.
+    /// The STT service always works in the background as a server. If the service is not working, client library will invoke it and client will communicate with it.
+    /// The service has engines and the recorder so client does not have the recorder itself. Only the client request commands to the STT service for using STT.
+    /// </summary>
+    /// <since_tizen> 3 </since_tizen>
+    public class SttClient : IDisposable
+    {
+        private IntPtr _handle;
+        private Object thisLock = new Object();
+        private event EventHandler<RecognitionResultEventArgs> _recognitionResult;
+        private event EventHandler<StateChangedEventArgs> _stateChanged;
+        private event EventHandler<ErrorOccurredEventArgs> _errorOccurred;
+        private event EventHandler<DefaultLanguageChangedEventArgs> _defaultLanguageChanged;
+        private event EventHandler<EngineChangedEventArgs> _engineChanged;
+        private bool disposedValue = false;
+        private Interop.Stt.RecognitionResultCallback _resultDelegate;
+        private Interop.Stt.StateChangedCallback _stateDelegate;
+        private Interop.Stt.ErrorCallback _errorDelegate;
+        private Interop.Stt.DefaultLanguageChangedCallback _languageDelegate;
+        private Interop.Stt.EngineChangedCallback _engineDelegate;
+        private ResultTime _result;
+        private ResultTimeCallback _resultTimeDelegate;
+
+        /// <summary>
+        /// Constructor to create a STT instance.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        /// <privilege>
+        /// http://tizen.org/privilege/recorder
+        /// </privilege>
+        /// <feature>
+        /// http://tizen.org/feature/speech.recognition
+        /// http://tizen.org/feature/microphone
+        /// </feature>
+        /// <exception cref="InvalidOperationException"> This Exception can be due to Operation Failed. </exception>
+        /// <exception cref="OutOfMemoryException"> This Exception can be due to Out of Memory. </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to STT Not Supported. </exception>
+        /// <exception cref="UnauthorizedAccessException"> This Exception can be due to Permission Denied. </exception>
+        public SttClient()
+        {
+            IntPtr handle;
+            SttError error = SttCreate(out handle);
+            if (error != SttError.None)
+            {
+                Log.Error(LogTag, "Create Failed with error " + error);
+                throw ExceptionFactory.CreateException(error);
+            }
+
+            _handle = handle;
+        }
+
+        /// <summary>
+        /// Event to be invoked when the recognition is done.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        public event EventHandler<RecognitionResultEventArgs> RecognitionResult
+        {
+            add
+            {
+                lock (thisLock)
+                {
+                    _resultDelegate = (IntPtr handle, ResultEvent e, IntPtr data, int dataCount, IntPtr msg, IntPtr userData) =>
+                {
+                    Log.Info(LogTag, "Recognition Result Event Triggered");
+                    if (data != null && msg != null)
+                    {
+                        RecognitionResultEventArgs args = new RecognitionResultEventArgs(e, data, dataCount, Marshal.PtrToStringAnsi(msg));
+                        _recognitionResult?.Invoke(this, args);
+                    }
+                    else
+                    {
+                        Log.Info(LogTag, "Recognition Result Event null received");
+                    }
+                };
+                    SttError error = SttSetRecognitionResultCB(_handle, _resultDelegate, IntPtr.Zero);
+                    if (error != SttError.None)
+                    {
+                        Log.Error(LogTag, "Add RecognitionResult Failed with error " + error);
+                    }
+                    else
+                    {
+                        _recognitionResult += value;
+                    }
+                }
+            }
+
+            remove
+            {
+                lock (thisLock)
+                {
+                    SttError error = SttUnsetRecognitionResultCB(_handle);
+                    if (error != SttError.None)
+                    {
+                        Log.Error(LogTag, "Remove RecognitionResult Failed with error " + error);
+                    }
+
+                    _recognitionResult -= value;
+                }
+            }
+        }
+
+        /// <summary>
+        /// Event to be invoked when STT state changes.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        public event EventHandler<StateChangedEventArgs> StateChanged
+        {
+            add
+            {
+                lock (thisLock)
+                {
+                    SttClient obj = this;
+                    _stateDelegate = (IntPtr handle, State previous, State current, IntPtr userData) =>
+                    {
+                        StateChangedEventArgs args = new StateChangedEventArgs(previous, current);
+                        _stateChanged?.Invoke(obj, args);
+                    };
+                    SttError error = SttSetStateChangedCB(_handle, _stateDelegate, IntPtr.Zero);
+                    if (error != SttError.None)
+                    {
+                        Log.Error(LogTag, "Add StateChanged Failed with error " + error);
+                    }
+                    else
+                    {
+                        _stateChanged += value;
+                    }
+
+                }
+            }
+
+            remove
+            {
+                lock (thisLock)
+                {
+                    SttError error = SttUnsetStateChangedCB(_handle);
+                    if (error != SttError.None)
+                    {
+                        Log.Error(LogTag, "Remove StateChanged Failed with error " + error);
+                    }
+
+                    _stateChanged -= value;
+                }
+            }
+
+        }
+
+        /// <summary>
+        /// Event to be invoked when an error occurs.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        public event EventHandler<ErrorOccurredEventArgs> ErrorOccurred
+        {
+            add
+            {
+                lock (thisLock)
+                {
+                    _errorDelegate = (IntPtr handle, SttError reason, IntPtr userData) =>
+                {
+                    ErrorOccurredEventArgs args = new ErrorOccurredEventArgs(handle, reason);
+                    _errorOccurred?.Invoke(this, args);
+                };
+                    SttError error = SttSetErrorCB(_handle, _errorDelegate, IntPtr.Zero);
+                    if (error != SttError.None)
+                    {
+                        Log.Error(LogTag, "Add ErrorOccurred Failed with error " + error);
+                    }
+
+                    else
+                    {
+                        _errorOccurred += value;
+                    }
+                }
+
+            }
+
+            remove
+            {
+                lock (thisLock)
+                {
+                    SttError error = SttUnsetErrorCB(_handle);
+                    if (error != SttError.None)
+                    {
+                        Log.Error(LogTag, "Remove ErrorOccurred Failed with error " + error);
+                    }
+
+                    _errorOccurred -= value;
+                }
+            }
+        }
+
+        /// <summary>
+        /// Event to be invoked when default language change.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        public event EventHandler<DefaultLanguageChangedEventArgs> DefaultLanguageChanged
+        {
+            add
+            {
+                lock (thisLock)
+                {
+                    _languageDelegate = (IntPtr handle, IntPtr previousLanguage, IntPtr currentLanguage, IntPtr userData) =>
+                {
+                    string previousLanguageString = Marshal.PtrToStringAnsi(previousLanguage);
+                    string currentLanguageString = Marshal.PtrToStringAnsi(currentLanguage);
+                    DefaultLanguageChangedEventArgs args = new DefaultLanguageChangedEventArgs(previousLanguageString, currentLanguageString);
+                    _defaultLanguageChanged?.Invoke(this, args);
+                };
+                    SttError error = SttSetDefaultLanguageChangedCB(_handle, _languageDelegate, IntPtr.Zero);
+                    if (error != SttError.None)
+                    {
+                        Log.Error(LogTag, "Add DefaultLanguageChanged Failed with error " + error);
+                    }
+
+                    else
+                    {
+                        _defaultLanguageChanged += value;
+                    }
+                }
+
+            }
+
+            remove
+            {
+                lock (thisLock)
+                {
+                    SttError error = SttUnsetDefaultLanguageChangedCB(_handle);
+                    if (error != SttError.None)
+                    {
+                        Log.Error(LogTag, "Remove DefaultLanguageChanged Failed with error " + error);
+                    }
+
+                    _defaultLanguageChanged -= value;
+                }
+            }
+
+        }
+
+        /// <summary>
+        /// Event to be invoked to detect engine change.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        public event EventHandler<EngineChangedEventArgs> EngineChanged
+        {
+            add
+            {
+                lock (thisLock)
+                {
+                    _engineDelegate = (IntPtr handle, IntPtr engineId, IntPtr language, bool supportSilence, bool needCredential, IntPtr userData) =>
+                {
+                    string engineIdString = Marshal.PtrToStringAnsi(engineId);
+                    string languageString = Marshal.PtrToStringAnsi(language);
+                    EngineChangedEventArgs args = new EngineChangedEventArgs(engineIdString, languageString, supportSilence, needCredential);
+                    _engineChanged?.Invoke(this, args);
+                };
+                    SttError error = SttSetEngineChangedCB(_handle, _engineDelegate, IntPtr.Zero);
+                    if (error != SttError.None)
+                    {
+                        Log.Error(LogTag, "Add EngineChanged Failed with error " + error);
+                    }
+                    else
+                    {
+                        _engineChanged += value;
+                    }
+                }
+            }
+
+            remove
+            {
+                lock (thisLock)
+                {
+                    SttError error = SttUnsetEngineChangedCB(_handle);
+                    if (error != SttError.None)
+                    {
+                        Log.Error(LogTag, "Remove EngineChanged Failed with error " + error);
+                    }
+
+                    _engineChanged -= value;
+                }
+            }
+        }
+
+        /// <summary>
+        /// Gets the default language set by the user.
+        /// The 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.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        /// <value>
+        /// Default language in STT.
+        /// </value>
+        /// <privilege>
+        /// http://tizen.org/privilege/recorder
+        /// </privilege>
+        /// <returns>
+        /// Default Language string value.
+        /// </returns>
+        public string DefaultLanguage
+        {
+            get
+            {
+                string language;
+                lock (thisLock)
+                {
+                    SttError error = SttGetDefaultLanguage(_handle, out language);
+                    if (error != SttError.None)
+                    {
+                        Log.Error(LogTag, "DefaultLanguage Failed with error " + error);
+                        return "";
+                    }
+                }
+
+                return language;
+            }
+        }
+
+        /// <summary>
+        /// Gets the microphone volume during recording.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        /// <value>
+        /// Recording volume in STT.
+        /// </value>
+        /// <privilege>
+        /// http://tizen.org/privilege/recorder
+        /// </privilege>
+        /// <pre>
+        /// The State must be Recording.
+        /// </pre>
+        public float RecordingVolume
+        {
+            get
+            {
+                float volume;
+                lock (thisLock)
+                {
+                    SttError error = SttGetRecordingVolume(_handle, out volume);
+                    if (error != SttError.None)
+                    {
+                        Log.Error(LogTag, "GetRecordingVolume Failed with error " + error);
+                        return 0.0f;
+                    }
+
+                }
+
+                return volume;
+            }
+
+        }
+
+        /// <summary>
+        /// Gets the current STT state.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        /// <value>
+        /// Current state of STT.
+        /// </value>
+        /// <privilege>
+        /// http://tizen.org/privilege/recorder
+        /// </privilege>
+        /// <returns>
+        /// Current STT State value.
+        /// </returns>
+        public State CurrentState
+        {
+            get
+            {
+                State state;
+                lock (thisLock)
+                {
+                    SttError error = SttGetState(_handle, out state);
+                    if (error != SttError.None)
+                    {
+                        Log.Error(LogTag, "GetState Failed with error " + error);
+                        return State.Unavailable;
+                    }
+                }
+
+                return state;
+            }
+
+        }
+
+        /// <summary>
+        /// This property can be used to get and set the current engine id.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        /// <value>
+        /// Current STT engine id.
+        /// </value>
+        /// <privilege>
+        /// http://tizen.org/privilege/recorder
+        /// </privilege>
+        /// <exception cref="InvalidOperationException">
+        /// This Exception can occur while setting due to the following reasons
+        /// 1. Operation Failed
+        /// 2. Invalid State
+        /// </exception>
+        /// <exception cref="OutOfMemoryException"> This Exception can be due to Out of Memory. </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to STT Not Supported. </exception>
+        /// <exception cref="UnauthorizedAccessException"> This Exception can be due to Permission Denied. </exception>
+        /// <exception cref="ArgumentException"> This can happen if Improper EngineId is provided while setting the value. </exception>
+        /// <pre>
+        /// The State must be Created.
+        /// </pre>
+        public string Engine
+        {
+            get
+            {
+                string engineId;
+                lock (thisLock)
+                {
+                    SttError error = SttGetEngine(_handle, out engineId);
+                    if (error != SttError.None)
+                    {
+                        Log.Error(LogTag, "Get EngineId Failed with error " + error);
+                        return "";
+                    }
+                }
+
+                return engineId;
+            }
+            set
+            {
+                lock (thisLock)
+                {
+                    SttError error = SttSetEngine(_handle, value);
+                    if (error != SttError.None)
+                    {
+                        Log.Error(LogTag, "Set EngineId Failed with error " + error);
+                        throw ExceptionFactory.CreateException(error);
+                    }
+                }
+
+            }
+        }
+
+        /// <summary>
+        /// Retrieves the time stamp of the current recognition result
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        /// <returns>
+        /// list of ResultTime
+        /// </returns>
+        /// <privilege>
+        /// http://tizen.org/privilege/recorder
+        /// </privilege>
+        /// <feature>
+        /// http://tizen.org/feature/speech.recognition
+        /// http://tizen.org/feature/microphone
+        /// </feature>
+        /// <remarks>
+        /// This function should only be called in RecognitionResult Event
+        /// </remarks>
+        /// <exception cref="InvalidOperationException"> This Exception can be due to Operation Failed. </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to STT Not Supported. </exception>
+        /// <exception cref="UnauthorizedAccessException"> This Exception can be due to Permission Denied. </exception>
+        public IEnumerable<ResultTime> GetDetailedResult()
+        {
+            List<ResultTime> list = new List<ResultTime>();
+            _resultTimeDelegate = (IntPtr handle, int index, TimeEvent e, IntPtr text, IntPtr startTime, IntPtr endTime, IntPtr userData) =>
+            {
+                _result = new ResultTime(index, e, Marshal.PtrToStringAnsi(text), (long)startTime, (long)endTime);
+                list.Add(_result);
+                return true;
+            };
+            SttError error = SttForeachDetailedResult(_handle, _resultTimeDelegate, IntPtr.Zero);
+            if (error != SttError.None)
+            {
+                Log.Error(LogTag, "GetDetailedResult Failed with error " + error);
+                throw ExceptionFactory.CreateException(error);
+            }
+            return list;
+        }
+
+
+        /// <summary>
+        /// Gets the private data from stt engine.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        /// <param name="key">
+        /// The key string
+        /// </param>
+        /// <returns>
+        /// The Data Corresponding to the Key provided
+        /// </returns>
+        /// <privilege>
+        /// http://tizen.org/privilege/recorder
+        /// </privilege>
+        /// <feature>
+        /// http://tizen.org/feature/speech.recognition
+        /// http://tizen.org/feature/microphone
+        /// </feature>
+        /// <exception cref="InvalidOperationException"> This Exception can be due to Invalid State. </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to STT Not Supported. </exception>
+        /// <exception cref="TimeoutException"> This Exception can be due to No Answer from STT Service. </exception>
+        /// <pre>
+        /// The State must be Ready.
+        /// </pre>
+        public string GetPrivateData(string key)
+        {
+            string data;
+            lock (thisLock)
+            {
+                SttError error = SttGetPrivateData(_handle, key, out data);
+                if (error != SttError.None)
+                {
+                    Log.Error(LogTag, "GetPrivateData Failed with error " + error);
+                    throw ExceptionFactory.CreateException(error);
+                }
+            }
+
+            return data;
+        }
+
+        /// <summary>
+        /// Sets the private data to stt engine.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        /// <param name="key">
+        /// The key string
+        /// </param>
+        /// <param name="data">
+        /// The data string
+        /// </param>
+        /// <privilege>
+        /// http://tizen.org/privilege/recorder
+        /// </privilege>
+        /// <feature>
+        /// http://tizen.org/feature/speech.recognition
+        /// http://tizen.org/feature/microphone
+        /// </feature>
+        /// <exception cref="InvalidOperationException"> This Exception can be due to Invalid State. </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to STT Not Supported. </exception>
+        /// <exception cref="TimeoutException"> This Exception can be due to No Answer from STT Service. </exception>
+        /// <exception cref="ArgumentException"> This can happen if Improper value is provided while setting the value. </exception>
+        /// <pre>
+        /// The State must be Ready.
+        /// </pre>
+        public void SetPrivateData(string key, string data)
+        {
+            lock (thisLock)
+            {
+                SttError error = SttSetPrivateData(_handle, key, data);
+                if (error != SttError.None)
+                {
+                    Log.Error(LogTag, "SetPrivateData Failed with error " + error);
+                    throw ExceptionFactory.CreateException(error);
+                }
+            }
+        }
+
+        /// <summary>
+        /// Gets the list of Supported Engine
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        /// <returns>
+        /// IEnumerable&lt;SupportedEngine&gt; list of supported engines
+        /// </returns>
+        /// <privilege>
+        /// http://tizen.org/privilege/recorder
+        /// </privilege>
+        /// <feature>
+        /// http://tizen.org/feature/speech.recognition
+        /// http://tizen.org/feature/microphone
+        /// </feature>
+        /// <exception cref="InvalidOperationException"> This Exception can be due to Operation Failed. </exception>
+        /// <exception cref="OutOfMemoryException"> This Exception can be due to Out of Memory. </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to STT Not Supported. </exception>
+        /// <exception cref="UnauthorizedAccessException"> This Exception can be due to Permission Denied. </exception>
+        public IEnumerable<SupportedEngine> GetSupportedEngines()
+        {
+            List<SupportedEngine> engineList = new List<SupportedEngine>();
+            lock (thisLock)
+            {
+                SupportedEngineCallback supportedEngineDelegate = (IntPtr handle, IntPtr engineId, IntPtr engineName, IntPtr userData) =>
+            {
+                string id = Marshal.PtrToStringAnsi(engineId);
+                string name = Marshal.PtrToStringAnsi(engineName);
+                SupportedEngine engine = new SupportedEngine(id, name);
+                engineList.Add(engine);
+                return true;
+            };
+                SttError error = SttForeEachSupportedEngines(_handle, supportedEngineDelegate, IntPtr.Zero);
+                if (error != SttError.None)
+                {
+                    Log.Error(LogTag, "Create Failed with error " + error);
+                    throw ExceptionFactory.CreateException(error);
+                }
+            }
+
+            return engineList;
+        }
+
+        /// <summary>
+        /// Sets the app credential
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        /// <param name="credential">
+        /// The credential string
+        /// </param>
+        /// <privilege>
+        /// http://tizen.org/privilege/recorder
+        /// </privilege>
+        /// <feature>
+        /// http://tizen.org/feature/speech.recognition
+        /// http://tizen.org/feature/microphone
+        /// </feature>
+        /// <exception cref="InvalidOperationException">
+        /// This Exception can be due to the following reasons
+        /// 1. Operation Failed
+        /// 2. Invalid State
+        /// </exception>
+        /// <exception cref="OutOfMemoryException"> This Exception can be due to Out of Memory. </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to STT Not Supported. </exception>
+        /// <exception cref="UnauthorizedAccessException"> This Exception can be due to Permission Denied. </exception>
+        /// <exception cref="ArgumentException"> This can happen if Improper value is provided while setting the value. </exception>
+        /// <pre>
+        /// The State must be Created.
+        /// </pre>
+        public void SetCredential(string credential)
+        {
+            lock (thisLock)
+            {
+                SttError error = SttSetcredential(_handle, credential);
+                if (error != SttError.None)
+                {
+                    Log.Error(LogTag, "SetCredential Failed with error " + error);
+                    throw ExceptionFactory.CreateException(error);
+                }
+            }
+        }
+
+        /// <summary>
+        /// Connects to the STT service asynchronously.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        /// <privilege>
+        /// http://tizen.org/privilege/recorder
+        /// </privilege>
+        /// <feature>
+        /// http://tizen.org/feature/speech.recognition
+        /// http://tizen.org/feature/microphone
+        /// </feature>
+        /// <exception cref="InvalidOperationException"> This Exception can be due to Invalid State. </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to STT Not Supported. </exception>
+        /// <exception cref="UnauthorizedAccessException"> This Exception can be due to Permission Denied. </exception>
+        /// <pre>
+        /// The State must be Created.
+        /// </pre>
+        /// <post>
+        /// If this function is successful, the STT state will be Ready
+        /// If this function is unsuccessful, ErrorOccurred event will be invoked
+        /// </post>
+        public void Prepare()
+        {
+            lock (thisLock)
+            {
+                SttError error = SttPrepare(_handle);
+                if (error != SttError.None)
+                {
+                    Log.Error(LogTag, "SetEngine Failed with error " + error);
+                    throw ExceptionFactory.CreateException(error);
+                }
+            }
+        }
+
+        /// <summary>
+        /// Disconnects from the STT service.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        /// <privilege>
+        /// http://tizen.org/privilege/recorder
+        /// </privilege>
+        /// <feature>
+        /// http://tizen.org/feature/speech.recognition
+        /// http://tizen.org/feature/microphone
+        /// </feature>
+        /// <exception cref="InvalidOperationException"> This Exception can be due to Invalid State. </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to STT Not Supported. </exception>
+        /// <exception cref="UnauthorizedAccessException"> This Exception can be due to Permission Denied. </exception>
+        /// <pre>
+        /// The State must be Ready.
+        /// </pre>
+        /// <post>
+        /// If this function is successful, the STT state will be Created
+        /// </post>
+        public void Unprepare()
+        {
+            lock (thisLock)
+            {
+                SttError error = SttUnprepare(_handle);
+                if (error != SttError.None)
+                {
+                    Log.Error(LogTag, "Unprepare Failed with error " + error);
+                    throw ExceptionFactory.CreateException(error);
+                }
+            }
+        }
+
+        /// <summary>
+        /// Retrieves all supported languages of current engine.
+        /// The 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.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        /// <privilege>
+        /// http://tizen.org/privilege/recorder
+        /// </privilege>
+        /// <returns>
+        /// list of strings of supported languages.
+        /// </returns>
+        /// <feature>
+        /// http://tizen.org/feature/speech.recognition
+        /// http://tizen.org/feature/microphone
+        /// </feature>
+        /// <exception cref="InvalidOperationException">
+        /// This Exception can be due to the following reasons
+        /// 1. Engine Not Found.
+        /// 2. Operation Failed.
+        /// </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to STT Not Supported. </exception>
+        /// <exception cref="UnauthorizedAccessException"> This Exception can be due to Permission Denied. </exception>
+        public IEnumerable<string> GetSupportedLanguages()
+        {
+            List<string> languageList = new List<string>();
+            lock (thisLock)
+            {
+                SupportedLanguageCallback supportedLanguageDelegate = (IntPtr handle, IntPtr language, IntPtr userData) =>
+            {
+                string lang = Marshal.PtrToStringAnsi(language);
+                languageList.Add(lang);
+                return true;
+            };
+
+                SttError error = SttForeachSupportedLanguages(_handle, supportedLanguageDelegate, IntPtr.Zero);
+                if (error != SttError.None)
+                {
+                    Log.Error(LogTag, "GetSupportedLanguages Failed with error " + error);
+                    throw ExceptionFactory.CreateException(error);
+                }
+            }
+
+            return languageList;
+        }
+
+        /// <summary>
+        /// Checks whether the recognition type is supported.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        /// <privilege>
+        /// http://tizen.org/privilege/recorder
+        /// </privilege>
+        /// <param name="type">
+        /// RecognitionType value.
+        /// </param>
+        /// <returns>
+        /// bool value indicating whether the recognition type is supported.
+        /// </returns>
+        /// <feature>
+        /// http://tizen.org/feature/speech.recognition
+        /// http://tizen.org/feature/microphone
+        /// </feature>
+        /// <exception cref="InvalidOperationException">
+        /// This Exception can be due to the following reasons
+        /// 1. Invalid State
+        /// 2. Engine Not Found.
+        /// 3. Operation Failed.
+        /// </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to STT Not Supported. </exception>
+        /// <pre>
+        /// The state should be Ready.
+        /// </pre>
+        public bool IsRecognitionTypeSupported(RecognitionType type)
+        {
+            bool supported;
+            lock (thisLock)
+            {
+                string recType = "stt.recognition.type.FREE";
+                switch (type)
+                {
+                    case RecognitionType.Free:
+                        {
+                            recType = "stt.recognition.type.FREE";
+                            break;
+                        }
+
+                    case RecognitionType.Partial:
+                        {
+                            recType = "stt.recognition.type.FREE.PARTIAL";
+                            break;
+                        }
+
+                    case RecognitionType.Search:
+                        {
+                            recType = "stt.recognition.type.SEARCH";
+                            break;
+                        }
+
+                    case RecognitionType.WebSearch:
+                        {
+                            recType = "stt.recognition.type.WEB_SEARCH";
+                            break;
+                        }
+
+                    case RecognitionType.Map:
+                        {
+                            recType = "stt.recognition.type.MAP";
+                            break;
+                        }
+
+                }
+
+                SttError error = SttIsRecognitionTypeSupported(_handle, recType, out supported);
+                if (error != SttError.None)
+                {
+                    Log.Error(LogTag, "IsRecognitionTypeSupported Failed with error " + error);
+                    throw ExceptionFactory.CreateException(error);
+                }
+
+            }
+
+            return supported;
+        }
+
+        /// <summary>
+        /// Sets the silence detection.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        /// <privilege>
+        /// http://tizen.org/privilege/recorder
+        /// </privilege>
+        /// <param name="type">
+        /// SilenceDetection value.
+        /// </param>
+        /// <feature>
+        /// http://tizen.org/feature/speech.recognition
+        /// http://tizen.org/feature/microphone
+        /// </feature>
+        /// <exception cref="InvalidOperationException">
+        /// This Exception can be due to the following reasons
+        /// 1. Invalid State
+        /// 2. Not supported feature of current engine.
+        /// 3. Operation Failed.
+        /// </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to STT Not Supported. </exception>
+        /// <pre>
+        /// The state should be Ready.
+        /// </pre>
+        public void SetSilenceDetection(SilenceDetection type)
+        {
+            lock (thisLock)
+            {
+                SttError error = SttSetSilenceDetection(_handle, type);
+                if (error != SttError.None)
+                {
+                    Log.Error(LogTag, "SetSilenceDetection Failed with error " + error);
+                    throw ExceptionFactory.CreateException(error);
+                }
+            }
+        }
+
+        /// <summary>
+        /// Sets the sound to start recording.
+        /// Sound file type should be wav type.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        /// <privilege>
+        /// http://tizen.org/privilege/recorder
+        /// </privilege>
+        /// <param name="filePath">
+        /// File Path for the sound.
+        /// </param>
+        /// <feature>
+        /// http://tizen.org/feature/speech.recognition
+        /// http://tizen.org/feature/microphone
+        /// </feature>
+        /// <exception cref="InvalidOperationException">
+        /// This Exception can be due to the following reasons
+        /// 1. Invalid State.
+        /// 2. Operation Failed.
+        /// </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to STT Not Supported. </exception>
+        /// <exception cref="UnauthorizedAccessException"> This Exception can be due to Permission Denied. </exception>
+        /// <exception cref="ArgumentException"> If an Invalid Parameter is provided. </exception>
+        /// <pre>
+        /// The state should be Ready.
+        /// </pre>
+        public void SetStartSound(string filePath)
+        {
+            lock (thisLock)
+            {
+                SttError error = SttSetStartSound(_handle, filePath);
+                if (error != SttError.None)
+                {
+                    Log.Error(LogTag, "SetStartSound Failed with error " + error);
+                    throw ExceptionFactory.CreateException(error);
+                }
+            }
+        }
+
+        /// <summary>
+        /// Unsets the sound to start recording.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        /// <privilege>
+        /// http://tizen.org/privilege/recorder
+        /// </privilege>
+        /// <feature>
+        /// http://tizen.org/feature/speech.recognition
+        /// http://tizen.org/feature/microphone
+        /// </feature>
+        /// <exception cref="InvalidOperationException">
+        /// This Exception can be due to the following reasons
+        /// 1. Invalid State.
+        /// 2. Operation Failed.
+        /// </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to STT Not Supported. </exception>
+        /// <exception cref="UnauthorizedAccessException"> This Exception can be due to Permission Denied. </exception>
+        /// <pre>
+        /// The state should be Ready.
+        /// </pre>
+        public void UnsetStartSound()
+        {
+            lock (thisLock)
+            {
+                SttError error = SttUnsetStartSound(_handle);
+                if (error != SttError.None)
+                {
+                    Log.Error(LogTag, "UnsetStartSound Failed with error " + error);
+                    throw ExceptionFactory.CreateException(error);
+                }
+            }
+        }
+
+        /// <summary>
+        /// Sets the sound to stop recording.
+        /// Sound file type should be wav type.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        /// <privilege>
+        /// http://tizen.org/privilege/recorder
+        /// </privilege>
+        /// <param name="filePath">
+        /// File Path for the sound.
+        /// </param>
+        /// <feature>
+        /// http://tizen.org/feature/speech.recognition
+        /// http://tizen.org/feature/microphone
+        /// </feature>
+        /// <exception cref="InvalidOperationException">
+        /// This Exception can be due to the following reasons
+        /// 1. Invalid State.
+        /// 2. Operation Failed.
+        /// </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to STT Not Supported. </exception>
+        /// <exception cref="UnauthorizedAccessException"> This Exception can be due to Permission Denied. </exception>
+        /// <exception cref="ArgumentException"> If an Invalid Parameter is provided. </exception>
+        /// <pre>
+        /// The state should be Ready.
+        /// </pre>
+        public void SetStopSound(string filePath)
+        {
+            lock (thisLock)
+            {
+                SttError error = SttSetStopSound(_handle, filePath);
+                if (error != SttError.None)
+                {
+                    Log.Error(LogTag, "SetStopSound Failed with error " + error);
+                    throw ExceptionFactory.CreateException(error);
+                }
+            }
+        }
+
+        /// <summary>
+        /// Unsets the sound to stop recording.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        /// <privilege>
+        /// http://tizen.org/privilege/recorder
+        /// </privilege>
+        /// <feature>
+        /// http://tizen.org/feature/speech.recognition
+        /// http://tizen.org/feature/microphone
+        /// </feature>
+        /// <exception cref="InvalidOperationException">
+        /// This Exception can be due to the following reasons
+        /// 1. Invalid State.
+        /// 2. Operation Failed.
+        /// </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to STT Not Supported. </exception>
+        /// <exception cref="UnauthorizedAccessException"> This Exception can be due to Permission Denied. </exception>
+        /// <pre>
+        /// The state should be Ready.
+        /// </pre>
+        public void UnsetStopSound()
+        {
+            lock (thisLock)
+            {
+                SttError error = SttUnsetStopSound(_handle);
+                if (error != SttError.None)
+                {
+                    Log.Error(LogTag, "UnsetStopSound Failed with error " + error);
+                    throw ExceptionFactory.CreateException(error);
+                }
+            }
+        }
+
+        /// <summary>
+        /// Starts recording and recognition asynchronously.
+        /// This function starts recording in the STT service and sending recording data to engine.
+        /// This work continues until Stop, Cancel or silence detected by engine
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        /// <privilege>
+        /// http://tizen.org/privilege/recorder
+        /// </privilege>
+        /// <param name="language">
+        /// The language selected
+        /// </param>
+        /// <param name="type">
+        /// The type for recognition
+        /// </param>
+        /// <feature>
+        /// http://tizen.org/feature/speech.recognition
+        /// http://tizen.org/feature/microphone
+        /// </feature>
+        /// <exception cref="InvalidOperationException">
+        /// This Exception can be due to the following reasons
+        /// 1. Invalid State.
+        /// 2. Operation Failed.
+        /// 3. Recorder Busy.
+        /// 4. Progress to recording is not finished
+        /// </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to STT Not Supported. </exception>
+        /// <exception cref="UnauthorizedAccessException"> This Exception can be due to Permission Denied. </exception>
+        /// <exception cref="ArgumentException"> If an Invalid Language is provided. </exception>
+        /// <pre>
+        /// The state should be Ready.
+        /// </pre>
+        /// <post>
+        /// It will invoke StateChanged Event if registered.
+        /// If this function succeeds, the STT state will be Recording.
+        /// If you call this function again before state changes, you will receive ErrorINProgressToRecording.
+        /// </post>
+        public void Start(string language, RecognitionType type)
+        {
+            lock (thisLock)
+            {
+                string recType = "stt.recognition.type.FREE";
+                switch (type)
+                {
+                    case RecognitionType.Free:
+                        {
+                            recType = "stt.recognition.type.FREE";
+                            break;
+                        }
+
+                    case RecognitionType.Partial:
+                        {
+                            recType = "stt.recognition.type.FREE.PARTIAL";
+                            break;
+                        }
+
+                    case RecognitionType.Search:
+                        {
+                            recType = "stt.recognition.type.SEARCH";
+                            break;
+                        }
+
+                    case RecognitionType.WebSearch:
+                        {
+                            recType = "stt.recognition.type.WEB_SEARCH";
+                            break;
+                        }
+
+                    case RecognitionType.Map:
+                        {
+                            recType = "stt.recognition.type.MAP";
+                            break;
+                        }
+
+                }
+
+                SttError error = SttStart(_handle, language, recType);
+                if (error != SttError.None)
+                {
+                    Log.Error(LogTag, "Start Failed with error " + error);
+                    throw ExceptionFactory.CreateException(error);
+                }
+            }
+        }
+
+        /// <summary>
+        /// Finishes the recording and starts recognition processing in engine asynchronously.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        /// <privilege>
+        /// http://tizen.org/privilege/recorder
+        /// </privilege>
+        /// <feature>
+        /// http://tizen.org/feature/speech.recognition
+        /// http://tizen.org/feature/microphone
+        /// </feature>
+        /// <exception cref="InvalidOperationException">
+        /// This Exception can be due to the following reasons
+        /// 1. Invalid State.
+        /// 2. Operation Failed.
+        /// 3. Progress to ready is not finished.
+        /// 4. Progress to recording is not finished.
+        /// 5. Progress to processing is not finished.
+        /// </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to STT Not Supported. </exception>
+        /// <exception cref="UnauthorizedAccessException"> This Exception can be due to Permission Denied. </exception>
+        /// <pre>
+        /// The state should be Recording.
+        /// </pre>
+        /// <post>
+        /// It will invoke StateChanged Event if registered.
+        /// If this function succeeds, the STT state will be Processing.
+        /// If you call this function again before state changes, you will receive ErrorINProgressToProcessing.
+        /// After processing of engine, RecognitionResult event is invoked
+        /// </post>
+        public void Stop()
+        {
+            lock (thisLock)
+            {
+                SttError error = SttStop(_handle);
+                if (error != SttError.None)
+                {
+                    Log.Error(LogTag, "Stop Failed with error " + error);
+                    throw ExceptionFactory.CreateException(error);
+                }
+            }
+        }
+
+        /// <summary>
+        /// Cancels processing recognition and recording asynchronously.
+        /// This function cancels recording and engine cancels recognition processing.
+        /// After successful cancel, StateChanged event is invoked otherwise if error is occurred, ErrorOccurred event is invoked.
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        /// <privilege>
+        /// http://tizen.org/privilege/recorder
+        /// </privilege>
+        /// <feature>
+        /// http://tizen.org/feature/speech.recognition
+        /// http://tizen.org/feature/microphone
+        /// </feature>
+        /// <exception cref="InvalidOperationException">
+        /// This Exception can be due to the following reasons
+        /// 1. Invalid State.
+        /// 2. Operation Failed.
+        /// 3. Progress to ready is not finished.
+        /// 4. Progress to recording is not finished.
+        /// 5. Progress to processing is not finished.
+        /// </exception>
+        /// <exception cref="NotSupportedException"> This Exception can be due to STT Not Supported. </exception>
+        /// <exception cref="UnauthorizedAccessException"> This Exception can be due to Permission Denied. </exception>
+        /// <pre>
+        /// The state should be Recording or Processing.
+        /// </pre>
+        /// <post>
+        /// It will invoke StateChanged Event if registered.
+        /// If this function succeeds, the STT state will be Ready.
+        /// If you call this function again before state changes, you will receive ErrorINProgressToReady.
+        /// </post>
+        public void Cancel()
+        {
+            lock (thisLock)
+            {
+                SttError error = SttCancel(_handle);
+                if (error != SttError.None)
+                {
+                    Log.Error(LogTag, "Cancel Failed with error " + error);
+                    throw ExceptionFactory.CreateException(error);
+                }
+            }
+        }
+
+        /// <summary>
+        /// Method to release resources
+        /// </summary>
+        public void Dispose()
+        {
+            Dispose(true);
+        }
+
+        protected virtual void Dispose(bool disposing)
+        {
+            if (!disposedValue)
+            {
+                if (disposing)
+                {
+                    SttError error = SttDestroy(_handle);
+                    if (error != SttError.None)
+                    {
+                        Log.Error(LogTag, "Destroy Failed with error " + error);
+                    }
+                }
+
+                disposedValue = true;
+            }
+        }
+    }
+}
diff --git a/src/Tizen.Uix.Stt/Tizen.Uix.Stt/SupportedEngine.cs b/src/Tizen.Uix.Stt/Tizen.Uix.Stt/SupportedEngine.cs
new file mode 100755 (executable)
index 0000000..d2129e8
--- /dev/null
@@ -0,0 +1,64 @@
+/*
+* Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
+*
+* Licensed under the Apache License, Version 2.0 (the License);
+* you may not use this file except in compliance with the License.
+* You may obtain a copy of the License at
+*
+* http://www.apache.org/licenses/LICENSE-2.0
+*
+* Unless required by applicable law or agreed to in writing, software
+* distributed under the License is distributed on an AS IS BASIS,
+* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+* See the License for the specific language governing permissions and
+* limitations under the License.
+*/
+
+
+namespace Tizen.Uix.Stt
+{
+    /// <summary>
+    /// This Class provideds the Information related to STT Engine.
+    /// </summary>
+    /// <since_tizen> 3 </since_tizen>
+    public class SupportedEngine
+    {
+        private string _engineId;
+        private string _engineName;
+
+        internal SupportedEngine(string id, string name)
+        {
+            this._engineId = id;
+            this._engineName = name;
+        }
+        /// <summary>
+        /// The Engine Id
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        /// <returns>
+        /// The string Engine Id
+        /// </returns>
+        public string EngineId
+        {
+            get
+            {
+                return _engineId;
+            }
+        }
+
+        /// <summary>
+        /// The Engine Name
+        /// </summary>
+        /// <since_tizen> 3 </since_tizen>
+        /// <returns>
+        /// The string Engine Name
+        /// </returns>
+        public string EngineName
+        {
+            get
+            {
+                return _engineName;
+            }
+        }
+    }
+}