|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objecthmi.tts.AbstractTTSGenerator
hmi.tts.sapi5.SAPI5TTSGenerator
@ThreadSafe public class SAPI5TTSGenerator
TTSGenerator for Microsoft SAPI5
| Nested Class Summary | |
|---|---|
private static class |
SAPI5TTSGenerator.BookMarker
|
| Field Summary | |
|---|---|
private ArrayList<SAPI5TTSGenerator.BookMarker> |
currentBookmarks
|
private ArrayList<Phoneme> |
currentPhonemes
|
private ArrayList<Visime> |
currentVisimes
|
private String |
currentWord
|
private int |
currentWordOffset
|
private boolean |
initialized
|
private static org.slf4j.Logger |
logger
|
private String |
text
|
private boolean |
wordBeforePhoneme
|
| Fields inherited from class hmi.tts.AbstractTTSGenerator |
|---|
bookmarks, callback, permanentCallback, visimes, wordDescriptions |
| Constructor Summary | |
|---|---|
SAPI5TTSGenerator()
|
|
| Method Summary | |
|---|---|
private void |
bookmarkCallback(String bookmark)
|
void |
cleanup()
Destroys the tts generator, it should no longer be used after calling this. |
void |
finalize()
|
private TimingInfo |
getAndClearTimingInfo()
|
TimingInfo |
getBMLTiming(String s)
Get the timing of a BML speech behavior |
TimingInfo |
getTiming(String text)
Gets the timing of the text, fills out visime, phoneme,bookmark and word lists |
String[] |
getVoices()
Get the duration of the last spoken/timed text |
private void |
handleBookmarks(WordDescription wd)
|
private void |
phonemeCallback(int phoneme,
int duration,
int nextPhoneme,
int stress)
|
private int |
SAPICleanup()
|
private int |
SAPIDummySpeak(String text)
|
private String[] |
SAPIGetVoices()
|
private int |
SAPIInit()
|
private int |
SAPISetSpeaker(String speaker)
|
private int |
SAPISpeak(String text)
|
private int |
SAPISpeakToFile(String text,
String filename)
|
private void |
sentenceBoundryCallback(int offset,
int length)
|
void |
setVoice(String speaker)
Sets the speaker |
TimingInfo |
speak(String str)
|
private void |
speak(String str,
boolean timeOnly,
String filename)
|
TimingInfo |
speakBML(String s)
Speaks out the BML sentence, does the apropiate callbacks, fills out visime, phoneme, bookmark and word lists |
TimingInfo |
speakBMLToFile(String s,
String filename)
Generates a file containing the spoken BML sentence, does the apropiate callbacks, fills out visime, phoneme, bookmark and word lists. |
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. |
private boolean |
stopCallback()
|
private void |
visimeCallback(int visime,
int duration,
int nextVisime,
int stress)
|
private void |
wordBoundryCallback(int offset,
int length)
|
| Methods inherited from class hmi.tts.AbstractTTSGenerator |
|---|
getRate, getVolume, setCallback, setPermanentCallback, setRate, setVolume |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
private boolean initialized
private ArrayList<SAPI5TTSGenerator.BookMarker> currentBookmarks
private ArrayList<Visime> currentVisimes
private ArrayList<Phoneme> currentPhonemes
private String currentWord
private int currentWordOffset
private boolean wordBeforePhoneme
private String text
private static final org.slf4j.Logger logger
| Constructor Detail |
|---|
public SAPI5TTSGenerator()
| Method Detail |
|---|
private int SAPISpeak(String text)
private int SAPIDummySpeak(String text)
private int SAPIInit()
private int SAPICleanup()
private int SAPISetSpeaker(String speaker)
private int SAPISpeakToFile(String text,
String filename)
private String[] SAPIGetVoices()
public void cleanup()
public void finalize()
finalize in class Objectpublic TimingInfo getTiming(String text)
AbstractTTSGenerator
getTiming in class AbstractTTSGeneratortext - the text or script to get the timing ofpublic void setVoice(String speaker)
AbstractTTSGenerator
setVoice in class AbstractTTSGeneratorspeaker - speaker namepublic TimingInfo speak(String str)
speak in class AbstractTTSGenerator
private void speak(String str,
boolean timeOnly,
String filename)
private void phonemeCallback(int phoneme,
int duration,
int nextPhoneme,
int stress)
private void visimeCallback(int visime,
int duration,
int nextVisime,
int stress)
private void bookmarkCallback(String bookmark)
private void handleBookmarks(WordDescription wd)
private void wordBoundryCallback(int offset,
int length)
private void sentenceBoundryCallback(int offset,
int length)
private boolean stopCallback()
private TimingInfo getAndClearTimingInfo()
public TimingInfo getBMLTiming(String s)
AbstractTTSGenerator
getBMLTiming in class AbstractTTSGeneratorpublic TimingInfo speakBML(String s)
AbstractTTSGenerator
speakBML in class AbstractTTSGenerators - the text or script to speak
public TimingInfo speakBMLToFile(String s,
String filename)
AbstractTTSGenerator
speakBMLToFile in class AbstractTTSGenerators - the text or script to speak
public TimingInfo speakToFile(String text,
String filename)
AbstractTTSGenerator
speakToFile in class AbstractTTSGeneratortext - the text or script to speakpublic String[] getVoices()
AbstractTTSGenerator
getVoices in class AbstractTTSGenerator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||