voicedata->guide_text_timer = NULL;
elm_object_part_text_set(voicedata->layout_main, "elm.text", "");
- set_guide_text(voicedata, SK_TAP_TO_PAUSE, true);
+
+ if(voicedata->sttmanager->GetCurrent() == STT_STATE_RECORDING || voicedata->sttmanager->GetCurrent() == STT_STATE_PROCESSING)
+ set_guide_text(voicedata, SK_TAP_TO_PAUSE, true);
return ECORE_CALLBACK_CANCEL;
}
VoiceData *voicedata = (VoiceData *)data;
if (!voicedata) return;
- edje_object_signal_emit(_EDJ(voicedata->layout_main), "mouse,clicked,1", "background");
+ if (voicedata->sttmanager != NULL &&
+ (voicedata->sttmanager->GetCurrent() == STT_STATE_RECORDING
+ || voicedata->sttmanager->GetCurrent() == STT_STATE_PROCESSING)) {
+ try {
+ voicedata->state = STT_STATE_VAL_INIT;
+ voicedata->sttmanager->Stop();
+ }
+ catch (is::stt::SttException &e) {
+ }
+
+ if (voicedata->effector)
+ voicedata->effector->Stop(true);
+
+ if (NULL != voicedata->start_timer) {
+ ecore_timer_del(voicedata->start_timer);
+ voicedata->start_timer = NULL;
+ }
+ if (NULL != voicedata->guide_text_timer) {
+ ecore_timer_del(voicedata->guide_text_timer);
+ voicedata->guide_text_timer = NULL;
+ }
+ if (NULL != voicedata->init_timer) {
+ ecore_timer_del(voicedata->init_timer);
+ voicedata->init_timer = NULL;
+ }
+ if (NULL != voicedata->refresh_timer) {
+ ecore_timer_del(voicedata->refresh_timer);
+ voicedata->refresh_timer = NULL;
+ }
+ set_guide_text(voicedata, SK_SPEAK_NOW, true);
+ } else {
+ edje_object_signal_emit(_EDJ(voicedata->layout_main), "mouse,clicked,1", "background");
+ }
}
static Eina_Bool _mic_button_enable_cb(void *data)
set_guide_text(voicedata, SK_SPEAK_NOW, true);
if (voicedata->effector)
- voicedata->effector->Start();
+ voicedata->effector->Stop(true);
} else if (voicedata->state == STT_STATE_VAL_PROCESSING) {
set_guide_text(voicedata, "");
{
LOGD("on_initial_anim_press_cb");
VoiceData *vd = (VoiceData *)data;
+ if (vd == NULL)
+ return;
int tempVal = vd->sttmanager->GetCurrent();
if (tempVal == STT_STATE_CREATED) {
}
catch (is::stt::SttException &e) {
}
+ if (vd->effector)
+ vd->effector->Stop(true);
break;