#include "w-input-stt-voice.h"
#include "w-input-stt-engine.h"
#include "w-input-stt-ise.h"
+#include "voice-recorder.h"
using namespace std;
PRINTFUNC(DLOG_DEBUG, "result_text = %s", result_text.c_str());
- reply_to_sender_by_callback(result_text.c_str(), "voice");
+ char *filePath = NULL;
+ voice_recorder *vr = _voice_recorder_get_data();
+ if (!vr)
+ filePath = vr->file_path;
+ char *path[] = {filePath, };
+ reply_to_sender_by_callback(result_text.c_str(), "voice", (const char **)path);
destroy_voice();
powerUnlock();
- elm_exit();
+ ui_app_exit();
return;
}
}
voicedata->start_timer = NULL;
}
+
+ start_voice_recorder();
+
return ECORE_CALLBACK_CANCEL;
}
char *__get_genlist_item_label(void *data, Evas_Object *obj, const char *part)
{
- char text[128] = {0, };
+ const int BUF_LEN = 128;
+ char text[BUF_LEN] = {'\0', };
if(!strcmp(part, "elm.text"))
{
if(p) {
strncpy(text, s, p-s);
} else {
- strncpy(text, s, strlen(s));
+ snprintf(text, BUF_LEN, "%s", s);
}
} else {
- strncpy(text, "", strlen(""));
+ snprintf(text, BUF_LEN, "%s", "");
}
}
return strdup(text);
if(p) {
strncpy(text, p+1, strlen(s)-(p-s)-2);
} else {
- strncpy(text, s, strlen(s));
- text[strlen(s)] = '\0';
+ snprintf(text, BUF_LEN, "%s", s);
}
} else {
- strncpy(text, "", strlen(""));
+ snprintf(text, BUF_LEN, "%s", "");
}
return strdup(text);
}
voicedata->textblock_timer = NULL;
}
+ init_voice_recorder(NULL);
+
return TRUE;
}