eSpeak NG is an open source speech synthesizer that supports more than hundred languages and accents.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

speech.h 2.7KB

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