From: <aut...@us...> - 2012-11-23 02:13:32
|
Revision: 473 http://upstage.svn.sourceforge.net/upstage/?rev=473&view=rev Author: aut-upstage Date: 2012-11-23 02:13:19 +0000 (Fri, 23 Nov 2012) Log Message: ----------- Scott & Gavin ------ voices.py fix attempt 11 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:41:16 UTC (rev 472) +++ branches/2.4.2/upstage/voices.py 2012-11-23 02:13:19 UTC (rev 473) @@ -43,7 +43,7 @@ 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 -s %%s --resample 22.05 - $1 " % timeout +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 @@ -57,17 +57,19 @@ #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/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, + s = ''.join((echo_in, timeout, "text2wave -eval '%s' " % voice, + options, " -otype wav - -o - ", log, (fest_lame % hz), log)) - return [s] + return [s] + + def _festival2(voice, hz, options=''): s = ''.join((echo_in, timeout, "text2wave -eval '%s' " % voice, options, " -otype wav - -o - ", log, @@ -101,11 +103,12 @@ 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)) + " | ", mbrola, " -e ", mboptions, " /usr/local/share/mbrola/", 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. VOICE_KIT = { #Shaun Narayan (01/23/10) - Changed sampling rate (from 16 to 8) for all festival voices as after voices bug fix they were too fast This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |