|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthmi.tts.AbstractTTSGenerator
hmi.tts.mary.MaryTTSGenerator
@ThreadSafe public class MaryTTSGenerator
| Field Summary | |
|---|---|
private int |
currentWordOffset
|
private PhonemeToVisemeMapping |
visemeMapping
|
private marytts.modules.synthesis.Voice |
voice
|
| Fields inherited from class hmi.tts.AbstractTTSGenerator |
|---|
bookmarks, callback, permanentCallback, visimes, wordDescriptions |
| Constructor Summary | |
|---|---|
MaryTTSGenerator(String maryDir)
Constructor, sets up and starts the Mary TTS generator without a viseme mapping |
|
MaryTTSGenerator(String maryDir,
PhonemeToVisemeMapping vm)
Constructor, sets up and starts the Mary TTS generator |
|
| Method Summary | |
|---|---|
private void |
addWordDescription(WordDescription wd)
|
private TimingInfo |
getAndClearTimingInfo()
|
private AudioFileFormat |
getAudioFileFormat()
|
TimingInfo |
getBMLTiming(String text)
Get the timing of a BML speech behavior |
String |
getMaryXMLStartTag()
|
String |
getSSMLStartTag()
|
TimingInfo |
getTiming(String text)
Gets the timing of the text, fills out visime, phoneme,bookmark and word lists |
TimingInfo |
getTiming(String text,
marytts.datatypes.MaryDataType inputDataType)
|
String[] |
getVoices()
Get the duration of the last spoken/timed text |
private void |
parseBoundary(Node n)
|
private void |
parseMark(Node n)
|
private Phoneme |
parsePhoneme(Node n,
boolean stress)
|
private void |
parseSyllable(Node n,
List<Phoneme> pList,
List<Visime> vList)
|
private void |
parseWord(Node n)
|
private void |
parseWordDescriptionsAndBookmarks(Document doc)
|
private void |
parseWordDescriptionsAndBookmarks(Node node)
|
void |
setVoice(String speaker)
Sets the speaker |
TimingInfo |
speak(String text)
|
TimingInfo |
speak(String text,
marytts.datatypes.MaryDataType inputType)
|
TimingInfo |
speakBML(String text)
Speaks out the BML sentence, does the apropiate callbacks, fills out visime, phoneme, bookmark and word lists |
TimingInfo |
speakBMLToFile(String text,
String filename)
Generates a file containing the spoken BML sentence, does the apropiate callbacks, fills out visime, phoneme, bookmark and word lists. |
private void |
speakText(String text,
marytts.datatypes.MaryDataType inputType)
|
TimingInfo |
speakToFile(String text,
String filename)
Generates a file containing the spoken sentence, does the apropiate callbacks, fills out visime, phoneme, bookmark and word lists. |
void |
speakToFile(String text,
String filename,
marytts.datatypes.MaryDataType inputType)
|
| Methods inherited from class hmi.tts.AbstractTTSGenerator |
|---|
getRate, getVolume, setCallback, setPermanentCallback, setRate, setVolume |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private marytts.modules.synthesis.Voice voice
private int currentWordOffset
private PhonemeToVisemeMapping visemeMapping
| Constructor Detail |
|---|
public MaryTTSGenerator(String maryDir)
throws Exception
Exception
public MaryTTSGenerator(String maryDir,
PhonemeToVisemeMapping vm)
throws Exception
maryDir - the directory where Mary is installed and its voices can be foundvisemeMappingFile - the location of the phoneme to viseme mapping (e.g., "phoneme2viseme/boss2ikp.xml")
Exception| Method Detail |
|---|
public String getSSMLStartTag()
public String getMaryXMLStartTag()
private AudioFileFormat getAudioFileFormat()
private void speakText(String text,
marytts.datatypes.MaryDataType inputType)
public void speakToFile(String text,
String filename,
marytts.datatypes.MaryDataType inputType)
throws IOException
IOExceptionprivate TimingInfo getAndClearTimingInfo()
public TimingInfo speak(String text)
speak in class AbstractTTSGenerator
public TimingInfo speak(String text,
marytts.datatypes.MaryDataType inputType)
public TimingInfo speakBML(String text)
AbstractTTSGenerator
speakBML in class AbstractTTSGeneratortext - the text or script to speak
public TimingInfo speakToFile(String text,
String filename)
throws IOException
AbstractTTSGenerator
speakToFile in class AbstractTTSGeneratortext - the text or script to speak
FileNotFoundException
IOException
public TimingInfo speakBMLToFile(String text,
String filename)
throws IOException
AbstractTTSGenerator
speakBMLToFile in class AbstractTTSGeneratortext - the text or script to speak
IOException
private Phoneme parsePhoneme(Node n,
boolean stress)
private void parseSyllable(Node n,
List<Phoneme> pList,
List<Visime> vList)
private void parseWord(Node n)
private void addWordDescription(WordDescription wd)
private void parseMark(Node n)
private void parseBoundary(Node n)
private void parseWordDescriptionsAndBookmarks(Node node)
private void parseWordDescriptionsAndBookmarks(Document doc)
public TimingInfo getTiming(String text)
AbstractTTSGenerator
getTiming in class AbstractTTSGeneratortext - the text or script to get the timing of
public TimingInfo getTiming(String text,
marytts.datatypes.MaryDataType inputDataType)
public TimingInfo getBMLTiming(String text)
AbstractTTSGenerator
getBMLTiming in class AbstractTTSGeneratorpublic void setVoice(String speaker)
AbstractTTSGenerator
setVoice in class AbstractTTSGeneratorspeaker - speaker namepublic String[] getVoices()
AbstractTTSGenerator
getVoices in class AbstractTTSGenerator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||