From 80cd79992540f33479f272cd4024d97e554b4220 Mon Sep 17 00:00:00 2001 From: Solomon Peachy Date: Thu, 20 Jun 2024 20:51:40 -0400 Subject: voice: If $POOL is not set, use /voice-pool by default It will _vastly_ speed up repeated voice builds. The voice pool directory will not be erased by a 'make clean' Change-Id: Ice58d5c5355abfa5a385dfca749f8063e2ee8622 --- tools/configure | 3 +++ tools/root.make | 4 ++++ tools/voice.pl | 4 ++-- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/tools/configure b/tools/configure index 2579a38933..43f02f5643 100755 --- a/tools/configure +++ b/tools/configure @@ -1078,6 +1078,9 @@ Win(6)4 crosscompile, (T)est plugins, (O)mit plugins, S(m)all C lib, Logf to Ser for thislang in `echo $voicelanguage | sed 's/,/ /g'`; do voiceconfig "$thislang" done + if [ -z "$POOL" ] ; then + echo " \$POOL is not set, will use /voice-pool by default" + fi fi if [ "yes" = "$use_debug" ]; then debug="-DDEBUG" diff --git a/tools/root.make b/tools/root.make index 6e96844465..b8637dc923 100644 --- a/tools/root.make +++ b/tools/root.make @@ -374,6 +374,10 @@ ifdef TTS_ENGINE voice: voicetools $(BUILDDIR)/apps/features $(SILENT)for f in `cat $(BUILDDIR)/apps/features`; do feat="$$feat:$$f" ; done ; \ + if [ -z "$$POOL" ] ; then \ + export POOL="$(BUILDDIR)/voice-pool" ; \ + fi;\ + mkdir -p $${POOL} ;\ for lang in `echo $(VOICELANGUAGE) |sed "s/,/ /g"`; do $(TOOLSDIR)/voice.pl -V -l=$$lang -t=$(MODELNAME)$$feat -i=$(TARGET_ID) -e="$(ENCODER)" -E="$(ENC_OPTS)" -s=$(TTS_ENGINE) -S="$(TTS_OPTS)"; done talkclips: voicetools diff --git a/tools/voice.pl b/tools/voice.pl index c62e4c164a..0e58bad503 100755 --- a/tools/voice.pl +++ b/tools/voice.pl @@ -666,9 +666,9 @@ if ($V == 1) { $SIG{INT} = \&panic_cleanup; $SIG{KILL} = \&panic_cleanup; - printf("Generating voice\n Target: %s\n Language: %s\n Encoder (options): %s (%s)\n TTS Engine (options): %s (%s)\n", + printf("Generating voice\n Target: %s\n Language: %s\n Encoder (options): %s (%s)\n TTS Engine (options): %s (%s)\n Pool directory: %s\n", defined($t) ? $t : "unknown", - $l, $e, $E, $s, $S); + $l, $e, $E, $s, $S, defined($ENV{'POOL'}) ? $ENV{'POOL'} : ""); generateclips($l, $t, $e, $E, $tts_object, $S, $f); shutdown_tts($tts_object); createvoice($l, $i, $f); -- cgit v1.2.3