From 0ed6fadaf19edebf845160d59314dd912b857a42 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jonas=20H=C3=A4ggqvist?= Date: Wed, 8 Aug 2007 22:01:06 +0000 Subject: [PATCH] Move voice config into the advanced build options and look for the eSpeak binary named "espeak" rather than "speak". git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14247 a1c6a512-1295-4272-9138-f99709370657 --- tools/configure | 70 +++++++++++++++++++++++--------------------- tools/voicecommon.sh | 2 +- 2 files changed, 38 insertions(+), 34 deletions(-) diff --git a/tools/configure b/tools/configure index c06ebdad9f..b2d2be2508 100755 --- a/tools/configure +++ b/tools/configure @@ -215,7 +215,7 @@ whichadvanced () { # echo "" echo "Enter your developer options (press enter when done)" - echo -n "(D)EBUG, (L)ogf, (S)imulator, (P)rofiling" + echo -n "(D)EBUG, (L)ogf, (S)imulator, (P)rofiling, (V)oice" if [ "$memory" = "2" ]; then echo -n ", (8)MB MOD" fi @@ -255,6 +255,10 @@ whichadvanced () { profile="yes" fi ;; + [Vv]) + echo "Voice build selected" + voice="yes" + ;; 8) if [ "$memory" = "2" ]; then memory="8" @@ -279,6 +283,10 @@ whichadvanced () { done echo "done" + if [ "yes" = "$voice" ]; then + voiceconfig + toolset="${toolset} voicefont wavtrim" + fi if [ "yes" = "$use_debug" ]; then debug="-DDEBUG" GCCOPTS="$GCCOPTS -g -DDEBUG" @@ -308,7 +316,7 @@ voiceconfig () { DEFAULT_NOISEFLOOR="500" DEFAULT_CHOICE="L" fi - if [ `which speak` ]; then + if [ `which espeak` ]; then ESPEAK="(e)Speak " ESPEAK_OPTS="ESPEAK_OPTS=\"\"" DEFAULT_TTS="espeak" @@ -383,27 +391,27 @@ voiceconfig () { echo "You need to have Lame installed to build voice files" fi - echo "Encoder to use: ${LAME}${OGGENC}${SPEEXENC}(${DEFAULT_CHOICE})?" - echo "" - echo "Note: Use Lame - the other options won't work" - option=`input` - case "$option" in - [Oo]) - ENCODER="oggenc" - ENC_OPTS=$VORBIS_OPTS - ;; - [Ss]) - ENCODER="speexenc" - ENC_OPTS=$SPEEX_OPTS - ;; - [Ll]) +# echo "Encoder to use: ${LAME}${OGGENC}${SPEEXENC}(${DEFAULT_CHOICE})?" +# echo "" +# echo "Note: Use Lame - the other options won't work" +# option=`input` +# case "$option" in +# [Oo]) +# ENCODER="oggenc" +# ENC_OPTS=$VORBIS_OPTS +# ;; +# [Ss]) +# ENCODER="speexenc" +# ENC_OPTS=$SPEEX_OPTS +# ;; +# [Ll]) ENCODER="lame" ENC_OPTS=$LAME_OPTS - ;; - *) - ENCODER=$DEFAULT_ENC - ENC_OPTS=$DEFAULT_ENC_OPTS - esac +# ;; +# *) +# ENCODER=$DEFAULT_ENC +# ENC_OPTS=$DEFAULT_ENC_OPTS +# esac echo "Using $ENCODER for encoding voice clips" cat > voicesettings.sh < Makefile \ -e "s,@MANUFACTURER@,${t_manufacturer},g" \ -e "s,@ARCHOS@,${archos},g" \ -e "s,@LANGUAGE@,${language},g" \ + -e "s,@VOICELANGUAGE@,${voicelanguage},g" \ -e "s,@PWD@,${pwd},g" \ -e "s,@CC@,${CC},g" \ -e "s,@LD@,${LD},g" \ @@ -1646,6 +1649,7 @@ export MANUFACTURER=@MANUFACTURER@ export OBJDIR=@PWD@ export BUILDDIR=@PWD@ export LANGUAGE=@LANGUAGE@ +export VOICELANGUAGE=@VOICELANGUAGE@ export MEMORYSIZE=@MEMORY@ export VERSION=\$(shell \$(ROOTDIR)/tools/svnversion.sh \$(ROOTDIR)) export BUILDDATE=\$(shell date -u +'-DYEAR=%Y -DMONTH=%m -DDAY=%d') @@ -1723,7 +1727,7 @@ clean: voice: tools \$(SILENT)\$(MAKE) -C \$(APPSDIR) OBJDIR=\$(BUILDDIR)/@APPS@ features \$(SILENT)for f in \`cat \$(BUILDDIR)/@APPS@/features\`; do feat="\$\$feat:\$\$f" ; done ; \\ - \$(TOOLSDIR)/genvoice.sh \$(ROOTDIR) \$(LANGUAGE) \$(ARCHOS)\$\$feat \$(TARGET_ID) voicesettings.sh + \$(TOOLSDIR)/genvoice.sh \$(ROOTDIR) \$(VOICELANGUAGE) \$(ARCHOS)\$\$feat \$(TARGET_ID) voicesettings.sh tools: \$(SILENT)\$(MAKE) -C \$(TOOLSDIR) CC=\$(HOSTCC) @TOOLSET@ diff --git a/tools/voicecommon.sh b/tools/voicecommon.sh index a21bf49efa..13df3e9739 100644 --- a/tools/voicecommon.sh +++ b/tools/voicecommon.sh @@ -35,7 +35,7 @@ FESTIVAL_CLIENT=festival_client FLITE_BIN=flite # The eSpeak executable -ESPEAK_BIN=speak +ESPEAK_BIN=espeak # The lame executable LAME_BIN=lame