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

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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 <espeak-ng/espeak_ng.h>
  22. #include "mbrola.h"
  23. #ifdef __cplusplus
  24. extern "C"
  25. {
  26. #endif
  27. #if defined(BYTE_ORDER) && BYTE_ORDER == BIG_ENDIAN
  28. #define ARCH_BIG
  29. #endif
  30. #ifdef __QNX__
  31. #define NO_VARIADIC_MACROS
  32. #endif
  33. #if defined(_WIN32) || defined(_WIN64) // Windows
  34. #define PLATFORM_WINDOWS
  35. #define PATHSEP '\\'
  36. #define N_PATH_HOME 230
  37. #define NO_VARIADIC_MACROS
  38. #else
  39. #define PLATFORM_POSIX
  40. #define PATHSEP '/'
  41. #define N_PATH_HOME 160
  42. #define USE_NANOSLEEP
  43. #define __cdecl
  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-ng-data"
  48. #endif
  49. typedef struct {
  50. const char *mnem;
  51. int value;
  52. } MNEM_TAB;
  53. int LookupMnem(MNEM_TAB *table, const char *string);
  54. const char *LookupMnemName(MNEM_TAB *table, const int value);
  55. void cancel_audio(void);
  56. extern char path_home[N_PATH_HOME]; // this is the espeak-ng-data directory
  57. extern ESPEAK_NG_API int GetFileLength(const char *filename);
  58. #ifdef __cplusplus
  59. }
  60. #endif
  61. #endif // SPEECH_H