speech.h 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. /*
  2. * Copyright (C) 2005 to 2007 by Jonathan Duddington
  3. * email: jonsd@users.sourceforge.net
  4. * Copyright (C) 2013-2015 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, see: <http://www.gnu.org/licenses/>.
  18. */
  19. #ifndef SPEECH_H
  20. #define SPEECH_H
  21. #if defined(BYTE_ORDER) && BYTE_ORDER == BIG_ENDIAN
  22. #define ARCH_BIG
  23. #endif
  24. #ifdef __QNX__
  25. #define NO_VARIADIC_MACROS
  26. #endif
  27. #undef INCLUDE_MBROLA
  28. #undef PLATFORM_POSIX
  29. #undef PLATFORM_WINDOWS
  30. #undef USE_NANOSLEEP
  31. #define PATHSEP '/'
  32. #define N_PATH_HOME 230
  33. // used in synthesize.h and voice.h
  34. #define N_PEAKS 9
  35. #define N_PEAKS2 9 // plus Notch and Fill (not yet implemented)
  36. #ifndef DATA_FROM_SOURCECODE_FILES
  37. #define DATA_FROM_SOURCECODE_FILES 1
  38. #endif
  39. #if DATA_FROM_SOURCECODE_FILES
  40. #include "espeak_io.h"
  41. #else
  42. #define PATH_ESPEAK_DATA "/usr/share/espeak-ng-data"
  43. extern ESPEAK_NG_API int GetFileLength(const char *filename);
  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, const char *string);
  53. const char *LookupMnemName(MNEM_TAB *table, const int value);
  54. void cancel_audio(void);
  55. extern char path_home[N_PATH_HOME]; // this is the espeak-ng-data directory
  56. extern ESPEAK_NG_API void strncpy0(char *to, const char *from, int size);
  57. #endif // SPEECH_H