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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586
  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 LIBRARY
  39. #define USE_ASYNC
  40. #endif
  41. #ifdef _ESPEAKEDIT
  42. #define USE_ASYNC
  43. #define LOG_FRAMES // write keyframe info to log-espeakedit
  44. #endif
  45. // will look for espeak_data directory here, and also in user's home directory
  46. #ifndef PATH_ESPEAK_DATA
  47. #define PATH_ESPEAK_DATA "/usr/share/espeak-data"
  48. #endif
  49. typedef unsigned short USHORT;
  50. typedef unsigned char UCHAR;
  51. typedef double DOUBLEX;
  52. typedef unsigned long long64; // use this for conversion between pointers and integers
  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 230
  60. #else
  61. #define N_PATH_HOME 160
  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);
  68. #endif // SPEECH_H