From: <aut...@us...> - 2012-11-23 01:09:48
|
Revision: 467 http://upstage.svn.sourceforge.net/upstage/?rev=467&view=rev Author: aut-upstage Date: 2012-11-23 01:09:40 +0000 (Fri, 23 Nov 2012) Log Message: ----------- Scott & Gavin ------ voices.py fix attempt 5 Modified Paths: -------------- branches/2.4.2/upstage/voices.py Modified: branches/2.4.2/upstage/voices.py =================================================================== --- branches/2.4.2/upstage/voices.py 2012-11-23 01:07:15 UTC (rev 466) +++ branches/2.4.2/upstage/voices.py 2012-11-23 01:09:40 UTC (rev 467) @@ -43,9 +43,9 @@ echo_in = ''#cat | ' #"read SPEECH ; echo $SPEECH |" #Heath Behrens readded the -x switch used for byte switching as it breaks some voices. -fest_lame = " | %s lame -S --quiet -m s -r -s %%s --resample 22.05 --preset phone - $1 " % timeout -rsynth_lame = " | %s lame -S --quiet -m m -r -s 11.025 --preset phone - $1 " % timeout -espeak_mbrola_lame = " %s lame -S --quiet -m m -s 16 --resample 22.05 --preset phone $1.wav $1" % timeout +fest_lame = " | %s lame -S --quiet -m s -s %%s --resample 22.05 - $1 " % timeout +rsynth_lame = " | %s lame -S --quiet -m m -r -s 11.025 --preset phone - $1 " % timeout +espeak_mbrola_lame = " | %s lame -S --quiet -m m -s 16 --resample 22.05 --preset phone $1.wav $1" % timeout # espeak doesn't seem to like piping to stdout, so it saves to tmp file instead espeak_lame = " %s lame -S --quiet -m m -s 22.05 --preset phone $1.wav $1 " % timeout @@ -57,20 +57,20 @@ #The other option is to simply copy all voices from the folder to the previous folder. path_to_embrola_alt = "/usr/share/mbrola/voices" -text2wave = '/usr/local/src/festival/bin/text2wave' +text2wave = '/usr/local/share/festvox/festival/bin/text2wave' #these functions are run over the definitions in VOICE_KIT, below, to #create the appropriate shell script for each voice. def _festival(voice, hz): s = ''.join((echo_in, timeout, "text2wave -eval '%s' " % voice, - " -otype wav - -o - ", log, + " -otype raw - -o - ", log, (fest_lame % hz), log)) return [s] def _festival2(voice, hz, options=''): s = ''.join((echo_in, timeout, "text2wave -eval '%s' " % voice, - options, " -otype wav - -o - ", log, + options, " -otype raw - -o - ", log, (fest_lame % hz), log)) return [s] @@ -101,9 +101,9 @@ if not espeak or not mbrola: return None s = ''.join((echo_in, timeout, espeak, " -k27 -v ", voice, options, " --stdin ", log, - " | ", mbrola, " -e ", mboptions, " /usr/share/mbrola/", mbvoice, - " - $1.wav ", log)) -return [s, espeak_mbrola_lame, espeak_cleanup] + " | ", mbrola, " -e ", mboptions, " " + path_to_embrola, mbvoice, + " - $1.wav ", log)) + return [s, espeak_mbrola_lame, espeak_cleanup] #XXX perhaps ought to be moved OUT of python code into a real config file. This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |