summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rwxr-xr-xtools/configure66
-rwxr-xr-xtools/voice.pl14
2 files changed, 19 insertions, 61 deletions
diff --git a/tools/configure b/tools/configure
index 9ee2d3a5cb..0eb577f60e 100755
--- a/tools/configure
+++ b/tools/configure
@@ -450,54 +450,22 @@ voiceconfig () {
echo ""
- if [ -f "`which oggenc`" ]; then
- OGGENC="(O)ggenc "
- DEFAULT_ENC="oggenc"
- VORBIS_OPTS="-q0 --downmix"
- DEFAULT_ENC_OPTS=$VORBIS_OPTS
- DEFAULT_CHOICE="O"
- fi
- if [ -f "`which speexenc`" ]; then
- SPEEXENC="(S)peexenc "
- DEFAULT_ENC="speexenc"
- SPEEX_OPTS="" # TODO: find appropriate options for speex
- DEFAULT_ENC_OPTS=$SPEEX_OPTS
- DEFAULT_CHOICE="S"
- fi
- if [ -f "`which lame`" ]; then
- LAME="(L)ame "
- DEFAULT_ENC="lame"
- LAME_OPTS="--resample 12 -t -m m -h -V 9 -S -B 64 --vbr-new"
- DEFAULT_ENC_OPTS=$LAME_OPTS
- DEFAULT_CHOICE="L"
- fi
-
- if [ "$LAME" = "" ]; then
- echo "You currently need to have Lame installed to build voice files"
+ if [ "$swcodec" = "yes" ]; then
+ ENCODER="rbspeexenc"
+ ENC_CMD="$rootdir/tools/rbspeexenc"
+ ENC_OPTS="-q 4 -c 10"
+ else
+ if [ -f "`which lame`" ]; then
+ ENCODER="lame"
+ ENC_CMD="lame"
+ ENC_OPTS="--resample 12 -t -m m -h -V 9 -S -B 64 --vbr-new"
+ else
+ echo "You need LAME in the system path to build voice files for"
+ echo "HWCODEC targets."
+ exit
+ fi
fi
-
-# echo "Encoder to use: ${LAME}${OGGENC}${SPEEXENC}(${DEFAULT_CHOICE})?"
-# echo ""
-# echo "Note: Use Lame - the other options won't work"
-# option=`input`
- option="l"
- 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
+
echo "Using $ENCODER for encoding voice clips"
# Allow the user to input manual commandline options
@@ -1859,7 +1827,7 @@ sed > Makefile \
-e "${simmagic1}" \
-e "${simmagic2}" \
-e "s,@MANUALDEV@,${manualdev},g" \
- -e "s,@ENCODER@,${ENCODER},g" \
+ -e "s,@ENCODER@,${ENC_CMD},g" \
-e "s,@ENC_OPTS@,${ENC_OPTS},g" \
-e "s,@TTS_ENGINE@,${TTS_ENGINE},g" \
-e "s,@TTS_OPTS@,${TTS_OPTS},g" \
@@ -2073,7 +2041,7 @@ if [ "yes" = "$voice" ]; then
voice: voicetools features
\$(SILENT)for f in \`cat \$(BUILDDIR)/${apps}/features\`; do feat="\$\$feat:\$\$f" ; done ; \\
- for lang in \`echo \$(VOICELANGUAGE) |sed "s/,/ /g"\`; do \$(TOOLSDIR)/voice.pl -V -l=\$\$lang -t=\$(ARCHOS)\$\$feat -i=\$(TARGET_ID) -e=\$(ENCODER) -E="\$(ENC_OPTS)" -s=\$(TTS_ENGINE) -S="\$(TTS_OPTS)"; done \\
+ for lang in \`echo \$(VOICELANGUAGE) |sed "s/,/ /g"\`; do \$(TOOLSDIR)/voice.pl -V -l=\$\$lang -t=\$(ARCHOS)\$\$feat -i=\$(TARGET_ID) -e="\$(ENCODER)" -E="\$(ENC_OPTS)" -s=\$(TTS_ENGINE) -S="\$(TTS_OPTS)"; done \\
EOF
fi
diff --git a/tools/voice.pl b/tools/voice.pl
index 7d44def7b0..0549cccb00 100755
--- a/tools/voice.pl
+++ b/tools/voice.pl
@@ -264,17 +264,7 @@ sub encodewav {
my ($input, $output, $encoder, $encoder_opts, $tts_object) = @_;
my $cmd = '';
printf("Encode \"%s\" with %s in file %s\n", $input, $encoder, $output) if $verbose;
- switch ($encoder) {
- case 'lame' {
- $cmd = "lame $encoder_opts \"$input\" \"$output\"";
- }
- case 'vorbis' {
- $cmd = "oggenc $encoder_opts \"$input\" -o \"$output\"";
- }
- case 'speexenc' {
- $cmd = "speexenc $encoder_opts \"$input\" \"$output\"";
- }
- }
+ $cmd = "$encoder $encoder_opts \"$input\" \"$output\"";
if ($$tts_object{"name"} eq "sapi") {
print({$$tts_object{"stdin"}} "EXEC\t$cmd\r\n");
}
@@ -484,7 +474,7 @@ if ($V == 1) {
elsif ($C) {
printf("Generating .talk clips\n Path: %s\n Language: %s\n Encoder (options): %s (%s)\n TTS Engine (options): %s (%s)\n", $ARGV[0], $l, $e, $E, $s, $S);
my $tts_object = init_tts($s, $S, $l);
- gentalkclips($ARGV[0], $tts_object, $e, $E, 0);
+ gentalkclips($ARGV[0], $tts_object, $e, $E, $S, 0);
shutdown_tts($tts_object);
}
else {