|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectrita.support.RiLetterToSound
public class RiLetterToSound
Provides the phone list for words using the CMU6 letter-to-sound (LTS) rules, which are based on the Black, Lenzo, and Pagel paper, "Issues in Building General Letter-to-Sound Rules." Proceedings of ECSA Workshop on Speech Synthesis, pages 77-80, Australia, 1998.
| Field Summary | |
|---|---|
static boolean |
VERBOSE
Whether LTS notifications are output to the console |
| Constructor Summary | |
|---|---|
RiLetterToSound(java.net.URL ltsRules)
|
|
RiLetterToSound(java.net.URL ltsRules,
boolean binary)
Class constructor. |
|
| Method Summary | |
|---|---|
boolean |
compare(RiLetterToSound other)
Compares this LTS to another for debugging purposes. |
void |
dumpBinary(java.lang.String path)
Dumps a binary form of the letter to sound rules. |
java.lang.String[] |
getPhones(java.lang.String word,
java.lang.String partOfSpeech)
Calculates the phone list for a given word. |
static void |
main(java.lang.String[] args)
Translates between text and binary forms of the CMU6 LTS rules. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static boolean VERBOSE
| Constructor Detail |
|---|
public RiLetterToSound(java.net.URL ltsRules)
throws java.io.IOException
java.io.IOException
public RiLetterToSound(java.net.URL ltsRules,
boolean binary)
throws java.io.IOException
ltsRules - a URL pointing to the text containing the letter to sound rulesbinary - if true, the URL is a binary source
java.lang.NullPointerException - if the ltsRules are null
java.io.IOException - if errors are encountered while reading the compiled form or the
addenda| Method Detail |
|---|
public void dumpBinary(java.lang.String path)
throws java.io.IOException
Binary format is:
MAGIC
VERSION
NUM STATES
for each state ...
path - the path to dump the file to
java.io.IOException - if a problem occurs during the dump
public java.lang.String[] getPhones(java.lang.String word,
java.lang.String partOfSpeech)
null is returned. This particular implementation
ignores the part of speech.
getPhones in interface com.sun.speech.freetts.lexicon.LetterToSoundword - the word to findpartOfSpeech - the part of speech.
nullpublic boolean compare(RiLetterToSound other)
other - the other LTS to compare to
true if these are equivalentpublic static void main(java.lang.String[] args)
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||