upstream version 1.2.2
[debian/freetts] / com / sun / speech / freetts / en / us / cmu_us_kal / KevinVoiceDirectory.java
1 package com.sun.speech.freetts.en.us.cmu_us_kal;
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 default US/English Diphone voices
14  * imported from CMU Flite
15  *
16  */
17 public class KevinVoiceDirectory 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         CMULexicon lexicon = new CMULexicon("cmulex");
25         Voice kevin = new CMUDiphoneVoice("kevin", Gender.MALE,
26                 Age.YOUNGER_ADULT, "default 8-bit diphone voice",
27                 Locale.US, "general", "cmu", lexicon,
28                 this.getClass().getResource("cmu_us_kal.bin"));
29         Voice kevin16 = new CMUDiphoneVoice("kevin16", Gender.MALE,
30                 Age.YOUNGER_ADULT, "default 16-bit diphone voice",
31                 Locale.US, "general", "cmu", lexicon,
32                 this.getClass().getResource("cmu_us_kal16.bin"));
33
34         Voice[] voices = {kevin, kevin16};
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 KevinVoiceDirectory()).toString());
43     }
44 }