1#!/bin/sh 2####################################################-*-mode:shell-script-*- 3## ## 4## Carnegie Mellon University and ## 5## Alan W Black and Kevin A. Lenzo ## 6## Copyright (c) 1998-2000 ## 7## All Rights Reserved. ## 8## ## 9## Permission is hereby granted, free of charge, to use and distribute ## 10## this software and its documentation without restriction, including ## 11## without limitation the rights to use, copy, modify, merge, publish, ## 12## distribute, sublicense, and/or sell copies of this work, and to ## 13## permit persons to whom this work is furnished to do so, subject to ## 14## the following conditions: ## 15## 1. The code must retain the above copyright notice, this list of ## 16## conditions and the following disclaimer. ## 17## 2. Any modifications must be clearly marked as such. ## 18## 3. Original authors' names are not deleted. ## 19## 4. The authors' names are not used to endorse or promote products ## 20## derived from this software without specific prior written ## 21## permission. ## 22## ## 23## CARNEGIE MELLON UNIVERSITY AND THE CONTRIBUTORS TO THIS WORK ## 24## DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ## 25## ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT ## 26## SHALL CARNEGIE MELLON UNIVERSITY NOR THE CONTRIBUTORS BE LIABLE ## 27## FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES ## 28## WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN ## 29## AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ## 30## ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF ## 31## THIS SOFTWARE. ## 32## ## 33########################################################################### 34 35if [ $# = 0 ] 36then 37 echo "Make voice distribution" 38 echo "Usage: bin/make_dist TYPE" 39 echo "Where TYPE is one of" 40 echo " festvox: runtime voice distribution (README, COPYING, festvox/" 41 echo " festival/clunits/*.catalog festival/tree/*.tree" 42 echo " backup: backup copy of basic stuff and some derived stuff" 43 echo " (no prompts, lpc, plm_lab or f0)" 44 echo " devlite: Typical files you change in development" 45 echo " bin/ etc/ lab/ pm/ festival/clunits/" 46 47 exit 1 48fi 49 50if [ ! "$ESTDIR" ] 51then 52 echo "environment variable ESTDIR is unset" 53 echo "set it to your local speech tools directory e.g." 54 echo ' bash$ export ESTDIR=/home/awb/projects/speech_tools/' 55 echo or 56 echo ' csh% setenv ESTDIR /home/awb/projects/speech_tools/' 57 exit 1 58fi 59 60if [ ! -f etc/voice.defs ] 61then 62 $FESTVOXDIR/src/general/guess_voice_defs 63fi 64. ./etc/voice.defs 65if [ ! -d versions ] 66then 67 mkdir versions 68fi 69 70OPTNAME=$2 71 72# Voice distribution has festival/lib/voice/LANG/voicename as prefix 73# for all files 74if [ $1 = "festvox" ] 75then 76 fvdir=festival/lib/voices/$FV_LANG/$FV_FULLVOICENAME 77 if [ ! -f $fvdir ] 78 then 79 mkdir -p `dirname $fvdir` 80 (cd `dirname $fvdir`; ln -s ../../../.. $FV_FULLVOICENAME) 81 fi 82 fvsigdir=$fvdir/wav 83 tar zcvf versions/festvox_$FV_FULLVOICENAME$OPTNAME.tar.gz \ 84 $fvdir/README \ 85 $fvdir/COPYING \ 86 $fvdir/festvox/*.scm \ 87 $fvdir/festival/clunits/$FV_VOICENAME.catalogue \ 88 $fvdir/festival/trees/$FV_VOICENAME.tree \ 89 $fvdir/mcep/*.mcep \ 90 $fvsigdir/* 91 # that symlink causes some people problesm in cp's 92 rm $fvdir 93fi 94 95# For storing forever, or at least a clean copy of the base form of 96# everything. 97if [ $1 = "backup" ] 98then 99 fvdir=. 100 mkdir -p $fvdir 101 touch $fvdir/lpc/.something 102 touch $fvdir/festival/feats/.something 103 touch $fvdir/festival/disttabs/.something 104 tar zcvf versions/festvox_$FV_VOICENAME$OPTNAME"_backup".tar.gz \ 105 $fvdir/README \ 106 $fvdir/COPYING \ 107 $fvdir/festvox/*.scm \ 108 $fvdir/festival/clunits/* \ 109 $fvdir/festival/trees/$FV_VOICENAME.tree \ 110 $fvdir/festival/utts/*.utt \ 111 $fvdir/lpc/.something \ 112 $fvdir/festival/feats/.something \ 113 $fvdir/festival/disttabs/.something \ 114 $fvdir/bin/* \ 115 $fvdir/etc/* \ 116 $fvdir/pm/*.pm \ 117 $fvdir/mcep/*.mcep \ 118 $fvdir/wav/*.wav \ 119 $fvdir/lab/*.lab 120fi 121 122if [ $1 = "recording" ] 123then 124 fvdir=. 125 tar zcvf versions/$FV_VOICENAME$OPTNAME"_orig".tar.gz \ 126 $fvdir/etc/*.data \ 127 $fvdir/rcording 128fi 129 130if [ $1 = "devlite" ] 131then 132 fvdir=. 133 touch $fvdir/lpc/.something 134 touch $fvdir/festival/feats/.something 135 tar zcvf versions/festvox_$FV_VOICENAME$OPTNAME"_devlite".tar.gz \ 136 $fvdir/README \ 137 $fvdir/COPYING \ 138 $fvdir/festvox/*.scm \ 139 $fvdir/festival/clunits/* \ 140 $fvdir/festival/trees/$FV_VOICENAME.tree \ 141 $fvdir/bin/* \ 142 $fvdir/etc/* \ 143 $fvdir/pm/*.pm \ 144 $fvdir/lab/*.lab 145fi 146 147