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

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  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. #define LOG_FRAMES // write keyframe info to src/log
  21. #define N_PEAKS 9
  22. #define N_MARKERS 8
  23. // comment this out when compiling the "speak" process
  24. //#define SPECT_EDITOR
  25. #include <windows.h>
  26. #define PLATFORM_WINDOWS
  27. #define __WIN32__
  28. #define mkdir(p1,p2) mkdir(p1)
  29. #define PATHSEP '\\'
  30. #define USE_PORTAUDIO
  31. //#define USE_NANOSLEEP
  32. #define __cdecl
  33. #define ESPEAK_API
  34. #define PATH_ESPEAK_DATA "C:\\Program files\\espeak\\espeak-data"
  35. typedef unsigned short USHORT;
  36. typedef unsigned char UCHAR;
  37. typedef double DOUBLEX;
  38. typedef struct {
  39. const char *mnem;
  40. int value;
  41. } MNEM_TAB;
  42. int LookupMnem(MNEM_TAB *table, char *string);
  43. typedef struct {
  44. short pkfreq;
  45. short pkheight;
  46. short pkwidth;
  47. short pkright;
  48. } peak_t;
  49. typedef struct {
  50. short frflags;
  51. unsigned char length;
  52. unsigned char rms;
  53. short ffreq[9];
  54. unsigned char fheight[9];
  55. unsigned char fwidth[6]; // width/4
  56. unsigned char fright[6]; // width/4
  57. } frame_t;
  58. int GetFileLength(const char *filename);
  59. char *Alloc(int size);
  60. void Free(void *ptr);
  61. extern void strncpy0(char *to,const char *from, int size);
  62. extern char path_home[];
  63. extern const int version_phdata;
  64. extern const char *version_string;