shithub: flite

Download patch

ref: 0d95d09827234380adb26141453fc1df4972fc0f
parent: 7e413db2665c2ca199b0c66fd262779631228b80
author: Alan W Black <awb@cs.cmu.edu>
date: Wed Nov 22 04:23:31 EST 2017

get_voices

--- a/Makefile
+++ b/Makefile
@@ -73,6 +73,10 @@
 configure: configure.in
 	autoconf
 
+get_voices:
+	./bin/get_voices us_voices
+#	 ./bin/get_voices indic_voices
+
 backup: time-stamp
 	@ $(RM) -f $(TOP)/FileList
 	@ $(MAKE) file-list
--- a/README.md
+++ b/README.md
@@ -252,6 +252,7 @@
     cd flite-2.1-current
     ./configure 
     make
+    make get_voices
 
 Where tar is gnu tar (gtar), and make is gnu make (gmake).
 
@@ -261,6 +262,7 @@
     cd flite
     ./configure
     make
+    make get_voices
 
 Configuration should be automatic, but maybe doesn't work in all cases
 especially if you have some new compiler.  You can explicitly set the
@@ -361,7 +363,7 @@
 
 Speak with the "Scottish" male awb voice (builtin version)
 
-   ./bin/flite -voice awb -f doc/alice
+    ./bin/flite -voice awb -f doc/alice
 
 Speak with the US female slt voice
 
@@ -369,17 +371,20 @@
 
 Speak with AEW voice, download on the fly from festvox.org
 
-    ./bin/flite -voice http://festvox.org/flite/voices/US/cmu_us_aew.flitevox -f doc/alice
+    ./bin/flite -voice http://festvox.org/flite/packed/flite-2.1/voices/cmu_us_aew.flitevox -f doc/alice
 
 Speak with AHW voice loaded from the local file.
 
     ./bin/flite -voice voices/cmu_us_ahw.flitevox -f doc/alice
 
-Voice names are identified as loadable files if the name includes a
-"/" (slash) otherwise they are treated as internal names.  So if you
-want to load voices from the current directory you need to prefix the
-with "./".
+You can download the available voices into voices/
 
+    ./bin/get_voices us_voices
+
+and/or
+
+    ./bin/get_voices indic_voices
+
 Voice quality
 -------------
 
@@ -401,9 +406,9 @@
 process.  
 
 We expect that often voices will be loaded from external files, and we
-have now set up a voice repository on
+have now set up a voice repository in
 
-    http://festvox.org/flite/voices/LANG/*.flitevox
+    http://festvox.org/flite/flite-2.1/voices/*.flitevox
    
 If you visit there with a browser you can hear the examples.  You can
 also download the .flitevox files to you machine so you don't need a
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -49,7 +49,8 @@
           make_voice_list wfst2c build_lex clunit_prune \
           a2byte.pl a2short.pl a2int.pl flite_rename_voice \
           make_lang_list make_new_lang_lex flitechecks \
-          add_flite_feats make_flite_feats run_flitecheck quantize_params 
+          add_flite_feats make_flite_feats run_flitecheck quantize_params \
+          get_voices
 SCM=make_lex.scm make_lts.scm make_cart.scm play_sync.scm \
     make_phoneset.scm make_vallist.scm make_clunits.scm \
     make_didb.scm make_didb2.scm make_f0lr.scm make_lts_wfst.scm \
--- /dev/null
+++ b/tools/get_voices
@@ -1,0 +1,103 @@
+#!/bin/sh
+###########################################################################
+##                                                                       ##
+##                  Language Technologies Institute                      ##
+##                     Carnegie Mellon University                        ##
+##                         Copyright (c) 2017                            ##
+##                        All Rights Reserved.                           ##
+##                                                                       ##
+##  Permission is hereby granted, free of charge, to use and distribute  ##
+##  this software and its documentation without restriction, including   ##
+##  without limitation the rights to use, copy, modify, merge, publish,  ##
+##  distribute, sublicense, and/or sell copies of this work, and to      ##
+##  permit persons to whom this work is furnished to do so, subject to   ##
+##  the following conditions:                                            ##
+##   1. The code must retain the above copyright notice, this list of    ##
+##      conditions and the following disclaimer.                         ##
+##   2. Any modifications must be clearly marked as such.                ##
+##   3. Original authors' names are not deleted.                         ##
+##   4. The authors' names are not used to endorse or promote products   ##
+##      derived from this software without specific prior written        ##
+##      permission.                                                      ##
+##                                                                       ##
+##  CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK         ##
+##  DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING      ##
+##  ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT   ##
+##  SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE      ##
+##  FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES    ##
+##  WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN   ##
+##  AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,          ##
+##  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF       ##
+##  THIS SOFTWARE.                                                       ##
+##                                                                       ##
+###########################################################################
+##             Author:  Alan W Black (awb@cs.cmu.edu)                    ##
+##               Date:  November 2017                                    ##
+###########################################################################
+##                                                                       ##
+##  Download some .flitevox voices                                       ##
+##                                                                       ##
+###########################################################################
+
+if [ ! -f include/flite.h ]
+then
+    echo "Not in the right directory."
+    echo "You should be in the flite main src directory to run this script"
+    echo "where ls -l include/flite.h is found"
+    exit -1
+fi
+
+if [ ! -d voices ]
+then
+    mkdir voices
+fi
+
+if [ $# = 0 ]
+then
+    $0 us_voices
+    exit 0
+fi
+
+#FLITEVOICEDIR=http://tts.speech.cs.cmu.edu/awb/flite-2.1/voices/
+#FLITEVOICEDIR=http://festvox.org/flite/packed/flite-2.1/voices/
+FLITEVOICEDIR=http://cmuflite.org/packed/flite-2.1/voices/
+
+if [ "$1" = "us_voices" ]
+then
+     cd voices
+     wget $FLITEVOICEDIR/us_voices
+     for i in `grep ".flitevox$" us_voices`
+     do
+         vname=`basename $i`
+         rm -f $vname
+         wget $FLITEVOICEDIR/$vname
+     done
+     rm -f us_voices
+     exit 0
+fi    
+
+if [ "$1" = "indic_voices" ]
+then
+     cd voices
+     wget $FLITEVOICEDIR/indic_voices
+     for i in `grep ".flitevox$" indic_voices`
+     do
+         vname=`basename $i`
+         rm -f $vname
+         wget $FLITEVOICEDIR/$vname
+     done
+     rm -f indic_voices
+     exit 0
+fi    
+
+if [ "$1" = "all_voices" ]
+then
+     $0 us_voices
+     $0 indic_voices
+     exit 0
+fi    
+
+exit
+
+
+