Tizen 2.0 Release
[platform/core/uifw/libttssmt.git] / src / SMTApis.h
1 /*\r
2  * Samsung TTS\r
3  * Copyright 2012  Samsung Electronics Co., Ltd\r
4  *\r
5  * Licensed under the Flora License, Version 1.0 (the License);\r
6  * you may not use this file except in compliance with the License.\r
7  * You may obtain a copy of the License at\r
8  *\r
9  * http://floralicense.org/license/\r
10  *\r
11  * Unless required by applicable law or agreed to in writing, software\r
12  * distributed under the License is distributed on an AS IS BASIS,\r
13  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
14  * See the License for the specific language governing permissions and\r
15  * limitations under the License.\r
16  */\r
17 \r
18 #ifndef   _SMTAPIS_H_\r
19 #define   _SMTAPIS_H_\r
20 \r
21 \r
22 #ifdef __cplusplus\r
23 extern "C" {\r
24 #endif\r
25 \r
26 \r
27 typedef enum _eTypeLanguage\r
28 {\r
29   eLANGUAGE_BEGIN       = 0x00000000,\r
30 \r
31   eKOREAN               = eLANGUAGE_BEGIN, // Çѱ¹¾î\r
32 \r
33   eUSENGLISH            = 0x00000100,      // ¹Ì±¹¿µ¾î\r
34   eUSENGLISH_OLD        = 0x0000010F,\r
35   eGBENGLISH            = 0x00000110,      // ¿µ±¹¿µ¾î\r
36   eGBENGLISH_OLD        = 0x0000011F,\r
37   eINENGLISH            = 0x00000120,      // Àεµ¿µ¾î\r
38 \r
39   eCHINESE              = 0x00000200,      // Áß±¹¾î(ºÏ°æ¾î)\r
40   eTAIWANESE            = 0x00000210,      // ´ë¸¸¾î\r
41   eCANTONESE            = 0x00000220,      // ±¤µ¿¾î(È«Äá¾î)\r
42 \r
43   eGERMAN               = 0x00000300,      // µ¶ÀϾî\r
44   eGERMAN_OLD           = 0x0000030F,\r
45   eSPANISH              = 0x00000400,      // ½ºÆäÀξî\r
46   eSPANISH_OLD          = 0x0000040F,\r
47   eFRENCH               = 0x00000500,      // ÇÁ¶û½º¾î\r
48   eFRENCH_OLD           = 0x0000050F,\r
49   eITALIAN              = 0x00000600,      // ÀÌÅ»¸®¾Æ¾î\r
50   eITALIAN_OLD          = 0x0000060F,\r
51   eDUTCH                = 0x00000700,      // ³×´ú¶õµå¾î\r
52   ePORTUGUESE           = 0x00000800,      // Æ÷¸£ÅõÄ®¾î\r
53   eGREEK                = 0x00000900,      // ±×¸®½º¾î\r
54   eTURKISH              = 0x00000A00,      // ÅÍÅ°¾î\r
55 \r
56   eRUSSIAN              = 0x00000B00,      // ·¯½Ã¾Æ¾î\r
57 \r
58   eJAPANESE             = 0x00000C00,      // ÀϺ»¾î\r
59   eJAPANESE_OLD         = 0x00000C0F,\r
60 \r
61   ///////////////////////////////////////////\r
62   eDICTIONARY_USENGLISH = 0x10000100,      // ¿µ¾î»çÀü\r
63 \r
64   eLANGUAGE_END,\r
65   eLANGUAGE_INVALID     = eLANGUAGE_END,\r
66 } eTypeLanguage;\r
67 \r
68 \r
69 #define SMT_SUCCESS                    0\r
70 #define SMT_SYNTHESIS_FRAME_GENERATED  0\r
71 #define SMT_SYNTHESIS_ALL_DONE         1\r
72 #define SMT_SYNTHESIS_SENTENCE_DONE    2\r
73 #define SMT_SYNTHESIS_PAUSE_DONE       3\r
74 \r
75 int SMTInitialize(void);\r
76 int SMTFinalize(void);\r
77 int SMTSet_Language(eTypeLanguage eLanguage, int VoiceType, int ModelFileLocation);\r
78 int SMTInputText(char const * const pszText_UTF8);\r
79 int SMTSynthesize(short * const pPcmBuffer);\r
80 \r
81 int  SMTGetFramePeriod (void);\r
82 \r
83 \r
84 typedef enum\r
85 {\r
86   eSMTSpeechSpeed_VerySlow,\r
87   eSMTSpeechSpeed_Slow,\r
88   eSMTSpeechSpeed_Normal,\r
89   eSMTSpeechSpeed_Fast,\r
90   eSMTSpeechSpeed_VeryFast,\r
91 } etypeSpeechSpeed;\r
92 \r
93 void SMTSetSpeechSpeed(etypeSpeechSpeed const speed);\r
94 \r
95 int SMTSaveWave(char* pszFileName, short* pOutData, int const nDataSize);\r
96 \r
97 #ifdef __cplusplus\r
98 }\r
99 #endif\r
100 \r
101 #endif //_SMTAPIS_H_\r
102 \r
103 \r