PageRenderTime 23ms CodeModel.GetById 20ms app.highlight 1ms RepoModel.GetById 1ms app.codeStats 0ms

/Libraries/speech.h

http://espeak-engine.googlecode.com/
C Header | 87 lines | 44 code | 20 blank | 23 comment | 2 complexity | 45953139d3cdf5c491fd8ac273431214 MD5 | raw file
 1/***************************************************************************
 2 *   Copyright (C) 2005 to 2007 by Jonathan Duddington                     *
 3 *   email: jonsd@users.sourceforge.net                                    *
 4 *                                                                         *
 5 *   This program is free software; you can redistribute it and/or modify  *
 6 *   it under the terms of the GNU General Public License as published by  *
 7 *   the Free Software Foundation; either version 3 of the License, or     *
 8 *   (at your option) any later version.                                   *
 9 *                                                                         *
10 *   This program is distributed in the hope that it will be useful,       *
11 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
12 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
13 *   GNU General Public License for more details.                          *
14 *                                                                         *
15 *   You should have received a copy of the GNU General Public License     *
16 *   along with this program; if not, write see:                           *
17 *               <http://www.gnu.org/licenses/>.                           *
18 ***************************************************************************/
19
20
21#include <sys/types.h>
22
23// conditional compilation options
24#define INCLUDE_KLATT
25#define INCLUDE_MBROLA
26
27#if defined(BYTE_ORDER) && BYTE_ORDER == BIG_ENDIAN
28#define ARCH_BIG
29#endif
30
31#ifdef __QNX__
32#define NEED_GETOPT
33#define NO_VARIADIC_MACROS
34#endif
35
36
37#define PLATFORM_POSIX
38#define PATHSEP  '/'
39// USE_PORTAUDIO or USE_PULSEAUDIO are now defined in the makefile
40//#define USE_PORTAUDIO
41//#define USE_PULSEAUDIO
42#define USE_NANOSLEEP
43#define __cdecl 
44#define ESPEAK_API  extern "C"
45
46#ifdef LIBRARY
47#define USE_ASYNC
48#endif
49
50#ifdef _ESPEAKEDIT
51#define USE_PORTAUDIO
52#define USE_ASYNC
53#define LOG_FRAMES      // write keyframe info to log-espeakedit
54#endif
55
56// will look for espeak_data directory here, and also in user's home directory
57#ifndef PATH_ESPEAK_DATA
58   #define PATH_ESPEAK_DATA  "/usr/share/espeak-data"
59#endif
60
61typedef unsigned short USHORT;
62typedef unsigned char  UCHAR;
63typedef double DOUBLEX;
64
65
66
67
68typedef struct {
69   const char *mnem;
70   int  value;
71} MNEM_TAB;
72int LookupMnem(MNEM_TAB *table, const char *string);
73
74
75#ifdef PLATFORM_WINDOWS
76#define N_PATH_HOME  220
77#else
78#define N_PATH_HOME  150
79#endif
80
81extern char path_home[N_PATH_HOME];    // this is the espeak-data directory
82
83extern void strncpy0(char *to,const char *from, int size);
84int  GetFileLength(const char *filename);
85char *Alloc(int size);
86void Free(void *ptr);
87