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.

espeak_win_1_0.txt 4.6KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. Index: src/Makefile
  2. ===================================================================
  3. --- src/Makefile (revision 364)
  4. +++ src/Makefile (working copy)
  5. @@ -18,6 +18,13 @@
  6. # Use SONAME_OPT=-Wl,h, on Solaris
  7. SONAME_OPT=-Wl,-soname,
  8. +ifdef PLATFORM_WINDOWS
  9. + LIB_NAME = libespeak.dll
  10. +else
  11. + # On Windows not all source files are compiled
  12. + non_windows_SOURCES = mbrowrap.cpp
  13. +endif
  14. +
  15. # Use EXTRA_LIBS=-lm on Solaris
  16. EXTRA_LIBS =
  17. @@ -72,12 +79,12 @@
  18. speak_SOURCES = speak.cpp compiledict.cpp dictionary.cpp intonation.cpp \
  19. readclause.cpp setlengths.cpp numbers.cpp synth_mbrola.cpp \
  20. - synthdata.cpp synthesize.cpp translate.cpp mbrowrap.cpp \
  21. + synthdata.cpp synthesize.cpp translate.cpp $(non_windows_SOURCES) \
  22. tr_languages.cpp voices.cpp wavegen.cpp phonemelist.cpp klatt.cpp sonic.cpp
  23. libespeak_SOURCES = speak_lib.cpp compiledict.cpp dictionary.cpp intonation.cpp \
  24. readclause.cpp setlengths.cpp numbers.cpp synth_mbrola.cpp \
  25. - synthdata.cpp synthesize.cpp translate.cpp mbrowrap.cpp \
  26. + synthdata.cpp synthesize.cpp translate.cpp $(non_windows_SOURCES) \
  27. tr_languages.cpp voices.cpp wavegen.cpp phonemelist.cpp \
  28. espeak_command.cpp event.cpp fifo.cpp $(WAVE) debug.cpp klatt.cpp sonic.cpp
  29. @@ -94,8 +101,14 @@
  30. LIBS3=-lstdc++ -L . -lespeak
  31. CXXFLAGS=-O2
  32. +ifdef PLATFORM_WINDOWS
  33. + CXXFLAGS += -DPLATFORM_WINDOWS -DNEED_STRUCT_TIMESPEC
  34. + LDFLAGS += -static-libgcc -static-libstdc++
  35. +endif
  36. +ifdef DEBUG
  37. + CXXFLAGS += -DDEBUG_ENABLED
  38. +endif
  39. -
  40. all: $(BIN_NAME) $(LIB_NAME) $(STATIC_LIB_NAME) $(BIN2_NAME)
  41. .cpp.o:
  42. @@ -116,9 +129,11 @@
  43. $(LIB_NAME): $(OBJS2)
  44. $(CXX) $(LDFLAGS) -shared $(SONAME_OPT)$(LIB_NAME).$(LIB_VERSION) -o $@ \
  45. $(OBJS2) $(LIBS2)
  46. - mv $(LIB_NAME) $(LIB_NAME).$(LIBTAG)
  47. - $(LN_SF) $(LIB_NAME).$(LIBTAG) $(LIB_NAME).$(LIB_VERSION)
  48. - $(LN_SF) $(LIB_NAME).$(LIB_VERSION) $(LIB_NAME)
  49. + $(if $(PLATFORM_WINDOWS), , \
  50. + mv $(LIB_NAME) $(LIB_NAME).$(LIBTAG); \
  51. + $(LN_SF) $(LIB_NAME).$(LIBTAG) $(LIB_NAME).$(LIB_VERSION); \
  52. + $(LN_SF) $(LIB_NAME).$(LIB_VERSION) $(LIB_NAME); \
  53. + )
  54. $(STATIC_LIB_NAME): $(OBJS2)
  55. $(AR) cqs $(STATIC_LIB_NAME) $(OBJS2)
  56. Index: src/speech.h
  57. ===================================================================
  58. --- src/speech.h (revision 364)
  59. +++ src/speech.h (working copy)
  60. @@ -37,7 +37,6 @@
  61. #endif
  62. -#define PLATFORM_POSIX
  63. #define PATHSEP '/'
  64. // USE_PORTAUDIO or USE_PULSEAUDIO are now defined in the makefile
  65. //#define USE_PORTAUDIO
  66. @@ -77,7 +76,14 @@
  67. #ifdef PLATFORM_WINDOWS
  68. #define N_PATH_HOME 230
  69. -#else
  70. +// sleep(seconds)
  71. +// Sleep(millisecond = 1/1000 s), windows api, kernel32.dll
  72. +// usleep(microseconds = 1/1000000 s)
  73. +#define sleep(x) Sleep(1000*x)
  74. +// we are lucky, in current code usleep is always used in multiplies of 1000
  75. +#define usleep(x) Sleep((x+500)/1000)
  76. +#else /* PLATFORM_POSIX */
  77. +#define PLATFORM_POSIX
  78. #define N_PATH_HOME 160
  79. #endif
  80. Index: src/speak_lib.cpp
  81. ===================================================================
  82. --- src/speak_lib.cpp (revision 364)
  83. +++ src/speak_lib.cpp (working copy)
  84. @@ -31,7 +31,13 @@
  85. #include "speech.h"
  86. #include <sys/stat.h>
  87. -#ifndef PLATFORM_WINDOWS
  88. +
  89. +#ifdef PLATFORM_WINDOWS
  90. +#include <fcntl.h>
  91. +#include <io.h>
  92. +#include <windows.h>
  93. +#include <winreg.h>
  94. +#else /* PLATFORM_POSIX */
  95. #include <unistd.h>
  96. #endif
  97. Index: src/wave.cpp
  98. ===================================================================
  99. --- src/wave.cpp (revision 364)
  100. +++ src/wave.cpp (working copy)
  101. @@ -32,7 +32,9 @@
  102. #include <time.h>
  103. #include "portaudio.h"
  104. -#ifndef PLATFORM_WINDOWS
  105. +#ifdef PLATFORM_WINDOWS
  106. +#include <windows.h>
  107. +#else /* PLATFORM_POSIX */
  108. #include <unistd.h>
  109. #endif
  110. #include "wave.h"
  111. @@ -40,6 +42,14 @@
  112. //<Definitions
  113. +#ifdef NEED_STRUCT_TIMESPEC
  114. +#define HAVE_STRUCT_TIMESPEC 1
  115. +struct timespec {
  116. + long tv_sec;
  117. + long tv_nsec;
  118. +};
  119. +#endif /* HAVE_STRUCT_TIMESPEC */
  120. +
  121. enum {ONE_BILLION=1000000000};
  122. #ifdef USE_PORTAUDIO
  123. Index: src/event.cpp
  124. ===================================================================
  125. --- src/event.cpp (revision 364)
  126. +++ src/event.cpp (working copy)
  127. @@ -24,7 +24,9 @@
  128. //<includes
  129. +#ifndef PLATFORM_WINDOWS
  130. #include <unistd.h>
  131. +#endif
  132. #include <assert.h>
  133. #include <string.h>
  134. #include <stdlib.h>
  135. Index: src/fifo.cpp
  136. ===================================================================
  137. --- src/fifo.cpp (revision 364)
  138. +++ src/fifo.cpp (working copy)
  139. @@ -24,7 +24,9 @@
  140. //<includes
  141. +#ifndef PLATFORM_WINDOWS
  142. #include <unistd.h>
  143. +#endif
  144. #include <assert.h>
  145. #include <string.h>
  146. #include <stdlib.h>