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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
  1. /***************************************************************************
  2. * Copyright (C) 2005,2006 by Jonathan Duddington *
  3. * [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 2 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 to the *
  17. * Free Software Foundation, Inc., *
  18. * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
  19. ***************************************************************************/
  20. #ifndef SPEECH_H
  21. #define SPEECH_H
  22. #define LOG_FRAMES // write keyframe info to src/log
  23. // comment this out when compiling the "speak" process
  24. //#define SPECT_EDITOR
  25. #define INCLUDE_KLATT
  26. #define INCLUDE_MBROLA
  27. #define INCLUDE_SONIC
  28. #define _ESPEAKEDIT
  29. #include <windows.h>
  30. #define PLATFORM_WINDOWS
  31. #define __WIN32__
  32. #define mkdir(p1,p2) mkdir(p1)
  33. #define PATHSEP '\\'
  34. //#define USE_PORTAUDIO
  35. //#define USE_NANOSLEEP
  36. #define NO_VARIADIC_MACROS
  37. #define __cdecl
  38. #define PATH_ESPEAK_DATA "C:\\Program files\\espeak\\espeak-data"
  39. typedef unsigned short USHORT;
  40. typedef unsigned char UCHAR;
  41. typedef double DOUBLEX;
  42. #ifdef __WIN64__
  43. typedef uint64_t long64; // use this for conversion between pointers and integers
  44. #else
  45. typedef unsigned long long64;
  46. #endif
  47. typedef struct {
  48. const char *mnem;
  49. int value;
  50. } MNEM_TAB;
  51. int LookupMnem(MNEM_TAB *table, const char *string);
  52. #define N_PATH_HOME 120
  53. extern char path_home[N_PATH_HOME]; // this is the espeak-data directory
  54. extern void strncpy0(char *to,const char *from, int size);
  55. int GetFileLength(const char *filename);
  56. char *Alloc(int size);
  57. void Free(void *ptr);
  58. #endif SPEECH_H