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 1.9KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
  1. /*
  2. * Copyright (C) 2005 to 2007 by Jonathan Duddington
  3. * email: [email protected]
  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. #ifdef __cplusplus
  22. extern "C"
  23. {
  24. #endif
  25. #if defined(BYTE_ORDER) && BYTE_ORDER == BIG_ENDIAN
  26. #define ARCH_BIG
  27. #endif
  28. #ifdef __QNX__
  29. #define NO_VARIADIC_MACROS
  30. #endif
  31. #if defined(_WIN32) || defined(_WIN64) // Windows
  32. #define PLATFORM_WINDOWS
  33. #define PATHSEP '\\'
  34. #define N_PATH_HOME 230
  35. #define NO_VARIADIC_MACROS
  36. #else
  37. #define PLATFORM_POSIX
  38. #define PATHSEP '/'
  39. #define N_PATH_HOME 160
  40. #define USE_NANOSLEEP
  41. #define __cdecl
  42. #endif
  43. // will look for espeak_data directory here, and also in user's home directory
  44. #ifndef PATH_ESPEAK_DATA
  45. #define PATH_ESPEAK_DATA "/usr/share/espeak-ng-data"
  46. #endif
  47. typedef unsigned short USHORT;
  48. typedef unsigned char UCHAR;
  49. typedef double DOUBLEX;
  50. typedef struct {
  51. const char *mnem;
  52. int value;
  53. } MNEM_TAB;
  54. int LookupMnem(MNEM_TAB *table, const char *string);
  55. const char *LookupMnemName(MNEM_TAB *table, const int value);
  56. void cancel_audio(void);
  57. extern char path_home[N_PATH_HOME]; // this is the espeak-ng-data directory
  58. extern ESPEAK_NG_API void strncpy0(char *to, const char *from, int size);
  59. extern ESPEAK_NG_API int GetFileLength(const char *filename);
  60. #ifdef __cplusplus
  61. }
  62. #endif
  63. #endif // SPEECH_H