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

Greg Kearney gkearney at gmail.com
Sun Apr 12 16:00:30 UTC 2009


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







More information about the DTB-Talk mailing list