2 * Copyright 2001 Sun Microsystems, Inc.
4 * See the file "license.terms" for information on usage and
5 * redistribution of this file, and for a DISCLAIMER OF ALL
8 package com.sun.speech.engine.synthesis.text;
10 import java.util.Locale;
12 import javax.speech.Engine;
13 import javax.speech.EngineCreate;
14 import javax.speech.EngineException;
15 import javax.speech.synthesis.SynthesizerModeDesc;
16 import javax.speech.synthesis.Voice;
18 import com.sun.speech.engine.synthesis.BaseVoice;
21 * Describes the <code>TextSynthesizer</code>. Builds up the
22 * voice list and other data.
24 public class TextSynthesizerModeDesc extends SynthesizerModeDesc
25 implements EngineCreate {
30 public TextSynthesizerModeDesc() {
31 super("Text Synthesizer", // engine name
32 "simple text output", // mode name
34 Boolean.FALSE, // running?
37 // Add voices known to this synthesizer.
38 addVoice(new BaseVoice("Mike-1", "Mike", Voice.GENDER_MALE,
39 Voice.AGE_MIDDLE_ADULT, "standard",
40 120.0f, 50.0f, 150.0f, 1.0f));
41 addVoice(new BaseVoice("Peter-2", "Peter", Voice.GENDER_MALE,
42 Voice.AGE_YOUNGER_ADULT, "standard",
43 135.0f, 34.0f, 165.0f, 1.0f));
44 addVoice(new BaseVoice("Paul-3", "Paul", Voice.GENDER_MALE,
45 Voice.AGE_MIDDLE_ADULT, "standard",
46 90.0f, 30.0f, 120.0f, 1.0f));
47 addVoice(new BaseVoice("Mary-4", "Mary", Voice.GENDER_FEMALE,
48 Voice.AGE_OLDER_ADULT, "standard",
49 200.0f, 80.0f, 190.0f, 1.0f));
53 * Constructs a text synthesizer with the properties of this mode
56 * @throws IllegalArgumentException
57 * @throws EngineException
58 * @throws SecurityException
60 public Engine createEngine()
61 throws IllegalArgumentException, EngineException, SecurityException {
62 TextSynthesizer s = new TextSynthesizer(this);
64 throw new EngineException();