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.8KB

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