Navit SVN

/work/compile/navit/src/navit/support/espeak/speech.h

00001 /***************************************************************************
00002  *   Copyright (C) 2005 to 2007 by Jonathan Duddington                     *
00003  *   email: jonsd@users.sourceforge.net                                    *
00004  *                                                                         *
00005  *   This program is free software; you can redistribute it and/or modify  *
00006  *   it under the terms of the GNU General Public License as published by  *
00007  *   the Free Software Foundation; either version 3 of the License, or     *
00008  *   (at your option) any later version.                                   *
00009  *                                                                         *
00010  *   This program is distributed in the hope that it will be useful,       *
00011  *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
00012  *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
00013  *   GNU General Public License for more details.                          *
00014  *                                                                         *
00015  *   You should have received a copy of the GNU General Public License     *
00016  *   along with this program; if not, write see:                           *
00017  *               <http://www.gnu.org/licenses/>.                           *
00018  ***************************************************************************/
00019 
00020 
00021 #include <sys/types.h>
00022 
00023 // conditional compilation options
00024 #define INCLUDE_KLATT
00025 
00026 #if defined(BYTE_ORDER) && BYTE_ORDER == BIG_ENDIAN
00027 #define ARCH_BIG
00028 #endif
00029 
00030 /* #define PLATFORM_POSIX */
00031 #define PATHSEP  '/'
00032 // USE_PORTAUDIO or USE_PULSEAUDIO are now defined in the makefile
00033 //#define USE_PORTAUDIO
00034 //#define USE_PULSEAUDIO
00035 #define USE_NANOSLEEP
00036 //#define ESPEAK_API  extern "C"
00037 
00038 #ifdef LIBRARY
00039 #define USE_ASYNC
00040 //#define USE_MBROLA_LIB
00041 #endif
00042 
00043 #ifdef _ESPEAKEDIT
00044 #define USE_PORTAUDIO
00045 #define USE_ASYNC
00046 #define LOG_FRAMES      // write keyframe info to log-espeakedit
00047 #endif
00048 
00049 // will look for espeak_data directory here, and also in user's home directory
00050 #ifndef PATH_ESPEAK_DATA
00051    #define PATH_ESPEAK_DATA  "/usr/share/espeak-data"
00052 #endif
00053 
00054 typedef unsigned short USHORT;
00055 typedef unsigned char  UCHAR;
00056 typedef double DOUBLEX;
00057 
00058 
00059 
00060 
00061 typedef struct {
00062    const char *mnem;
00063    int  value;
00064 } MNEM_TAB;
00065 int LookupMnem(MNEM_TAB *table, char *string);
00066 
00067 
00068 #ifdef PLATFORM_WINDOWS
00069 #define N_PATH_HOME  220
00070 #define ESPEAK_API
00071 #else
00072 #define N_PATH_HOME  150
00073 #define ESPEAK_API  extern "C"
00074 #endif
00075 
00076 extern char path_home[N_PATH_HOME];    // this is the espeak-data directory
00077 
00078 extern void strncpy0(char *to,const char *from, int size);
00079 int  GetFileLength(const char *filename);
00080 char *Alloc(int size);
00081 void Free(void *ptr);
00082