#!/bin/sh #####################################################-*-mode:shell-script-*- ### ## ### Alan W Black and Kevin Lenzo ## ### Copyright (c) 1998 ## ### All Rights Reserved. ## ### ## ### Permission to use, copy, modify, and licence this software and its ## ### documentation for any purpose, is hereby granted without fee, ## ### 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. ## ### ## ### THE AUTHORS OF THIS WORK DISCLAIM ALL WARRANTIES WITH REGARD TO ## ### THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY ## ### AND FITNESS, IN NO EVENT SHALL THE AUTHORS 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. ## ### ## ### This file is part "Building Voices in the Festival Speech ## ### Synthesis System" by Alan W Black and Kevin Lenzo written at ## ### Robotics Institute, Carnegie Mellon University, fall 98 ## ############################################################################ ### ## ### Prompt and record diphone set ## ### ## ############################################################################ if [ $# = 0 ] then echo "prompt and record diphone nonsense words" echo "Usage: prompt_them DIPHLIST [POSITION] " echo " DIPHLIST list of diphone/nonsense words e.g. etc/VOXdiphlist" echo " POSTION which diphone to start/restart at, default is 0" exit 1 fi if [ ! -d prompt-wav ] then echo "can't find prompt-wave/ directory." echo "are you in the right directory?" exit 1 fi POSITION=0 if [ $# = 2 ] then POSITION=$2 fi cat $1 | awk '{if (NR >= '$POSITION') print $0}' | while read lll do echo $lll f=`echo $lll | awk '{print $2}'` na_play prompt-wav/$f.wav duration=`$ESTDIR/bin/ch_wave -info prompt-wav/$f.wav | awk '{if ($1 == "Duration:") printf("%d\n",$2+1.5)}'` echo start recording for $duration seconds ... na_record -f 16000 -time $duration -o wav/$f.wav echo ... end recording echo Review $f na_play prompt-wav/$f.wav na_play wav/$f.wav done