2 * Copyright (c) 2016 Samsung Electronics Co., Ltd All Rights Reserved
4 * Licensed under the Apache License, Version 2.0 (the License);
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
8 * http://www.apache.org/licenses/LICENSE-2.0
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an AS IS BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
18 #ifndef W_INPUT_STT_ENGINE_H_
19 #define W_INPUT_STT_ENGINE_H_
24 #include "SttFeedback.h"
25 #include "SttManager.h"
26 #include "MoreOption.h"
27 #include "MicEffector.h"
28 #include "WInputSttMicEffect.h"
37 typedef enum _SttStateVal {
38 STT_STATE_VAL_INIT = 0,
39 STT_STATE_VAL_PREPARE_LISTENING,
40 STT_STATE_VAL_LISTENING,
41 STT_STATE_VAL_PREPARE_PROCESSING,
42 STT_STATE_VAL_PROCESSING,
43 STT_STATE_VAL_PREPARE_CANCEL,
44 STT_STATE_VAL_NOT_RECOGNISED,
45 STT_STATE_VAL_TERMINATING,
49 typedef struct _VoiceDimension VoiceDimension;
50 typedef struct _VoiceData VoiceData;
52 struct _VoiceDimension {
53 int x; // X position of voice area
54 int y; // Y position of voice area
55 int width; // Width of voice area
56 int height; // Height of voice area
61 int voicefw_state; //0 means init failed else success
62 stt_h voicefw_handle; //Wonyoung Lee added
63 Evas_Object *naviframe; //main window
64 Evas_Object *layout_main; //layout
65 Evas_Object *progressbar; //progressbar
66 Evas_Object *scroller; //scroller
67 Evas_Object *main_entry; //entry
68 Evas_Object *mic_button; //MIC button
71 Ecore_Timer *start_timer;
72 Ecore_Timer *refresh_timer;
73 Ecore_Timer *progressbar_timer;
74 Ecore_Timer *textblock_timer;
75 Ecore_Timer *guide_text_timer;
76 Ecore_Timer *btn_disabling_timer;
77 Ecore_Timer *power_unlock_timer;
79 std::vector<std::string> stt_results;
87 is::stt::SttFeedback *sttfeedback;
88 is::stt::SttManager *sttmanager;
90 is::ui::WInputSttMicEffect *ieffect;
91 is::ui::MicEffector *effector;
94 typedef enum _Feedback_Type{
95 FEEDBACK_RECORDING = 0,
100 void set_animation_state(VoiceData *ud);
102 bool _app_stt_initialize(VoiceData *user_data);
106 void (*send_processed_string)(char *, int);
113 #endif /* W_INPUT_STT_ENGINE_H_ */