1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
package com.sun.speech.freetts.en.us.%FV_VOICENAME%;
import com.sun.speech.freetts.en.us.CMULexicon;
import com.sun.speech.freetts.VoiceDirectory;
import com.sun.speech.freetts.Voice;
import com.sun.speech.freetts.Gender;
import com.sun.speech.freetts.Age;
import java.util.Locale;
/**
* This voice directory provides a US/English Cluster Unit voice imported
* from FestVox.
*
*/
public class ArcticVoiceDirectory extends VoiceDirectory {
/**
* Gets the voices provided by this voice.
*
* @return an array of new Voice instances
*/
public Voice[] getVoices() {
// default to the generic lexicon
// (a more specific lexicon may increase performance)
CMULexicon lexicon = new CMULexicon("cmudict04");
// Change voice properties here
Voice voice = new ArcticVoice(
"%FV_NAME%",
Gender.MALE,
Age.YOUNGER_ADULT,
"CMU ARCTIC Cluster Unit Voice",
Locale.US,
"general",
"%FV_INST%",
lexicon,
this.getClass().getResource("%FV_VOICENAME%.txt"));
Voice[] voices = {voice};
return voices;
}
/**
* Print out information about this voice jarfile.
*/
public static void main(String[] args) {
System.out.println((new ArcticVoiceDirectory()).toString());
}
}
|