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

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /***************************************************************************
  2. * Copyright (C) 2005 to 2007 by Jonathan Duddington *
  3. * email: [email protected] *
  4. * Copyright (C) 2013 Reece H. Dunn *
  5. * *
  6. * This program is free software; you can redistribute it and/or modify *
  7. * it under the terms of the GNU General Public License as published by *
  8. * the Free Software Foundation; either version 3 of the License, or *
  9. * (at your option) any later version. *
  10. * *
  11. * This program is distributed in the hope that it will be useful, *
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of *
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
  14. * GNU General Public License for more details. *
  15. * *
  16. * You should have received a copy of the GNU General Public License *
  17. * along with this program; if not, write see: *
  18. * <http://www.gnu.org/licenses/>. *
  19. ***************************************************************************/
  20. #ifndef SPEECH_H
  21. #define SPEECH_H
  22. #include <sys/types.h>
  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 _ESPEAKEDIT
  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 unsigned long long64; // use this for conversion between pointers and integers
  49. typedef struct {
  50. const char *mnem;
  51. int value;
  52. } MNEM_TAB;
  53. int LookupMnem(MNEM_TAB *table, const char *string);
  54. #ifdef PLATFORM_WINDOWS
  55. #define N_PATH_HOME 230
  56. #else
  57. #define N_PATH_HOME 160
  58. #endif
  59. extern char path_home[N_PATH_HOME]; // this is the espeak-data directory
  60. extern void strncpy0(char *to,const char *from, int size);
  61. int GetFileLength(const char *filename);
  62. char *Alloc(int size);
  63. void Free(void *ptr);
  64. #endif // SPEECH_H