update standards version
[debian/freetts] / tools / FestVoxToFreeTTS / BaseLdomTemplate.java.template
1 package %PATH%.%VOICENAME%;
2
3 import de.dfki.lt.freetts.ClusterUnitVoice;
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;
9 import java.net.URL;
10
11
12 /**
13  * This voice directory provides a Limited Domain Cluster Unit voice imported
14  * from FestVox.
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.
17  */
18 public class %CLASSNAME% extends VoiceDirectory {
19     /**
20      * Gets the voices provided by this voice.
21      *
22      * @return an array of new Voice instances
23      */
24     public Voice[] getVoices() {
25
26         // if there is no phoneset.txt, this is null
27         URL phoneset = this.getClass().getResource("phoneset.txt");
28
29         // Change voice properties here
30         Voice voice = new ClusterUnitVoice("%NAME%",
31                 Gender.%GENDER%, Age.%AGE%, "%DESCRIPTION%",
32                 new Locale("%LOCALE%"), "%DOMAIN%", "%ORGANIZATION%",
33                 null, this.getClass().getResource("%VOICENAME%.bin"),
34                 null, phoneset, null);
35
36         Voice[] voices = {voice};
37         return voices;
38     }
39
40     /**
41      * Print out information about this voice jarfile.
42      */
43     public static void main(String[] args) {
44         System.out.println((new %CLASSNAME%()).toString());
45     }
46 }