update standards version
[debian/freetts] / tools / FestVoxToFreeTTS / CMU_USDiphoneTemplate.java.template
1 package com.sun.speech.freetts.en.us.%VOICENAME%;
2
3 import com.sun.speech.freetts.en.us.CMUDiphoneVoice;
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 Diphone voice imported
14  * from FestVox.
15  *
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         CMULexicon lexicon = new CMULexicon("cmulex");
26
27         // Change voice properties here
28         Voice voice = new CMUDiphoneVoice("%NAME%",
29                 Gender.%GENDER%, Age.%AGE%, "%DESCRIPTION%",
30                 Locale.US, "%DOMAIN%", "%ORGANIZATION%",
31                 lexicon,
32                 this.getClass().getResource("%VOICENAME%.bin"));
33
34         Voice[] voices = {voice};
35         return voices;
36     }
37
38     /**
39      * Print out information about this voice jarfile.
40      */
41     public static void main(String[] args) {
42         System.out.println((new %CLASSNAME%()).toString());
43     }
44 }