mirror of
https://github.com/rhasspy/espeak-ng.git
synced 2026-11-27 21:28:05 +00:00
Build a test version of libespeak-ng that exposes the internal APIs.
This commit is contained in:
@@ -79,6 +79,10 @@ libespeak-ng.a
|
||||
libespeak-ng.la
|
||||
libespeak-ng.so*
|
||||
|
||||
libespeak-ng-test.a
|
||||
libespeak-ng-test.la
|
||||
libespeak-ng-test.so*
|
||||
|
||||
# build output
|
||||
|
||||
*.html
|
||||
|
||||
+20
-13
@@ -30,6 +30,9 @@ man1_MANS =
|
||||
noinst_bin_PROGRAMS =
|
||||
noinst_bindir =
|
||||
|
||||
noinst_lib_LTLIBRARIES =
|
||||
noinst_libdir =
|
||||
|
||||
##### ChangeLog:
|
||||
|
||||
ChangeLog:
|
||||
@@ -141,16 +144,13 @@ src_libespeak_ng_la_CFLAGS = \
|
||||
-pedantic -fno-exceptions -D PATH_ESPEAK_DATA=\"$(DATADIR)\" -DLIBESPEAK_NG_EXPORT \
|
||||
${PCAUDIOLIB_CFLAGS} ${AM_CFLAGS}
|
||||
|
||||
UCD_TOOLS_SOURCES = \
|
||||
src_libespeak_ng_la_SOURCES = \
|
||||
src/ucd-tools/src/case.c \
|
||||
src/ucd-tools/src/categories.c \
|
||||
src/ucd-tools/src/ctype.c \
|
||||
src/ucd-tools/src/proplist.c \
|
||||
src/ucd-tools/src/scripts.c \
|
||||
src/ucd-tools/src/tostring.c
|
||||
|
||||
src_libespeak_ng_la_SOURCES = \
|
||||
$(UCD_TOOLS_SOURCES) \
|
||||
src/ucd-tools/src/tostring.c \
|
||||
src/libespeak-ng/compiledata.c \
|
||||
src/libespeak-ng/compiledict.c \
|
||||
src/libespeak-ng/compilembrola.c \
|
||||
@@ -217,6 +217,17 @@ src_espeak_ng_SOURCES = src/espeak-ng.c
|
||||
|
||||
##### tests:
|
||||
|
||||
# Test version of libespeak-ng.so with access to the internal APIs, so they can
|
||||
# be accessed in the test code. This version should not be installed, as the
|
||||
# internal APIs are not guaranteed to be stable between releases.
|
||||
lib_LTLIBRARIES += src/libespeak-ng-test.la
|
||||
|
||||
src_libespeak_ng_test_la_LDFLAGS = $(src_libespeak_ng_la_LDFLAGS)
|
||||
src_libespeak_ng_test_la_CFLAGS = \
|
||||
-fPIC -pedantic -fno-exceptions -D PATH_ESPEAK_DATA=\"$(DATADIR)\" -DLIBESPEAK_NG_EXPORT \
|
||||
${PCAUDIOLIB_CFLAGS} ${AM_CFLAGS}
|
||||
src_libespeak_ng_test_la_SOURCES = $(src_libespeak_ng_la_SOURCES)
|
||||
|
||||
noinst_bin_PROGRAMS += tests/encoding.test
|
||||
|
||||
tests_encoding_test_LDADD = src/libespeak-ng.la
|
||||
@@ -224,17 +235,13 @@ tests_encoding_test_SOURCES = tests/encoding.c
|
||||
|
||||
noinst_bin_PROGRAMS += tests/tokenizer.test
|
||||
|
||||
tests_tokenizer_test_CFLAGS = -Isrc/libespeak-ng ${AM_CFLAGS}
|
||||
tests_tokenizer_test_SOURCES = \
|
||||
$(UCD_TOOLS_SOURCES) \
|
||||
src/libespeak-ng/encoding.c \
|
||||
src/libespeak-ng/mnemonics.c \
|
||||
src/libespeak-ng/tokenizer.c \
|
||||
tests/tokenizer.c
|
||||
tests_tokenizer_test_CFLAGS = -Isrc/libespeak-ng ${AM_CFLAGS}
|
||||
tests_tokenizer_test_LDADD = src/libespeak-ng-test.la
|
||||
tests_tokenizer_test_SOURCES = tests/tokenizer.c
|
||||
|
||||
noinst_bin_PROGRAMS += tests/voices.test
|
||||
|
||||
tests_voices_test_LDADD = src/libespeak-ng.la
|
||||
tests_voices_test_LDADD = src/libespeak-ng-test.la
|
||||
tests_voices_test_CFLAGS = -Isrc/libespeak-ng ${AM_CFLAGS}
|
||||
tests_voices_test_SOURCES = tests/voices.c
|
||||
|
||||
|
||||
@@ -28,6 +28,8 @@
|
||||
#include "speech.h"
|
||||
#include "espeak_command.h"
|
||||
|
||||
#ifdef USE_ASYNC
|
||||
|
||||
static unsigned int my_current_text_id = 0;
|
||||
|
||||
t_espeak_command *create_espeak_text(const void *text, size_t size, unsigned int position, espeak_POSITION_TYPE position_type, unsigned int end_position, unsigned int flags, void *user_data)
|
||||
@@ -372,3 +374,5 @@ void process_espeak_command(t_espeak_command *the_command)
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
@@ -37,6 +37,8 @@
|
||||
#include "fifo.h"
|
||||
#include "event.h"
|
||||
|
||||
#ifdef USE_ASYNC
|
||||
|
||||
// my_mutex: protects my_thread_is_talking,
|
||||
// my_stop_is_required, and the command fifo
|
||||
static pthread_mutex_t my_mutex;
|
||||
@@ -442,3 +444,5 @@ void fifo_terminate()
|
||||
|
||||
init(0); // purge fifo
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user