upstream version 1.2.2
[debian/freetts] / tools / FestVoxToFreeTTS / CMU_USClunitTemplate.java.template
1 package com.sun.speech.freetts.en.us.%VOICENAME%;
2
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;
10
11
12 /**
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.
16  */
17 public class %CLASSNAME% extends VoiceDirectory {
18     /**
19      * Gets the voices provided by this voice.
20      *
21      * @return an array of new Voice instances
22      */
23     public Voice[] getVoices() {
24         // default to the generic lexicon
25         // (a more specific lexicon may increase performance)
26         CMULexicon lexicon = new CMULexicon("cmulex");
27
28         // Change voice properties here
29         Voice voice = new CMUTimeVoice("%NAME%",
30                 Gender.%GENDER%, Age.%AGE%, "%DESCRIPTION%",
31                 Locale.US, "%DOMAIN%", "%ORGANIZATION%",
32                 lexicon,
33                 this.getClass().getResource("%VOICENAME%.bin"));
34
35         Voice[] voices = {voice};
36         return voices;
37     }
38
39     /**
40      * Print out information about this voice jarfile.
41      */
42     public static void main(String[] args) {
43         System.out.println((new %CLASSNAME%()).toString());
44     }
45 }