/native/external/espeak/src/speech.h

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