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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495
  1. /***************************************************************************
  2. * Copyright (C) 2005 to 2007 by Jonathan Duddington *
  3. * email: [email protected] *
  4. * *
  5. * This program is free software; you can redistribute it and/or modify *
  6. * it under the terms of the GNU General Public License as published by *
  7. * the Free Software Foundation; either version 3 of the License, or *
  8. * (at your option) any later version. *
  9. * *
  10. * This program is distributed in the hope that it will be useful, *
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of *
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
  13. * GNU General Public License for more details. *
  14. * *
  15. * You should have received a copy of the GNU General Public License *
  16. * along with this program; if not, write see: *
  17. * <http://www.gnu.org/licenses/>. *
  18. ***************************************************************************/
  19. #include <sys/types.h>
  20. // conditional compilation options
  21. #if defined(BYTE_ORDER) && BYTE_ORDER == BIG_ENDIAN
  22. #define ARCH_BIG
  23. #endif
  24. #define PLATFORM_DOS
  25. #define NEED_WCHAR_FUNCTIONS
  26. #define NEED_GETOPT
  27. typedef unsigned int uint32_t;
  28. #define PATHSEP '\\'
  29. //#define USE_PORTAUDIO
  30. #define USE_NANOSLEEP
  31. #define __cdecl
  32. #define ESPEAK_API extern "C"
  33. #ifdef LIBRARY
  34. #define USE_ASYNC
  35. //#define USE_MBROLA_LIB
  36. #endif
  37. #ifdef _ESPEAKEDIT
  38. #define USE_ASYNC
  39. #define LOG_FRAMES // write keyframe info to log-espeakedit
  40. #endif
  41. // will look for espeak_data directory here, and also in user's home directory
  42. #ifndef PATH_ESPEAK_DATA
  43. #define PATH_ESPEAK_DATA "/usr/share/espeak-data"
  44. #endif
  45. #ifdef PLATFORM_DOS
  46. int iswalpha(int c);
  47. int iswdigit(int c);
  48. int iswalnum(int c);
  49. int towlower(int c);
  50. int iswupper(int c);
  51. int iswlower(int c);
  52. int iswspace(int c);
  53. int iswpunct(int c);
  54. const wchar_t *wcschr(const wchar_t *str, int c);
  55. const int wcslen(const wchar_t *str);
  56. float wcstod(const wchar_t *str, wchar_t **tailptr);
  57. int towupper(int c);
  58. #endif
  59. typedef unsigned short USHORT;
  60. typedef unsigned char UCHAR;
  61. typedef double DOUBLEX;
  62. typedef struct {
  63. const char *mnem;
  64. int value;
  65. } MNEM_TAB;
  66. int LookupMnem(MNEM_TAB *table, char *string);
  67. #define N_PATH_HOME 120
  68. extern char path_home[N_PATH_HOME]; // this is the espeak-data directory
  69. extern void strncpy0(char *to,const char *from, int size);
  70. int GetFileLength(const char *filename);
  71. char *Alloc(int size);
  72. void Free(void *ptr);