|
From: Reece D. <ms...@go...> - 2010-06-25 16:46:27
|
Hi,
I am struggling to get a functioning espeak and espeak-data built from source.
Here is what I have done:
===== portaudio.h
Replaced this (copy of portaudio18.h) with:
cat < src/portaudio.h > EOF
#if defined(PORTAUDIO_18)
# include "portaudio18.h"
#else
# include "portaudio19.h"
#endif
EOF
This is to support building with portaudio19-dev. It should really be
a make option driven through a configure script, but I have just
focused on getting things building.
===== espeakedit
I need espeakedit in order to compile the voice data, but there does
not appear to be a makefile for this. I have created a
Makefile.espeakedit file based on the one in the
espeakedit-1.43.45.zip file:
cat < src/Makefile.espeakedit > EOF
SRCS=\
compiledata.cpp compiledict.cpp debug.cpp dictionary.cpp
espeak_command.cpp espeakedit.cpp \
event.cpp extras.cpp fifo.cpp formantdlg.cpp intonation.cpp
klatt.cpp menus.cpp numbers.cpp \
options.cpp phonemelist.cpp prosodydisplay.cpp readclause.cpp
setlengths.cpp speak_lib.cpp \
spect.cpp spectdisplay.cpp spectseq.cpp synthdata.cpp
synthesize.cpp synth_mbrola.cpp \
translate.cpp transldlg.cpp tr_languages.cpp voicedlg.cpp
voices.cpp vowelchart.cpp wave.cpp \
wavegen.cpp
OBJS=$(patsubst %.cpp,%.o,$(SRCS))
WX_LIBS = -pthread -lwx_gtk2u_xrc-2.6 -lwx_gtk2u_qa-2.6
-lwx_gtk2u_html-2.6 -lwx_gtk2u_adv-2.6 -lwx_gtk2u_core-2.6
-lwx_baseu_xml-2.6 -lwx_baseu_net-2.6 -lwx_baseu-2.6
LIBS=-lstdc++ -lportaudio
CPPFLAGS = -Wall -g -fexceptions
-I/usr/lib/wx/include/gtk2-unicode-release-2.6 -I/usr/include/wx-2.6
-DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES
-D_LARGEFILE_SOURCE=1 -DNO_GCC_PRAGMA -D_ESPEAKEDIT
CXXFLAGS = -O2 -g0 -Wall -g -fexceptions
-I/usr/lib/wx/include/gtk2-unicode-release-2.6 -I/usr/include/wx-2.6
-DGTK_NO_CHECK_CASTS -D__WXGTK__ -D_FILE_OFFSET_BITS=64 -D_LARGE_FILES
-D_LARGEFILE_SOURCE=1 -DNO_GCC_PRAGMA -D_ESPEAKEDIT
all: espeakedit
.cpp.o:
$(CXX) $(CXXFLAGS) -I. -c -fno-exceptions $<
espeakedit: $(OBJS)
$(CXX) -o $@ $(OBJS) $(LIBS) $(WX_LIBS)
clean:
rm -f *.o *~
distclean: clean
rm -f espeakedit
EOF
I have changed the glob for cpp files to an explicit list, otherwise
it pulls in speak_riscos.cpp and fails to build. The espeakedit files
should be in an espeakedit directory separate from the espeak sources,
have its own Makefile and link against libespeak.a or
libespeak.so.1.43, but I just wanted to get things working.
===== Top-level build
I have created a top-level make file that supports creating espeak,
espeakedit and compile the espeak-data files:
cat < Makefile > EOF
PREFIX=/usr
BINDIR=$(PREFIX)/bin
DATADIR=$(PREFIX)/share/espeak-data
PLATFORM=big_endian
.PHONY: all clean distclean espeak espeakedit espeak-phoneme-data
espeak-data espeak-data-local
##### standard build actions:
all: espeak espeakedit espeak-data-local
install:
cd src && make DESTDIR=$(DESTDIR) PREFIX=$(PREFIX) install && cd ..
install -m 755 src/espeakedit $(DESTDIR)$(BINDIR)
cp -prf espeak-data-local/* $(DESTDIR)$(DATADIR)
clean:
cd src && rm -f *.o *~ && cd ..
distclean: clean
cd src && rm -f libespeak.a libespeak.so.* speak espeak espeakedit && cd ..
cd platforms/$(PLATFORM) && rm -f espeak-phoneme-data && cd ../..
rm -rf espeak-data-local
##### build targets:
espeak:
cd src && make PREFIX=$(PREFIX) && cd ..
espeakedit:
cd src && make -f Makefile.espeakedit PREFIX=$(PREFIX) && cd ..
espeak-phoneme-data:
cd platforms/$(PLATFORM) && make PREFIX=$(PREFIX) && cd ../..
espeak-data: espeakedit
cp -a espeak-data $(HOME)/espeak-data
cp -a phsource $(HOME)/espeak-data/phsource
cp -a dictsource $(HOME)/espeak-data/dictsource
src/espeakedit --compile
espeak-data-local: espeak-phoneme-data espeak-data
cp -a $(HOME)/espeak-data espeak-data-local
platforms/$(PLATFORM)/espeak-phoneme-data espeak-data-local
espeak-data-local espeak-data-local/phondata-manifest
EOF
This is a little rough in places, but (mostly) works.
===== espeak-data
The espeak-data directory is not in the correct layout that espeakedit
--compile recognises.
At the moment, I have copied the phsource and dictsource directories
into the espeak-data directory, but I am getting build errors when
building the voice (make espeak-data using the above makefile) from
the svn sources (commit 244).
espeak-data/phsource/error_log contains the following errors:
----- 8< -----
______________________________
Phoneme Table: 'base'
202: Can't read file: klatt/m-syl
215: Can't read file: klatt/n-syl
629: Can't read file: klatt/m_
631: Can't read file: klatt/m
660: Can't read file: klatt/n
690: Can't read file: klatt/nr
718: Can't read file: klatt/n^@
719: Can't read file: klatt/n^
751: Can't read file: klatt/nn
845: Can't read file: klatt/b
847: Can't read file: klatt/b
970: Can't read file: klatt/dz_pzd_
972: Can't read file: klatt/dz_pzd
1015: Can't read file: klatt/v_
1017: Can't read file: klatt/bh
1037: Can't read file: klatt/v_
1039: Can't read file: klatt/v
1109: Can't read file: klatt/zh_
1111: Can't read file: klatt/zh
1130: Can't read file: klatt/zh_
1132: Can't read file: klatt/zh
1190: Can't read file: klatt/qqh_
1192: Can't read file: klatt/qqh
1489: Can't read file: ufric/ll
______________________________
Phoneme Table: 'en'
14: Can't read file: klatt/x_tap
16: Can't read file: klatt/tap2
Phoneme Table: 'en-us'
284: Can't read file: vwl_en_us/aU@
______________________________
Phoneme Table: 'de'
include ph_german
148: Can't read file: vdiph/aau_6
324: Can't read file: vwl_de/uu_@
335: Can't read file: r/V_2_
347: Can't read file: r/V_2_
350: Can't read file: r/@_
352: Can't read file: r/V_
361: Can't read file: r/@_
370: Can't read file: r/V_
______________________________
Phoneme Table: 'nci'
Can't access (rb) file '/home/reece/espeak-data/phsource/ph_nahuatl'
______________________________
Phoneme Table: 'fr'
include ph_french
27: Can't read file: vwl_fr/e_2r
635: Can't read file: klatt/b
637: Can't read file: klatt/b
649: Can't read file: b/br
707: Can't read file: g/gr
833: Can't read file: ustop/t_short_
______________________________
Phoneme Table: 'ru'
include ph_russian
106: Can't read file: vwl_ru/ii-
411: Can't read file: r3/r_ru2
411: Can't read file: r3/r_ru
______________________________
Phoneme Table: 'zh'
include ph_zh
7: Can't read file: envelope/i_risefall
______________________________
Phoneme Table: 'tr'
include ph_turkish
150: Can't read file: klatt/dz_pzd
______________________________
Phoneme Table: 'sq'
include ph_albanian
157: Can't read file: l/l_front_
181: Can't read file: l/l_front
______________________________
Phoneme Table: 'da'
include ph_danish
144: Can't read file: r/aa
______________________________
Phoneme Table: 'rw'
include ph_kinyarwanda
175: Can't read file: envelope/i_risefall2
______________________________
Phoneme Table: 'ml'
Can't access (rb) file '/home/reece/espeak-data/phsource/ph_malayalam'
______________________________
Phoneme Table: 'ne'
Can't access (rb) file '/home/reece/espeak-data/phsource/ph_nepali'
______________________________
Phoneme Table: 'pa'
Can't access (rb) file '/home/reece/espeak-data/phsource/ph_punjabi'
______________________________
Phoneme Table: 'prs'
Can't access (rb) file '/home/reece/espeak-data/phsource/ph_dari'
______________________________
Phoneme Table: 'sl'
Can't access (rb) file '/home/reece/espeak-data/phsource/ph_slovenian'
______________________________
Phoneme Table: 'gd'
Can't access (rb) file '/home/reece/espeak-data/phsource/ph_s_gaelic'
______________________________
Phoneme Table: 'bg'
Can't access (rb) file '/home/reece/espeak-data/phsource/ph_bulgarian'
______________________________
Phoneme Table: 'nso'
Can't access (rb) file '/home/reece/espeak-data/phsource/ph_northern-sotho'
----- >8 -----
and error_intonation contains the error:
----- 8< -----
Can't access (r) file '/home/reece/espeak-data/phsource/intonation'
----- >8 -----
===== espeakedit --compile
This is looking in the $HOME directory on Linux, but uses
$ESPEAK_EDIT_DIR on Windows. The espeak program recognises
$ESPEAK_EDIT_DIR, so the getenv search behaviour should match. This
would allow something like:
$ ESPEAK_EDIT_DIR=${PWD}/espeak-data src/espeakedit --compile
so I don't need to copy the espeak-data files to the ${HOME} directory.
===== file permissions
Some of the source files have the permission 755 (are executable).
This does not make sense, so I have run:
$ find -type f -exec chmod 644 '{}' \;
on them.
- Reece
|