Merge branch 'master' into android

Conflicts:
	Makefile.am
	README.md
This commit is contained in:
Reece H. Dunn
2013-09-13 16:55:56 +01:00
7 changed files with 103 additions and 215 deletions
+7
View File
@@ -5,6 +5,7 @@
# intermediate build output: # intermediate build output:
*.o *.o
*.lo
# android build output: # android build output:
@@ -34,24 +35,30 @@ INSTALL
NEWS NEWS
README README
.deps/
.libs/
Makefile Makefile
Makefile.in Makefile.in
aclocal.m4 aclocal.m4
autom4te.cache/ autom4te.cache/
config.* config.*
configure configure
depcomp
install-sh install-sh
libtool libtool
ltmain.sh ltmain.sh
m4/ m4/
missing missing
stamp-h1 stamp-h1
.dirstamp
# libraries # libraries
docs/speak_lib.h docs/speak_lib.h
libespeak.a libespeak.a
libespeak.la
libespeak.so* libespeak.so*
# programs # programs
+67 -35
View File
@@ -1,15 +1,22 @@
AUTOMAKE_OPTIONS = subdir-objects
PREFIX=@prefix@ PREFIX=@prefix@
BINDIR=@bindir@ BINDIR=@bindir@
INCDIR=@includedir@/espeak INCDIR=@includedir@/espeak
LIBDIR=@libdir@ LIBDIR=@libdir@
DATADIR=$(PREFIX)/share/espeak-data DATADIR=$(PREFIX)/share/espeak-data
PLATFORM=big_endian SHARED_VERSION=2:47:1 # = *.so.1.1.47
.PHONY: android all clean distclean espeak-phoneme-data MKDIR=mkdir -p
AM_CXXFLAGS = -Wall
EXTRA_DIST= EXTRA_DIST=
bin_PROGRAMS =
lib_LTLIBRARIES =
##### ChangeLog: ##### ChangeLog:
ChangeLog: ChangeLog:
@@ -25,24 +32,29 @@ EXTRA_DIST += ChangeLog
all: jni espeakdata apk-release all: jni espeakdata apk-release
install: uninstall-hook:
cd src && make DESTDIR=$(DESTDIR) PREFIX=$(PREFIX) BINDIR=$(BINDIR) INCDIR=$(INCDIR) LIBDIR=$(LIBDIR) install && cd .. rm -rf $(DESTDIR)$(DATADIR)
install -m 755 src/espeakedit $(DESTDIR)$(BINDIR)
clean: install-data-hook: uninstall-hook
$(MKDIR) $(DESTDIR)$(DATADIR)
cp -prf espeak-data/* $(DESTDIR)$(DATADIR)
clean-local:
cd src && rm -f *.o *~ && cd .. cd src && rm -f *.o *~ && cd ..
cd android && gradle clean cd android && gradle clean
distclean: clean distclean-local:
cd src && rm -f libespeak.a libespeak.so.* speak espeak espeakedit && cd .. rm -rf espeak-data/phondata-manifest
cd platforms/$(PLATFORM) && rm -f espeak-phoneme-data && cd ../.. rm -f espeak-data/*_dict
rm -rf espeak-data/dictsource espeak-data/phsource espeak-data/phondata-manifest
cd espeak-data && rm -f *_dict && cd ..
check: apk-check check: apk-check
##### build targets: ##### build targets:
libespeak_includedir = $(includedir)/espeak
libespeak_include_HEADERS = \
src/speak_lib.h
common_SOURCE = \ common_SOURCE = \
src/compiledict.cpp \ src/compiledict.cpp \
src/dictionary.cpp \ src/dictionary.cpp \
@@ -67,9 +79,6 @@ libespeak_SOURCE = \
src/espeak_command.cpp \ src/espeak_command.cpp \
src/event.cpp \ src/event.cpp \
src/fifo.cpp \ src/fifo.cpp \
src/wave.cpp \
src/wave_pulse.cpp \
src/wave_sada.cpp \
src/debug.cpp src/debug.cpp
espeakedit_SOURCE = \ espeakedit_SOURCE = \
@@ -87,38 +96,61 @@ espeakedit_SOURCE = \
src/voicedlg.cpp \ src/voicedlg.cpp \
src/vowelchart.cpp src/vowelchart.cpp
if AUDIO_RUNTIME
wave_SOURCE = src/wave.cpp src/wave_pulse.cpp
wave_LIBS = -lpulse -lpulse-simple -lportaudio
wave_FLAGS = -DUSE_PULSEAUDIO -DUSE_PORTAUDIO
else
if AUDIO_PULSEAUDIO
wave_SOURCE = src/wave_pulse.cpp
wave_LIBS = -lpulse
wave_FLAGS = -DUSE_PULSEAUDIO
else
if AUDIO_PORTAUDIO
wave_SOURCE = src/wave.cpp
wave_LIBS = -lportaudio
wave_FLAGS = -DUSE_PORTAUDIO
else
if AUDIO_SADA
wave_SOURCE = wave_sada.cpp
wave_FLAGS = -DUSE_SADA
else
wave_SOURCE = src/wave.cpp
endif
endif
endif
endif
docs/speak_lib.h: src/speak_lib.h docs/speak_lib.h: src/speak_lib.h
cp $< $@ cp $< $@
src/libespeak.a: $(common_SOURCE) $(libespeak_SOURCE) lib_LTLIBRARIES += src/libespeak.la
cd src && make libespeak.a && cd ..
src/libespeak.so: $(common_SOURCE) $(libespeak_SOURCE) src_libespeak_la_LDFLAGS = -version-info $(SHARED_VERSION) $(wave_LIBS) -lpthread
cd src && make libespeak.so && cd .. src_libespeak_la_CXXFLAGS = $(wave_FLAGS) \
-fpic -fvisibility=hidden -D LIBRARY \
-pedantic -fno-exceptions -D PATH_ESPEAK_DATA=\"$(DATADIR)\"
src_libespeak_la_SOURCES = $(common_SOURCE) $(libespeak_SOURCE) $(wave_SOURCE)
src/speak: $(common_SOURCE) src/speak.cpp bin_PROGRAMS += src/speak
cd src && make speak && cd ..
src/espeak: src/libespeak.so src/espeak.cpp src_speak_LDFLAGS = $(wave_LIBS) -lpthread
cd src && make espeak && cd .. src_speak_CXXFLAGS = $(wave_FLAGS)
src_speak_SOURCES = src/speak.cpp $(common_SOURCE) $(wave_SOURCE)
src/espeakedit: $(common_SOURCE) $(libespeak_SOURCE) $(espeakedit_SOURCE) bin_PROGRAMS += src/espeak
cd src && make espeakedit && cd ..
espeak-phoneme-data: src_espeak_LDADD = src/libespeak.la
cd platforms/$(PLATFORM) && make PREFIX=$(PREFIX) && cd ../.. src_espeak_SOURCES = src/espeak.cpp
espeak-data/dictsource/dir.stamp: dictsource/* bin_PROGRAMS += src/espeakedit
rm -rf espeak-data/dictsource
./shadowdir $(PWD)/dictsource $(PWD)/espeak-data/dictsource
touch espeak-data/dictsource/dir.stamp
espeak-data/phsource/dir.stamp: phsource/ph_* phsource/phonemes phsource/intonation src_espeakedit_LDFLAGS = $(wave_LIBS) ${WX_LIBS}
rm -rf espeak-data/phsource src_espeakedit_CXXFLAGS = ${WX_CXXFLAGS} $(wave_FLAGS) \
./shadowdir $(PWD)/phsource $(PWD)/espeak-data/phsource -D_LARGEFILE_SOURCE=1 -DNO_GCC_PRAGMA -D_ESPEAKEDIT
touch espeak-data/phsource/dir.stamp src_espeakedit_SOURCES = $(common_SOURCE) $(libespeak_SOURCE) $(espeakedit_SOURCE) $(wave_SOURCE)
espeak-data/phontab: src/espeakedit espeak-data/dictsource/dir.stamp espeak-data/phsource/dir.stamp espeak-data/phontab: src/espeakedit
ESPEAK_DATA_PATH=$(PWD) src/espeakedit --compile ESPEAK_DATA_PATH=$(PWD) src/espeakedit --compile
##### android targets: ##### android targets:
+10
View File
@@ -1,5 +1,15 @@
# Android Port of eSpeak Text-to-Speech # Android Port of eSpeak Text-to-Speech
- [Prerequisites](#prerequisites)
- [Building with Gradle](#building-with-gradle)
- [Building with Eclipse](#building-with-eclipse)
- [Building with Ant](#building-with-ant)
- [Signing the APK](#signing-the-apk)
- [Installing the APK](#installing-the-apk)
- [Enabling eSpeak on the Device](#enabling-espeak-on-the-device)
----------
This branch contains the files needed to build espeak on the android platform. This branch contains the files needed to build espeak on the android platform.
It is derived from the eyes-free project. It is derived from the eyes-free project.
+15 -4
View File
@@ -1,5 +1,5 @@
AC_PREREQ([2.63]) AC_PREREQ([2.63])
AC_INIT([eSpeak], [1.46], [https://github.com/rhdunn/espeak/issues], [espeak], [https://github.com/rhdunn/espeak]) AC_INIT([eSpeak], [1.47], [https://github.com/rhdunn/espeak/issues], [espeak], [https://github.com/rhdunn/espeak])
AM_INIT_AUTOMAKE() AM_INIT_AUTOMAKE()
m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES]) m4_ifdef([AM_SILENT_RULES],[AM_SILENT_RULES])
@@ -91,6 +91,16 @@ dnl ================================================================
dnl Audio checks. dnl Audio checks.
dnl ================================================================ dnl ================================================================
AC_ARG_WITH([sada],
[AS_HELP_STRING([--with-sada], [use the Solaris SADA audio API @<:@default=no@:>@])],
[])
if test "$with_sada" = "yes" ; then
have_sada=yes
else
have_sada=no
fi
if test "$have_portaudio" = 18 -o "$have_portaudio" = 19 ; then if test "$have_portaudio" = 18 -o "$have_portaudio" = 19 ; then
if test "$have_pulseaudio" = yes ; then if test "$have_pulseaudio" = yes ; then
PKG_CHECK_MODULES(PULSEAUDIO_SIMPLE, [libpulse-simple >= 0.9], PKG_CHECK_MODULES(PULSEAUDIO_SIMPLE, [libpulse-simple >= 0.9],
@@ -106,6 +116,8 @@ if test "$have_portaudio" = 18 -o "$have_portaudio" = 19 ; then
fi fi
elif test "$have_pulseaudio" = yes ; then elif test "$have_pulseaudio" = yes ; then
AUDIO=pulseaudio AUDIO=pulseaudio
elif test "$have_sada" = yes ; then
AUDIO=sada
else else
AUDIO=disabled AUDIO=disabled
fi fi
@@ -115,8 +127,6 @@ AC_SUBST(AUDIO)
AM_CONDITIONAL(AUDIO_RUNTIME, [test x"$AUDIO" = xruntime]) AM_CONDITIONAL(AUDIO_RUNTIME, [test x"$AUDIO" = xruntime])
AM_CONDITIONAL(AUDIO_PULSEAUDIO, [test x"$AUDIO" = xpulseaudio]) AM_CONDITIONAL(AUDIO_PULSEAUDIO, [test x"$AUDIO" = xpulseaudio])
AM_CONDITIONAL(AUDIO_PORTAUDIO, [test x"$AUDIO" = xportaudio]) AM_CONDITIONAL(AUDIO_PORTAUDIO, [test x"$AUDIO" = xportaudio])
AM_CONDITIONAL(AUDIO_PORTAUDIO0, [test x"$AUDIO" = xportaudio0])
AM_CONDITIONAL(AUDIO_PORTAUDIO2, [test x"$AUDIO" = xportaudio2])
AM_CONDITIONAL(AUDIO_SADA, [test x"$AUDIO" = xsada]) AM_CONDITIONAL(AUDIO_SADA, [test x"$AUDIO" = xsada])
dnl ================================================================ dnl ================================================================
@@ -139,7 +149,7 @@ dnl ================================================================
dnl Generate output. dnl Generate output.
dnl ================================================================ dnl ================================================================
AC_CONFIG_FILES([Makefile src/Makefile]) AC_CONFIG_FILES([Makefile])
AC_OUTPUT AC_OUTPUT
AC_MSG_NOTICE([ AC_MSG_NOTICE([
@@ -154,5 +164,6 @@ AC_MSG_NOTICE([
wxWidgets: ${WX_VERSION} wxWidgets: ${WX_VERSION}
pulseaudio: ${have_pulseaudio} pulseaudio: ${have_pulseaudio}
portaudio: ${have_portaudio} portaudio: ${have_portaudio}
sada: ${have_sada}
audio configuration: ${AUDIO} audio configuration: ${AUDIO}
]) ])
-22
View File
@@ -1,22 +0,0 @@
#!/usr/bin/python
#
# Copyright (C) 2011 Reece H. Dunn
# Licence: GPLv3
#
# A script for shadowing a directory tree to another (equivalent to lndir).
import sys
import os
def shadow(src, dst):
if not os.path.exists(dst):
os.makedirs(dst)
for fn in os.listdir(src):
srcpath = os.path.join(src, fn)
dstpath = os.path.join(dst, fn)
if os.path.isdir(srcpath):
shadow(srcpath, dstpath)
else:
os.symlink(srcpath, dstpath)
shadow(sys.argv[1], sys.argv[2])
-150
View File
@@ -1,150 +0,0 @@
PREFIX=@prefix@
BINDIR=@bindir@
INCDIR=@includedir@/espeak
LIBDIR=@libdir@
DATADIR=${PREFIX}/share/espeak-data
# remove -fno-exceptions if it causes problems with stdio library on some platforms (ARM)
RELEASE = 1.47
SPEAK = speak
ESPEAK = espeak
ESPEAKEDIT = espeakedit
LIBESPEAK = libespeak.so
STATIC_LIBESPEAK = libespeak.a
LIB_VERSION = 1
LIBTAG = $(LIB_VERSION).$(RELEASE)
# Use SONAME_OPT=-Wl,h, on Solaris
SONAME_OPT=-Wl,-soname,
# Use EXTRA_LIBS=-lm on Solaris
EXTRA_LIBS =
INSTALL = install
LN_SF = /bin/ln -sf
MKDIR = mkdir -p
# AUDIO='runtime' uses pulseaudio if it is running, else uses portaudio
if AUDIO_RUNTIME
WAVE=wave.cpp wave_pulse.cpp
LIB_AUDIO=-lpulse -lpulse-simple -lportaudio
USE_AUDIO=-DUSE_PULSEAUDIO -DUSE_PORTAUDIO
else
if AUDIO_PULSEAUDIO
WAVE=wave_pulse.cpp
LIB_AUDIO=-lpulse
USE_AUDIO=-DUSE_PULSEAUDIO
else
if AUDIO_PORTAUDIO
WAVE=wave.cpp
LIB_AUDIO=-lportaudio
USE_AUDIO=-DUSE_PORTAUDIO
else
if AUDIO_PORTAUDIO0
WAVE=wave.cpp
LIB_AUDIO=/usr/lib/libportaudio.so.0
USE_AUDIO=-DUSE_PORTAUDIO
else
if AUDIO_PORTAUDIO2
WAVE=wave.cpp
LIB_AUDIO=/usr/lib/libportaudio.so.2
USE_AUDIO=-DUSE_PORTAUDIO
else
if AUDIO_SADA
WAVE=wave_sada.cpp
USE_AUDIO=-DUSE_SADA
else
WAVE=wave.cpp
endif
endif
endif
endif
endif
endif
CXXFLAGS ?= -O2 -Wall
CPPFLAGS = -pedantic -fno-exceptions -D PATH_ESPEAK_DATA=\"$(DATADIR)\"
.cpp.o:
$(CXX) -c $(CXXFLAGS) $(USE_AUDIO) -I. $(CPPFLAGS) $<
e_%.o: %.cpp
$(CXX) -c $(CXXFLAGS) $(espeakedit_CXXFLAGS) $(USE_AUDIO) $(CPPFLAGS) -I. $< -o e_$*.o
x_%.o: %.cpp
$(CXX) -c $(CXXFLAGS) $(USE_AUDIO) -fpic -fvisibility=hidden \
-I. -D LIBRARY $(CPPFLAGS) $< -o x_$*.o
all: $(SPEAK) $(LIBESPEAK) $(STATIC_LIBESPEAK) $(ESPEAK) $(ESPEAKEDIT)
common_SOURCE = compiledict.cpp dictionary.cpp intonation.cpp \
klatt.cpp mbrowrap.cpp numbers.cpp readclause.cpp \
phonemelist.cpp setlengths.cpp sonic.cpp \
synthdata.cpp synthesize.cpp synth_mbrola.cpp \
translate.cpp tr_languages.cpp voices.cpp wavegen.cpp
speak_SOURCE = speak.cpp $(common_SOURCE)
speak_OBJS = ${speak_SOURCE:%.cpp=%.o}
speak_LIBS = -lstdc++ $(LIB_AUDIO) -lpthread $(EXTRA_LIBS)
$(SPEAK): $(speak_OBJS)
$(CXX) $(LDFLAGS) -o $@ $(speak_OBJS) $(speak_LIBS)
espeak_SOURCE = espeak.cpp
espeak_OBJS = ${espeak_SOURCE:%.cpp=%.o}
espeak_LIBS = -lstdc++ -L . -lespeak
$(ESPEAK): $(espeak_OBJS) $(LIB_NAME)
$(CXX) $(LDFLAGS) -o $@ $(espeak_OBJS) $(espeak_LIBS)
libespeak_SOURCE = speak_lib.cpp $(common_SOURCE) \
espeak_command.cpp event.cpp fifo.cpp $(WAVE) debug.cpp
libespeak_OBJS = ${libespeak_SOURCE:%.cpp=x_%.o}
libespeak_LIBS = -lstdc++ $(LIB_AUDIO) -lpthread
$(LIBESPEAK): $(libespeak_OBJS)
$(CXX) $(LDFLAGS) -shared $(SONAME_OPT)$(LIBESPEAK).$(LIB_VERSION) -o $@ \
$(libespeak_OBJS) $(libespeak_LIBS)
mv $(LIBESPEAK) $(LIBESPEAK).$(LIBTAG)
$(LN_SF) $(LIBESPEAK).$(LIBTAG) $(LIBESPEAK).$(LIB_VERSION)
$(LN_SF) $(LIBESPEAK).$(LIB_VERSION) $(LIBESPEAK)
$(STATIC_LIBESPEAK): $(libespeak_OBJS)
$(AR) cqs $(STATIC_LIBESPEAK) $(libespeak_OBJS)
espeakedit_SOURCE = $(common_SOURCE) compiledata.cpp debug.cpp espeakedit.cpp \
event.cpp extras.cpp fifo.cpp formantdlg.cpp \
menus.cpp options.cpp prosodydisplay.cpp \
espeak_command.cpp speak_lib.cpp spect.cpp \
spectdisplay.cpp spectseq.cpp \
transldlg.cpp voicedlg.cpp vowelchart.cpp $(WAVE)
espeakedit_OBJS=${espeakedit_SOURCE:%.cpp=e_%.o}
espeakedit_LIBS=-lstdc++ $(LIB_AUDIO)
espeakedit_CXXFLAGS = ${WX_CXXFLAGS} -D_LARGEFILE_SOURCE=1 -DNO_GCC_PRAGMA -D_ESPEAKEDIT
$(ESPEAKEDIT): $(espeakedit_OBJS)
$(CXX) $(LDFLAGS) -o $@ $(espeakedit_OBJS) $(espeakedit_LIBS) ${WX_LIBS}
clean:
rm -f *.o *.a *~
distclean: clean
rm -f $(SPEAK)
rm -f $(ESPEAK)
rm -f $(LIBESPEAK)*
rm -f $(STATIC_LIBESPEAK)
rm -f $(ESPEAKEDIT)
install:
rm -rf $(DESTDIR)$(DATADIR)
$(MKDIR) $(DESTDIR)$(BINDIR)
$(MKDIR) $(DESTDIR)$(LIBDIR)
$(MKDIR) $(DESTDIR)$(INCDIR)
$(MKDIR) $(DESTDIR)$(DATADIR)
$(INSTALL) -m 755 $(ESPEAK) $(DESTDIR)$(BINDIR)
$(INSTALL) -m 755 $(LIBESPEAK).$(LIBTAG) $(DESTDIR)$(LIBDIR)
$(INSTALL) -m 755 $(STATIC_LIBESPEAK) $(DESTDIR)$(LIBDIR)
$(LN_SF) $(LIBESPEAK).$(LIBTAG) $(DESTDIR)$(LIBDIR)/$(LIBESPEAK).$(LIB_VERSION)
$(LN_SF) $(LIBESPEAK).$(LIB_VERSION) $(DESTDIR)$(LIBDIR)/$(LIBESPEAK)
$(INSTALL) -pm 644 speak_lib.h $(DESTDIR)$(INCDIR)
cp -prf ../espeak-data/* $(DESTDIR)$(DATADIR)
+4 -4
View File
@@ -167,12 +167,12 @@ void ConfigInit(bool use_defaults)
basedir = wxString(path_base,wxConvLocal); // this is only used to set defaults for other paths if they are not in the config file basedir = wxString(path_base,wxConvLocal); // this is only used to set defaults for other paths if they are not in the config file
if (use_defaults) if (use_defaults)
{ {
path_spectload = basedir + _T("/phsource"); path_spectload = basedir + _T("/../phsource");
path_spectload2 = basedir + _T("/phsource"); path_spectload2 = basedir + _T("/../phsource");
path_pitches = basedir + _T("/pitch"); path_pitches = basedir + _T("/pitch");
path_phsource = basedir + _T("/phsource"); path_phsource = basedir + _T("/../phsource");
path_phfile = path_phsource + _T("/phonemes"); path_phfile = path_phsource + _T("/phonemes");
path_dictsource = basedir + _T("/dictsource"); path_dictsource = basedir + _T("/../dictsource");
path_modifiervoice = basedir; path_modifiervoice = basedir;
path_dir1 = basedir; path_dir1 = basedir;
} }