|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sun.speech.freetts.lexicon.LexiconImpl
com.sun.speech.freetts.en.us.CMULexicon
Provides a CMU lexicon-specific implementation of a Lexicon that is stored in a text file.
| Field Summary |
| Fields inherited from class com.sun.speech.freetts.lexicon.LexiconImpl |
tokenizeOnLoad, tokenizeOnLookup |
| Constructor Summary | |
CMULexicon()
Creates the default CMU Lexicon which is a binary lexicon |
|
CMULexicon(java.lang.String basename)
Creates the CMU Lexicon which is a binary lexicon |
|
CMULexicon(java.lang.String basename,
boolean useBinaryIO)
|
|
CMULexicon(java.net.URL compiledURL,
java.net.URL addendaURL,
java.net.URL letterToSoundURL,
boolean binary)
Creates a CMULexicon based upon the given compiled and addenda DBs and the given letter to sound rules |
|
| Method Summary | |
static CMULexicon |
getInstance(boolean useBinaryIO)
Get the CMULexicon. |
static CMULexicon |
getInstance(java.lang.String basename,
boolean useBinaryIO)
Get the CMULexicon. |
protected static int |
getSonority(java.lang.String phone)
Determines the sonority for the given phone. |
protected static boolean |
hasVowel(java.util.List phones)
Determines if there is a vowel in given list of phones. |
protected static boolean |
hasVowel(java.lang.String[] phones,
int index)
Determines if there is a vowel in the remainder of the array, starting at the given index. |
protected static boolean |
isSilence(java.lang.String phone)
Determines if the given phone represents a silent phone. |
boolean |
isSyllableBoundary(java.util.List syllablePhones,
java.lang.String[] wordPhones,
int currentWordPhone)
Determines if the currentPhone represents a new syllable boundary. |
protected static boolean |
isVowel(java.lang.String phone)
Determines if the given phone is a vowel |
static void |
main(java.lang.String[] args)
Provides test code for the CMULexicon. |
| Methods inherited from class com.sun.speech.freetts.lexicon.LexiconImpl |
addAddendum, compare, createLexicon, dumpBinary, fixPartOfSpeech, getPhones, getPhones, getPhones, getPhones, getPhones, isLoaded, load, loadTextLexicon, parseAndAdd, removeAddendum, setLexiconParameters |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public CMULexicon(java.net.URL compiledURL,
java.net.URL addendaURL,
java.net.URL letterToSoundURL,
boolean binary)
compiledURL - the compiled database is loaded from hereaddendaURL - the database addenda is loaded from hereletterToSoundURL - the letter to sound rules are loaded
from herebinary - if true the input data are loaded as
binary ; otherwise if false the input
data are loaded as text.public CMULexicon()
public CMULexicon(java.lang.String basename)
basename - the basename for the lexicon.
public CMULexicon(java.lang.String basename,
boolean useBinaryIO)
| Method Detail |
public static CMULexicon getInstance(boolean useBinaryIO)
throws java.io.IOException
useBinaryIO - if true use binary IO to load DB
java.io.IOException - if problems occurred while reading the data
public static CMULexicon getInstance(java.lang.String basename,
boolean useBinaryIO)
throws java.io.IOException
useBinaryIO - if true use binary IO to load DB
java.io.IOException - if problems occurred while reading the data
public boolean isSyllableBoundary(java.util.List syllablePhones,
java.lang.String[] wordPhones,
int currentWordPhone)
syllablePhones - the phones in the current syllable so farwordPhones - the phones for the whole wordcurrentWordPhone - the word phone in question
true if the word phone in question is on a
syllable boundary; otherwise false.protected static boolean isSilence(java.lang.String phone)
phone - the phone to test
true if the phone represents a silent
phone; otherwise false.
protected static boolean hasVowel(java.lang.String[] phones,
int index)
phones - the set of phones to checkindex - start checking at this index
true if a vowel is found;
otherwise false.protected static boolean hasVowel(java.util.List phones)
phones - the list of phones
true if a vowel is found;
otherwise false.protected static boolean isVowel(java.lang.String phone)
phone - the phone to test
true if phone is a vowel
otherwise false.protected static int getSonority(java.lang.String phone)
phone - the phone of interest
public static void main(java.lang.String[] args)
com.sun.speech.freetts.en.us.CMULexicon [options] Where options is any combination of: -src path -dest path -generate_binary [base_name] -compare -showtimes
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||