upstream version 1.2.2
[debian/freetts] / tools / ArcticToFreeTTS / ArcticVoice.java.template
1 package com.sun.speech.freetts.en.us.%FV_VOICENAME%;
2
3 import java.util.Locale;
4
5 import java.net.URL;
6
7 import com.sun.speech.freetts.Age;
8 import com.sun.speech.freetts.Gender;
9 import com.sun.speech.freetts.en.us.CMUArcticVoice;
10 import com.sun.speech.freetts.en.us.CMULexicon;
11
12
13 /**
14  * Class merely to allow us to find *.txt files for this voice.
15  */
16 public class ArcticVoice extends CMUArcticVoice {
17     /**
18      * Creates a simple cluster unit voice for the ARCTIC voices
19      *
20      * @param name the name of the voice
21      * @param gender the gender of the voice
22      * @param age the age of the voice
23      * @param description a human-readable string providing a
24      * description that can be displayed for the users.
25      * @param locale the locale of the voice
26      * @param domain the domain of this voice.  For example,
27      * @param organization the organization which created the voice
28      * "general", "time", or
29      * "weather".
30      * @param lexicon the lexicon to load
31      * @param database the url to the database containing unit data
32      * for this voice.
33      */
34     public ArcticVoice(String name, Gender gender, Age age,
35                  String description, Locale locale, String domain,
36                  String organization, CMULexicon lexicon, URL database) {
37         super(name, gender, age, description, locale,
38               domain, organization, lexicon, database);
39
40         /* [[[WDW FIXME: should set these params from the voice.]]]
41          */
42         if (false) {
43             setRate(150f);
44             setPitch(100F);
45             setPitchRange(12F);
46         }
47     }
48
49     /**
50      * Get a resource for this voice.
51      * By default, the voice is searched for in the package
52      * to which the voice class belongs. Subclasses are free to
53      * override this behaviour.
54      */
55     protected URL getResource(String resource) {
56         URL url = this.getClass().getResource(resource);
57         return url;
58     }
59
60     /**
61      * Converts this object to a string
62      * 
63      * @return a string representation of this object
64      */
65     public String toString() {
66         return "%FV_VOICENAME%";
67     }
68 }