Fix STT/TTS guides (Coding Convention) 32/157132/3
authorsooyeon.kim <sooyeon.kim@samsung.com>
Mon, 23 Oct 2017 11:26:08 +0000 (20:26 +0900)
committersooyeon.kim <sooyeon.kim@samsung.com>
Wed, 25 Oct 2017 05:37:35 +0000 (14:37 +0900)
Change-Id: Icd62007e8b322fadd74d5a1c25d14eda10520e29
Signed-off-by: sooyeon.kim <sooyeon.kim@samsung.com>
org.tizen.guides/html/dotnet/uix/stt_n.htm
org.tizen.guides/html/dotnet/uix/tts_n.htm

index 2ab7cf7..9e34954 100755 (executable)
@@ -128,7 +128,7 @@ using Tizen.Uix.Stt;
     </div>
 
 <pre class="prettyprint">
-void create_stt_handle()
+void CreateSttClient()
 {
     try
     {
@@ -143,7 +143,7 @@ void create_stt_handle()
 <li>When you no longer need the STT library, destroy the STT client instance with the <code>Dispose()</code> method:
 
 <pre class="prettyprint">
-void destroy_stt_handle()
+void DestroySttClient()
 {
     try
     {
@@ -312,7 +312,7 @@ void SetUnsetErrorOccurredCb()
 <li>Retrieve the current STT state by using the <code>CurrentState</code> property of the <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Uix_1_1Stt_1_1SttClient.html">Tizen.Uix.Stt.SttClient</a> class.
 <p>The STT state is changed by various STT methods, and it is applied as a precondition for each method.</p>
 <pre class="prettyprint">
-void get_state()
+void GetState()
 {
     State current_state;
     current_state = SttClient.CurrentState;
@@ -322,7 +322,7 @@ void get_state()
 
 <li>Retrieve a list of languages supported by STT by using the <code>GetSupportedLanguages()</code> method:
 <pre class="prettyprint">
-void get_supported_language()
+void GetSupportedLanguage()
 {
     try
     {
@@ -338,11 +338,11 @@ void get_supported_language()
 
 <li>Retrieve the default language by using the <code>DefaultLanguage</code> property of the <code>Tizen.Uix.Stt.SttClient</code> class:
 <pre class="prettyprint">
-void get_default_language()
+void GetDefaultLanguage()
 {
     try
     {
-        char* default_lang = stt_inst.DefaultLanguage;
+        string default_lang = stt_inst.DefaultLanguage;
     }
     catch (Exception e)
     {
@@ -355,7 +355,7 @@ void get_default_language()
 
 <li>Retrieve a list of engines supported by STT by using the <code>GetSupportedEngines()</code> method of the <code>Tizen.Uix.Stt.SttClient</code> class:
 <pre class="prettyprint">
-void get_supported_engine()
+void GetSupportedEngine()
 {
     try
     {
@@ -372,11 +372,11 @@ void get_supported_engine()
 <li>Retrieve or set the current engine for STT recognition by using the <code>Engine</code> property of the <code>Tizen.Uix.Stt.SttClient</code> class.
 <p>The supported language, silence detection, and supported recognition types depend on the STT engine.</p>
 <pre class="prettyprint">
-void set_get_current_engine()
+void SetGetCurrentEngine()
 {
     try
     {
-        char* current_engine_id = "stt-engine-default";
+        string current_engine_id = "stt-engine-default";
 
         /// Set the current engine
         stt_inst.Engine = current_engine_id;
@@ -395,7 +395,7 @@ void set_get_current_engine()
 <li>Check whether a recognition type is supported by the current engine, by using the <code>IsRecognitionTypeSupported()</code> method of the <code>Tizen.Uix.Stt.SttClient</code> class. Use the values of the <a href="https://developer.tizen.org/dev-guide/csapi/namespaceTizen_1_1Uix_1_1Stt.html#ac1db24f537270666b848a16be6fd4924">Tizen.Uix.Stt.RecognitionType</a> enumeration as a parameter.
 <p>The normal recognition type, <code>Stt.RecognitionType.Free</code>, means that the whole recognition result is sent at the end of the recognition process. The <code>Stt.RecognitionType.Partial</code> recognition type is used to get a partial recognition result.</p>
 <pre class="prettyprint">
-void check_supported_recognition_type()
+void CheckSupportedRecognitionType()
 {
     try
     {
@@ -420,7 +420,7 @@ void check_supported_recognition_type()
 <p>The method is asynchronous and the STT state changes to <code>Ready</code>.</p>
 
 <pre class="prettyprint">
-void prepare_stt()
+void PrepareSttClient()
 {
     try
     {
@@ -441,7 +441,7 @@ void prepare_stt()
 <li>When the connection is no longer needed, disconnect STT and change the STT state to <code>Created</code>, by using the <code>Unprepare()</code> method:
 
 <pre class="prettyprint">
-void unprepared_stt()
+void UnprepareSttClient()
 {
     try
     {
@@ -463,7 +463,7 @@ void unprepared_stt()
 <li>Set the credential.
 <p>The credential is a key to verify the authorization for using the STT engine. The necessity of the credential depends on the engine. If the engine requests the credential, you can set it using the <code>SetCredential()</code> method of the <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Uix_1_1Stt_1_1SttClient.html">Tizen.Uix.Stt.SttClient</a> class:</p>
 <pre class="prettyprint">
-void set_credential(const char* credential)
+void SetCredential(string credential)
 {
     try
     {
@@ -486,7 +486,7 @@ void set_credential(const char* credential)
 </div>
 
 <pre class="prettyprint">
-void set_private_data(const char* key, const char* data)
+void SetPrivateData(string key, string data)
 {
     try
     {
@@ -500,7 +500,7 @@ void set_private_data(const char* key, const char* data)
 </pre>
 <p>To get the private data which corresponds to a specific key from the engine, use the <code>GetPrivateData()</code> method:</p>
 <pre class="prettyprint">
-void get_private_data(const char* key)
+void GetPrivateData(string key)
 {
     try
     {
@@ -525,7 +525,7 @@ void get_private_data(const char* key)
 <p>After STT starts recognizing sound, some STT engines can detect silence when the sound input from the user ends. If the silence detection is enabled, the STT library stops recognition automatically and sends the result. Otherwise, you can manually stop the recognition process using the <code>Stop()</code> method of the <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Uix_1_1Stt_1_1SttClient.html">Tizen.Uix.Stt.SttClient</a> class.</p>
 <p>To set the silence detection state, use the <code>SetSilenceDetection()</code> method, using values of the <a href="https://developer.tizen.org/dev-guide/csapi/namespaceTizen_1_1Uix_1_1Stt.html#a8f56945c7fc0173d2ef59a049f4216c2">Tizen.Uix.Stt.SilenceDetection</a> enumeration as a parameter. If you set the silence detection as <code>SilenceDetection.Auto</code>, STT works according to the global STT setting. This option must be set when STT is in the <code>Ready</code> state.</p>
 <pre class="prettyprint">
-void set_silence_detection(SilenceDetection type)
+void SetSilenceDetection(SilenceDetection type)
 {
     try
     {
@@ -549,7 +549,7 @@ void set_silence_detection(SilenceDetection type)
     </div>
 
 <pre class="prettyprint">
-void set_start_sound(string filename)
+void SetStartSound(string filename)
 {
     try
     {
@@ -563,7 +563,7 @@ void set_start_sound(string filename)
 </pre>
 <p>To unset the recording start sound, use the <code>UnsetStartSound()</code> method:</p>
 <pre class="prettyprint">
-void unset_start_sound()
+void UnsetStartSound()
 {
     try
     {
@@ -586,7 +586,7 @@ void unset_start_sound()
     </div>
 
 <pre class="prettyprint">
-void set_stop_sound(string filename)
+void SetStopSound(string filename)
 {
     try
     {
@@ -600,7 +600,7 @@ void set_stop_sound(string filename)
 </pre>
 <p>To unset the recording stop sound, use the <code>UnsetStopSound()</code> method:</p>
 <pre class="prettyprint">
-void unset_stop_sound()
+void UnsetStopSound()
 {
     try
     {
@@ -626,7 +626,7 @@ void unset_stop_sound()
                <p>The language and recognition type must be supported by the current STT engine. If you set <code>NULL</code> as the language parameter, the STT default language is used based on the <code>DefaultLanguage</code> property of the currently-used <code>Tizen.Uix.Stt.SttClient</code> class instance.</p>
 
 <pre class="prettyprint">
-void start(string language, RecognitionType type)
+void Start(string language, RecognitionType type)
 {
     try
     {
@@ -643,7 +643,7 @@ void start(string language, RecognitionType type)
 <li>While STT recording is in progress, you can retrieve the current recording volume using the <code>RecordingVolume</code> property of the <code>Tizen.Uix.Stt.SttClient</code> class.
 <p>The volume value is retrieved periodically with the short-term recorded sound data as dB (decibels). The STT volume normally has a negative value, and 0 is the maximum value.</p>
 <pre class="prettyprint">
-void get_volume()
+void GetVolume()
 {
     try
     {
@@ -661,7 +661,7 @@ void get_volume()
 <li>To stop the recording and get the recognition result, use the <code>Stop()</code> method.
 <p>The recording stops and the STT state is changed to <code>Processing</code>. When the recognition result has been processed, the <code>RecognitionResult</code> event triggers, and the state changes back to <code>Ready</code>.</p>
 <pre class="prettyprint">
-void stop()
+void Stop()
 {
     try
     {
@@ -677,7 +677,7 @@ void stop()
 <li>To cancel the recording without getting the result, use the <code>Cancel()</code> method.
 <p>The STT state changes to <code>Ready</code>.</p>
 <pre class="prettyprint">
-void cancel()
+void Cancel()
 {
     try
     {
index f1dd104..1960c82 100755 (executable)
@@ -137,7 +137,7 @@ using Tizen.Uix.Tts.TtsClient;
     </div>
 
 <pre class="prettyprint">
-void create_tts_handle()
+void CreateTtsClient()
 {
     try
     {
@@ -153,7 +153,7 @@ void create_tts_handle()
 <li>When you no longer need the TTS library, destroy the TTS handle by using the <code>Dispose()</code> method of the <code>Tizen.Uix.Tts.TtsClient</code> class:
 
 <pre class="prettyprint">
-void destroy_tts_handle()
+void DestroyTtsClient()
 {
     try
     {
@@ -331,7 +331,7 @@ void SetUnsetErrorOccurredCb()
 <li>Retrieve the current TTS state by using the <code>CurrentState</code> property of the <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Uix_1_1Tts_1_1TtsClient.html">Tizen.Uix.Tts.TtsClient</a> class.
 <p>The TTS state is changed by various TTS methods, and it is applied as a precondition for each method.</p>
 <pre class="prettyprint">
-void get_state()
+void GetState()
 {
     try
     {
@@ -348,7 +348,7 @@ void get_state()
 
 <li>Obtain a list of TTS-supported voices by using the <code>GetSupportedVoices()</code> method of the <code>Tizen.Uix.Tts.TtsClient</code> class:
 <pre class="prettyprint">
-void get_supported_voice()
+void GetSupportedVoice()
 {
     try
     {
@@ -366,7 +366,7 @@ void get_supported_voice()
 <li>Get the default voice by using the <code>DefaultVoice</code> property.
 <p>TTS synthesizes the text using the default voice, if you do not set the language and the voice type as parameters of the <code>AddText()</code> method of the <code>Tizen.Uix.Tts.TtsClient</code> class.</p>
 <pre class="prettyprint">
-void get_default_voice()
+void GetDefaultVoice()
 {
     try
     {
@@ -394,7 +394,7 @@ void get_default_voice()
 <p>Get and set the mode in the <code>Created</code> state:</p>
 
 <pre class="prettyprint">
-void set_mode(Mode mode)
+void SetMode(Mode mode)
 {
     try
     {
@@ -406,7 +406,7 @@ void set_mode(Mode mode)
     }
 }
 
-void get_mode(Mode* mode)
+void GetMode(Mode* mode)
 {
     try
     {
@@ -428,7 +428,7 @@ void get_mode(Mode* mode)
 <p>The daemon synthesizes the text with the engine and plays the resulting sound data. The method is asynchronous and the TTS state changes to <code>Ready</code>.</p>
 
 <pre class="prettyprint">
-void prepare_for_tts()
+void PrepareTtsClient()
 {
     try
     {
@@ -450,7 +450,7 @@ void prepare_for_tts()
 <li>When the connection is no longer needed, use the <code>Unprepare()</code> method to disconnect TTS and change the TTS state to <code>Created</code>:
 
 <pre class="prettyprint">
-void unprepared_for_tts()
+void UnprepareTtsClient()
 {
     try
     {
@@ -472,7 +472,7 @@ void unprepared_for_tts()
 <li>Set the credential.
 <p>The credential is a key to verify the authorization for using the TTS engine. The necessity of the credential depends on the engine. If the engine requests the credential, you can set it using the <code>SetCredential()</code> method of the <a href="https://developer.tizen.org/dev-guide/csapi/classTizen_1_1Uix_1_1Tts_1_1TtsClient.html">Tizen.Uix.Tts.TtsClient</a> class:</p>
 <pre class="prettyprint">
-void set_credential(const char* credential)
+void SetCredential(string credential)
 {
     try
     {
@@ -495,7 +495,7 @@ void set_credential(const char* credential)
 </div>
 
 <pre class="prettyprint">
-void set_private_data(const char* key, const char* data)
+void SetPrivateData(string key, string data)
 {
     try
     {
@@ -509,7 +509,7 @@ void set_private_data(const char* key, const char* data)
 </pre>
 <p>To get the private data which corresponds to a specific key from the engine, use the <code>GetPrivateData()</code> method:</p>
 <pre class="prettyprint">
-void get_private_data(const char* key)
+void GetPrivateData(string key)
 {
     try
     {
@@ -542,12 +542,12 @@ void get_private_data(const char* key)
 
 <p>You can add text to TTS at any point after the <code>Prepare()</code> method changes the TTS state to <code>Ready</code>.</p>
 <pre class="prettyprint">
-void add_text()
+void AddText()
 {
     try
     {
-        const char* text = "tutorial"; /// Text to be read
-        const char* language = "en_US"; /// Language
+        string text = "tutorial"; /// Text to be read
+        string language = "en_US"; /// Language
         int voice_type = Voice.Female; /// Voice type
         int speed = 0; /// Read speed; 0 for Auto
 
@@ -564,7 +564,7 @@ void add_text()
 <li>
 <p>There is a length limit for added text in the engine. To retrieve the maximum value, use the <code>MaxTextSize</code> property of the <code>Tizen.Uix.Tts.TtsClient</code> class in the <code>Ready</code> state:</p>
 <pre class="prettyprint">
-void get_maximum_text_size()
+void GetMaximumTextSize()
 {
     try
     {
@@ -594,7 +594,7 @@ void get_maximum_text_size()
   </div>
 
 <pre class="prettyprint">
-void start()
+void Start()
 {
     try
     {
@@ -610,7 +610,7 @@ void start()
 <li>To pause the playback, use the <code>Pause()</code> method.
 <p>The TTS state is changed to <code>Paused</code>. To resume playback, use the <code>Play()</code> method.</p>
 <pre class="prettyprint">
-void pause()
+void Pause()
 {
     try
     {
@@ -626,7 +626,7 @@ void pause()
 <li>To stop the playback, use the <code>Stop()</code> method.
 <p>All the texts in the queue are removed, and the TTS state is changed to <code>Ready</code>.</p>
 <pre class="prettyprint">
-void stop()
+void Stop()
 {
     try
     {