upstream version 1.2.2
[debian/freetts] / tools / ArcticToFreeTTS / ArcticVoiceDirectory.java.template
1 package com.sun.speech.freetts.en.us.%FV_VOICENAME%;
2
3 import com.sun.speech.freetts.en.us.CMULexicon;
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
10
11 /**
12  * This voice directory provides a US/English Cluster Unit voice imported
13  * from FestVox.
14  *
15  */
16 public class ArcticVoiceDirectory extends VoiceDirectory {
17     /**
18      * Gets the voices provided by this voice.
19      *
20      * @return an array of new Voice instances
21      */
22     public Voice[] getVoices() {
23         // default to the generic lexicon
24         // (a more specific lexicon may increase performance)
25         CMULexicon lexicon = new CMULexicon("cmudict04");
26
27         // Change voice properties here
28         Voice voice = new ArcticVoice(
29             "%FV_NAME%",
30             Gender.MALE,
31             Age.YOUNGER_ADULT,
32             "CMU ARCTIC Cluster Unit Voice",
33             Locale.US,
34             "general",
35             "%FV_INST%",
36             lexicon,
37             this.getClass().getResource("%FV_VOICENAME%.txt"));
38
39         Voice[] voices = {voice};
40         return voices;
41     }
42
43     /**
44      * Print out information about this voice jarfile.
45      */
46     public static void main(String[] args) {
47         System.out.println((new ArcticVoiceDirectory()).toString());
48     }
49 }