[Dtb-talk] Using Daisy Pipeline language feature to change gendersor voices

Greg Kearney gkearney at gmail.com
Mon Apr 13 14:04:33 UTC 2009


Yes this can be done on any platform simply use the calls for each OS  
in the ttsbuilder.xml file for example in Windows:

<lang lang="xf">
	<tts>
		<param name="class"  
value="se_tpb_speechgen2.external.win.DefaultSapiTTS"/>
		<param name="xslt" value="${transformer_dir}/xslt/transform.xsl"/>
		<param name="characterSubstitutionTables" value="${transformer_dir}/ 
charsubst/character-translation-table.xml"/>
		<param name="sapiVoiceSelection" value="Gender=Female;Age! 
=Child;Language=409"/>
	</tts>

See the Microsoft SAPI XML TTS tutorial for further details on how to  
configure the SAPI voice selection:
http://msdn.microsoft.com/en-us/library/ms985684.aspx


And in Linux:

<lang lang="xf">
	<tts>
		<param name="eSpeakVoiceFile" value="en-rp"/> <!-- what ever English  
voice you are using -->
		<param name="class"  
value="se_tpb_speechgen2.external.linux.ESpeakTTS"/>				
		<param name="characterSubstitutionTables" value="${transformer_dir}/ 
charsubst/character-translation-table.xml"/>
		<param name="year" value="${transformer_dir}/regex/year_en.xml"/>
		<param name="xslt" value="${transformer_dir}/xslt/transform.xsl"/>
	</tts>
</lang>

When ever you call the "language" xf you will get the voice you  
specified for it. You simply need to copy the call for the voice in  
the language you wish to use and then make a fake language code for  
that new voice.

Greg Kearney
535 S. Jackson St.
Casper, Wyoming 82601
307-224-4022
gkearney at gmail.com



On Apr 12, 2009, at 9:13 PM, Rakesh Chand wrote:

> Hi Greg,
>
> Wonder if this is applicable to windows users too?
>
> Was just wondering because, I'm not a Macintosh system user.
>
> Many thanks, Happy Easter!
>
> Rakesh
>
> ----- Original Message ----- From: "Greg Kearney" <gkearney at gmail.com>
> To: "Discussion of Digital Talking Books" <dtb-talk at nfbnet.org>;  
> "daisy multiformat converter interest group" <dmfc-ig at mail.daisy.org>
> Cc: "Chris Smith" <smithca at uga.edu>; "Carol Solosy" <carols at guidedogswa.com.au 
> >; "Romain Deltour" <romain_deltour at yahoo.fr>; "Christopher Lee" <leecm at uga.edu 
> >; "David Vosnacos" <davidv at guidedogswa.com.au>
> Sent: Monday, April 13, 2009 4:00 AM
> Subject: [Dtb-talk] Using Daisy Pipeline language feature to change  
> gendersor voices
>
>
>> What follows is a bit technical so if you are not so inclined you  
>> have been warned.
>>
>> The latest version of Daisy Pipeline provides a means of changing   
>> voices by using Pipeline's language detection feature. To do this  
>> I  create a fake language in the ttsbuilder.xml file for the voice  
>> I wish  to use. like this:
>>
>> <lang lang="xf">
>> <tts>
>> <param name="class"   
>> value="se_tpb_speechgen2.external.MacOS.MacSayTTS"/>
>>                <param name="regex" value="${transformer_dir}/regex/  
>> macosx-say.xml"/>
>> <param name="xslt" value="${transformer_dir}/xslt/transform.xsl"/>
>> <!-- The voice parameter is a coma-separated list of voice names-->
>> <!-- The first existing voice will be used -->
>> <!-- If the voice is unknown, the default system voice will be  
>> used  -->
>> <param name="voice" value="Vicki"/>
>> </tts>
>> </lang>
>>
>> I have used xf for my "language" code as it is unused by the ISO  
>> 639-1 standard for any other language. I then marked any paragraph,  
>> division  or span with the corresponding xf  "language" code:
>>
>> <p xml:lang="xf">This is a female voice.</p>
>>
>> Note that on the Macintosh system you should spell out the whole  
>> voice name as it appears in the system preferences. So for an  
>> AssitiveWare voice you would add this:
>>
>> <param name="voice" value="Laura Infovox iVox HQ"/>
>>
>> Make sure you have a proper distribution license before  
>> distributing books with voices other than those from Apple however.
>>
>> The result is that the voice will switch over to the female English  
>> Voice. A similar technique could be used to change voices from an  
>> American to an English voice.
>>
>> This brings up a short coming in the way the language selector is  
>> currently implemented in the Pipeline as it only accepts two letter  
>> language codes meaning that we are not able to specify regional   
>> language variations such as en-US, en-UK, en-AU and so on to  
>> switch  voices to regional dialects of the same language. If this  
>> were  supported we could for example use en-FM for female or even  
>> better  something like en-US-female. As it stands right now using  
>> things like  xf is a bit of a hack.
>>
>> The language selector is a great improvement and will be a big help  
>> to organisations such as AMAC in developing books which need to  
>> switch  from one language to another. Extending this to other voice  
>> selection  should be useful in producing things like plays.
>>
>> Greg Kearney
>> 535 S. Jackson St.
>> Casper, Wyoming 82601
>> 307-224-4022
>> gkearney at gmail.com
>>
>>
>>
>>
>> _______________________________________________
>> Dtb-talk mailing list
>> Dtb-talk at nfbnet.org
>> http://www.nfbnet.org/mailman/listinfo/dtb-talk_nfbnet.org
>> To unsubscribe, change your list options or get your account info  
>> for Dtb-talk:
>> http://www.nfbnet.org/mailman/options/dtb-talk_nfbnet.org/chand%40connect.com.fj
>>
>> __________ NOD32 4002 (20090411) Information __________
>>
>> This message was checked by NOD32 antivirus system.
>> http://www.eset.com
>>
>




More information about the DTB-Talk mailing list