1 package %PATH%.%VOICENAME%;
3 import de.dfki.lt.freetts.ClusterUnitVoice;
4 import de.dfki.lt.freetts.UniphoneClusterUnitNamer;
5 import com.sun.speech.freetts.VoiceDirectory;
6 import com.sun.speech.freetts.Voice;
7 import com.sun.speech.freetts.Gender;
8 import com.sun.speech.freetts.Age;
9 import java.util.Locale;
14 * This voice directory provides a Cluster Unit voice imported
16 * This is designed to be a base-class handeling non-Us-English voices,
17 * the voice provided here is not a full TTS-voice.
19 public class %CLASSNAME% extends VoiceDirectory {
21 * Gets the voices provided by this voice.
23 * @return an array of new Voice instances
25 public Voice[] getVoices() {
27 //if there is no phoneset.txt, this is null
28 URL phoneset = this.getClass().getResource("phoneset.txt");
30 // Change voice properties here
31 Voice voice = new ClusterUnitVoice("%NAME%",
32 Gender.%GENDER%, Age.%AGE%, "%DESCRIPTION%",
33 new Locale("%LOCALE%"), "%DOMAIN%", "%ORGANIZATION%",
34 null,this.getClass().getResource("%VOICENAME%.bin"),
35 new UniphoneClusterUnitNamer(), phoneset, null);
37 Voice[] voices = {voice};
42 * Print out information about this voice jarfile.
44 public static void main(String[] args) {
45 System.out.println((new %CLASSNAME%()).toString());