upstream version 1.2.2
[debian/freetts] / com / sun / speech / freetts / en / us / cmu_time_awb / AlanVoiceDirectory.java
1 package com.sun.speech.freetts.en.us.cmu_time_awb;
2
3 import com.sun.speech.freetts.en.us.CMUClusterUnitVoice;
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 default US/English Cluster Unit
14  * voice imported from CMU Flite.
15  */
16 public class AlanVoiceDirectory 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         CMULexicon lexicon = new CMULexicon("cmutimelex");
24         Voice alan = new CMUClusterUnitVoice("alan", Gender.MALE,
25                 Age.YOUNGER_ADULT, "default time-domain cluster unit voice",
26                 Locale.US, "time", "cmu", lexicon,
27                 this.getClass().getResource("cmu_time_awb.bin"));
28         Voice[] voices = {alan};
29         return voices;
30     }
31
32     /**
33      * Print out information about this voice jarfile.
34      */
35     public static void main(String[] args) {
36         System.out.println((new AlanVoiceDirectory()).toString());
37     }
38 }