baseldomtemplate.java.template

来自「FreeTTS is a speech synthesis system wri」· TEMPLATE 代码 · 共 47 行

TEMPLATE
47
字号
package %PATH%.%VOICENAME%;import de.dfki.lt.freetts.ClusterUnitVoice;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;import java.net.URL;/** * This voice directory provides a Limited Domain Cluster Unit voice imported * from FestVox. * This is designed to be a base-class handeling non-Us-English voices, * the voice provided here is not a full TTS-voice. */public class %CLASSNAME% extends VoiceDirectory {    /**     * Gets the voices provided by this voice.     *     * @return an array of new Voice instances     */    public Voice[] getVoices() {	// if there is no phoneset.txt, this is null	URL phoneset = this.getClass().getResource("phoneset.txt");        // Change voice properties here        Voice voice = new ClusterUnitVoice("%NAME%",                Gender.%GENDER%, Age.%AGE%, "%DESCRIPTION%",                new Locale("%LOCALE%"), "%DOMAIN%", "%ORGANIZATION%",                null, this.getClass().getResource("%VOICENAME%.bin"),		null, phoneset, null);        Voice[] voices = {voice};        return voices;    }    /**     * Print out information about this voice jarfile.     */    public static void main(String[] args) {        System.out.println((new %CLASSNAME%()).toString());    }}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?