1 package com.sun.speech.freetts.en.us.%VOICENAME%;
3 import com.sun.speech.freetts.en.us.CMUTimeVoice;
4 import com.sun.speech.freetts.en.us.CMULexicon;
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;
13 * This voice directory provides a US/English Cluster Unit voice imported
14 * from FestVox. This is expressly written for the CMU Time voice, so
15 * it will require editing if you are importing any other type of voice.
17 public class %CLASSNAME% extends VoiceDirectory {
19 * Gets the voices provided by this voice.
21 * @return an array of new Voice instances
23 public Voice[] getVoices() {
24 // default to the generic lexicon
25 // (a more specific lexicon may increase performance)
26 CMULexicon lexicon = new CMULexicon("cmulex");
28 // Change voice properties here
29 Voice voice = new CMUTimeVoice("%NAME%",
30 Gender.%GENDER%, Age.%AGE%, "%DESCRIPTION%",
31 Locale.US, "%DOMAIN%", "%ORGANIZATION%",
33 this.getClass().getResource("%VOICENAME%.bin"));
35 Voice[] voices = {voice};
40 * Print out information about this voice jarfile.
42 public static void main(String[] args) {
43 System.out.println((new %CLASSNAME%()).toString());