/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. #include <sys/types.h>
  20. // conditional compilation options
  21. #define INCLUDE_KLATT
  22. #define INCLUDE_MBROLA
  23. #if defined(BYTE_ORDER) && BYTE_ORDER == BIG_ENDIAN
  24. #define ARCH_BIG
  25. #endif
  26. #ifdef __QNX__
  27. #define NEED_GETOPT
  28. #define NO_VARIADIC_MACROS
  29. #endif
  30. #define PLATFORM_POSIX
  31. #define PATHSEP '/'
  32. // USE_PORTAUDIO or USE_PULSEAUDIO are now defined in the makefile
  33. //#define USE_PORTAUDIO
  34. //#define USE_PULSEAUDIO
  35. #define USE_NANOSLEEP
  36. #define __cdecl
  37. #define ESPEAK_API extern "C"
  38. #ifdef LIBRARY
  39. #define USE_ASYNC
  40. #endif
  41. #ifdef _ESPEAKEDIT
  42. #define USE_PORTAUDIO
  43. #define USE_ASYNC
  44. #define LOG_FRAMES // write keyframe info to log-espeakedit
  45. #endif
  46. // will look for espeak_data directory here, and also in user's home directory
  47. #ifndef PATH_ESPEAK_DATA
  48. #define PATH_ESPEAK_DATA "/usr/share/espeak-data"
  49. #endif
  50. typedef unsigned short USHORT;
  51. typedef unsigned char UCHAR;
  52. typedef double DOUBLEX;
  53. typedef struct {
  54. const char *mnem;
  55. int value;
  56. } MNEM_TAB;
  57. int LookupMnem(MNEM_TAB *table, const char *string);
  58. #ifdef PLATFORM_WINDOWS
  59. #define N_PATH_HOME 220
  60. #else
  61. #define N_PATH_HOME 150
  62. #endif
  63. extern char path_home[N_PATH_HOME]; // this is the espeak-data directory
  64. extern void strncpy0(char *to,const char *from, int size);
  65. int GetFileLength(const char *filename);
  66. char *Alloc(int size);
  67. void Free(void *ptr);