001package com.sun.speech.freetts.en.us.cmu_time_awb;
002
003import com.sun.speech.freetts.en.us.CMUClusterUnitVoice;
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 a default US/English Cluster Unit
014 * voice imported from CMU Flite.
015 */
016public class AlanVoiceDirectory extends VoiceDirectory {
017    /**
018     * Gets the voices provided by this voice.
019     *
020     * @return an array of new Voice instances
021     */
022    public Voice[] getVoices() {
023        CMULexicon lexicon = new CMULexicon("cmutimelex");
024        Voice alan = new CMUClusterUnitVoice("alan", Gender.MALE,
025                Age.YOUNGER_ADULT, "default time-domain cluster unit voice",
026                Locale.US, "time", "cmu", lexicon,
027                this.getClass().getResource("cmu_time_awb.bin"));
028        Voice[] voices = {alan};
029        return voices;
030    }
031
032    /**
033     * Print out information about this voice jarfile.
034     */
035    public static void main(String[] args) {
036        System.out.println((new AlanVoiceDirectory()).toString());
037    }
038}