2 * Portions Copyright 2001 Sun Microsystems, Inc.
3 * Portions Copyright 1999-2001 Language Technologies Institute,
4 * Carnegie Mellon University.
5 * All Rights Reserved. Use is subject to license terms.
7 * See the file "license.terms" for information on usage and
8 * redistribution of this file, and for a DISCLAIMER OF ALL
11 package com.sun.speech.freetts.en.us;
13 import java.io.IOException;
15 import java.util.Locale;
17 import com.sun.speech.freetts.Age;
18 import com.sun.speech.freetts.Gender;
19 import com.sun.speech.freetts.ProcessException;
20 import com.sun.speech.freetts.Utterance;
21 import com.sun.speech.freetts.UtteranceProcessor;
24 * Defines limited domain synthesis voice that specializes
25 * in telling the time. This is based on data created by
26 * the example time domain voice in FestVox.
28 public class CMUTimeVoice extends CMUClusterUnitVoice {
31 * Creates a simple cluster unit voice
33 * @param name the name of the voice
34 * @param gender the gender of the voice
35 * @param age the age of the voice
36 * @param description a human-readable string providing a
37 * description that can be displayed for the users.
38 * @param locale the locale of the voice
39 * @param domain the domain of this voice. For example,
40 * @param organization the organization which created the voice
41 * "general", "time", or
42 * "weather".
43 * @param lexicon the lexicon to load
44 * @param database the url to the database containing unit data
47 public CMUTimeVoice(String name, Gender gender, Age age,
48 String description, Locale locale, String domain,
49 String organization, CMULexicon lexicon, URL database) {
50 super(name, gender, age, description, locale,
51 domain, organization, lexicon, database);
55 * The FestVox voice does not take advantage of any post lexical
56 * processing. As a result, it doesn't end up getting certain
57 * units that are expected by the typical post lexical processing.
58 * For example, if "the" is followed by a word that begins with
59 * a vowel, the typical post lexical processing will change its
60 * pronunciation from "dh ax" to "dh iy". We don't want this
63 * @return the post lexical analyzer in use by this voice
65 * @throws IOException if an IO error occurs while getting
68 protected UtteranceProcessor getPostLexicalAnalyzer() throws IOException {
71 return new UtteranceProcessor() {
72 public void processUtterance(Utterance utterance)
73 throws ProcessException {
79 * Converts this object to a string
81 * @return a string representation of this object
83 public String toString() {
84 return "CMUTimeVoice";