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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889
  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 ESPEAK_NG_SPEECH_H
  20. #define ESPEAK_NG_SPEECH_H
  21. #include <endian.h> // for BYTE_ORDER, BIG_ENDIAN
  22. #include <espeak-ng/espeak_ng.h>
  23. #if defined(__has_feature)
  24. # if __has_feature(memory_sanitizer)
  25. # include <sanitizer/msan_interface.h>
  26. # define MAKE_MEM_UNDEFINED(addr, len) __msan_unpoison(addr, len)
  27. # endif
  28. #endif
  29. #ifndef MAKE_MEM_UNDEFINED
  30. # if __has_include(<valgrind/memcheck.h>)
  31. # include <valgrind/memcheck.h>
  32. # define MAKE_MEM_UNDEFINED(addr, len) VALGRIND_MAKE_MEM_UNDEFINED(addr, len)
  33. # else
  34. # define MAKE_MEM_UNDEFINED(addr, len) ((void) ((void) addr, len))
  35. # endif
  36. #endif
  37. #ifdef __cplusplus
  38. extern "C"
  39. {
  40. #endif
  41. #if defined(BYTE_ORDER) && BYTE_ORDER == BIG_ENDIAN
  42. #define ARCH_BIG
  43. #endif
  44. #ifdef __QNX__
  45. #define NO_VARIADIC_MACROS
  46. #endif
  47. #if defined(_WIN32) || defined(_WIN64) // Windows
  48. #define PLATFORM_WINDOWS 1
  49. #define PATHSEP '\\'
  50. #define N_PATH_HOME_DEF 230
  51. #define NO_VARIADIC_MACROS
  52. #else
  53. #define PLATFORM_POSIX 1
  54. #define PATHSEP '/'
  55. #define N_PATH_HOME_DEF 160
  56. #define USE_NANOSLEEP
  57. #define __cdecl
  58. #endif
  59. #ifndef N_PATH_HOME
  60. #define N_PATH_HOME N_PATH_HOME_DEF
  61. #endif
  62. // will look for espeak_data directory here, and also in user's home directory
  63. #ifndef PATH_ESPEAK_DATA
  64. #define PATH_ESPEAK_DATA "/usr/share/espeak-ng-data"
  65. #endif
  66. void cancel_audio(void);
  67. extern char path_home[N_PATH_HOME]; // this is the espeak-ng-data directory
  68. #ifdef __cplusplus
  69. }
  70. #endif
  71. #endif // SPEECH_H