1 package %PATH%.%VOICENAME%;
3 import de.dfki.lt.freetts.DiphoneVoice;
4 import com.sun.speech.freetts.VoiceDirectory;
5 import com.sun.speech.freetts.Voice;
6 import com.sun.speech.freetts.Gender;
7 import com.sun.speech.freetts.Age;
8 import java.util.Locale;
13 * This voice directory provides a diphone voice imported
15 * This is designed to be a base-class handeling non-Us-English voices,
16 * the voice provided here is not a full TTS-voice.
18 public class %CLASSNAME% extends VoiceDirectory {
20 * Gets the voices provided by this voice.
22 * @return an array of new Voice instances
24 public Voice[] getVoices() {
26 //if there is no phoneset.txt, this is null
27 URL phoneset = this.getClass().getResource("phoneset.txt");
29 // Change voice properties here
30 Voice voice = new DiphoneVoice("%NAME%",
31 Gender.%GENDER%, Age.%AGE%, "%DESCRIPTION%",
32 new Locale("%LOCALE%"), "%DOMAIN%", "%ORGANIZATION%",
33 null,this.getClass().getResource("%VOICENAME%.bin"),
37 voice.setPitchRange(12F);
39 Voice[] voices = {voice};
44 * Print out information about this voice jarfile.
46 public static void main(String[] args) {
47 System.out.println((new %CLASSNAME%()).toString());