001package com.sun.speech.freetts.en.us.cmu_us_kal;
002
003import com.sun.speech.freetts.en.us.CMUDiphoneVoice;
004import com.sun.speech.freetts.en.us.CMULexicon;
005import com.sun.speech.freetts.VoiceDirectory;
006import com.sun.speech.freetts.Voice;
007import com.sun.speech.freetts.Gender;
008import com.sun.speech.freetts.Age;
009import java.util.Locale;
010
011
012/**
013 * This voice directory provides default US/English Diphone voices
014 * imported from CMU Flite
015 *
016 */
017public class KevinVoiceDirectory extends VoiceDirectory {
018    /**
019     * Gets the voices provided by this voice.
020     *
021     * @return an array of new Voice instances
022     */
023    public Voice[] getVoices() {
024        CMULexicon lexicon = new CMULexicon("cmulex");
025        Voice kevin = new CMUDiphoneVoice("kevin", Gender.MALE,
026                Age.YOUNGER_ADULT, "default 8-bit diphone voice",
027                Locale.US, "general", "cmu", lexicon,
028                this.getClass().getResource("cmu_us_kal.bin"));
029        Voice kevin16 = new CMUDiphoneVoice("kevin16", Gender.MALE,
030                Age.YOUNGER_ADULT, "default 16-bit diphone voice",
031                Locale.US, "general", "cmu", lexicon,
032                this.getClass().getResource("cmu_us_kal16.bin"));
033
034        Voice[] voices = {kevin, kevin16};
035        return voices;
036    }
037
038    /**
039     * Print out information about this voice jarfile.
040     */
041    public static void main(String[] args) {
042        System.out.println((new KevinVoiceDirectory()).toString());
043    }
044}