|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object
|
+--java.util.EventObject
|
+--javax.speech.SpeechEvent
|
+--javax.speech.synthesis.SpeakableEvent
|
+--com.cloudgarden.speech.CGSpeakableEvent
Extends SpeakableEvent to provide information on lip-sync events. If the event has an id of VISEME, mouth-shape parameters can be extracted from it by first calling convertToMouthShapeEvent.
| Field Summary | |
static int |
COMMAND
|
static int |
EMPHASIS
|
static int |
EXCLAMATION
|
static int |
MOUTH_SHAPE
|
static int |
PHONEME
|
static int |
QUESTION
|
static int |
STATEMENT
|
static int |
UNKNOWN
|
static int |
VISEME
|
static int |
VISEME_AA
|
static int |
VISEME_AE_AX_AH
|
static int |
VISEME_AO
|
static int |
VISEME_AW
|
static int |
VISEME_AY
|
static int |
VISEME_D_T_N
|
static int |
VISEME_ER
|
static int |
VISEME_EY_EH_UH
|
static int |
VISEME_F_V
|
static int |
VISEME_H
|
static int |
VISEME_K_G_NG
|
static int |
VISEME_L
|
static int |
VISEME_OW
|
static int |
VISEME_OY
|
static int |
VISEME_P_B_M
|
static int |
VISEME_R
|
static int |
VISEME_S_Z
|
static int |
VISEME_SH_CH_JH_ZH
|
static int |
VISEME_SILENCE
|
static int |
VISEME_TH_DH
|
static int |
VISEME_W_UW
|
static int |
VISEME_Y_IY_IH_IX
|
| Fields inherited from class javax.speech.synthesis.SpeakableEvent |
ELEMENT_CLOSE, ELEMENT_EMPTY, ELEMENT_OPEN, MARKER_REACHED, markerType, SPEAKABLE_CANCELLED, SPEAKABLE_ENDED, SPEAKABLE_PAUSED, SPEAKABLE_RESUMED, SPEAKABLE_STARTED, text, TOP_OF_QUEUE, WORD_STARTED, wordEnd, wordStart |
| Fields inherited from class java.util.EventObject |
source |
| Constructor Summary | |
CGSpeakableEvent(java.lang.Object source,
int id,
int viseme,
int phoneme)
|
|
| Method Summary | |
void |
convertToMouthShapeEvent()
If this event was a VISEME event, generate mouth-shape parameters corresponding to the viseme. |
int |
getJawOpen()
If this is a MOUTH_SHAPE event (or a VISEME event after convertToMouthShapeEvent has been called), returns a number from 0 to 255 specifying the openess of the jaw. |
int |
getLipTension()
If this is a MOUTH_SHAPE event (or a VISEME event after convertToMouthShapeEvent has been called), returns a number from 0 to 255 specifying the horizontal tension of the lips. |
int |
getMouthHeight()
If this is a MOUTH_SHAPE event (or a VISEME event after convertToMouthShapeEvent has been called), returns a number from 0 to 255 specifying the total height of the mouth (from min height to max height) |
int |
getMouthUpturn()
If this is a MOUTH_SHAPE event (or a VISEME event after convertToMouthShapeEvent has been called), returns a number from 0 to 255 specifying the total upturn of the mouth (from max downturn to max upturn) |
int |
getMouthWidth()
If this is a MOUTH_SHAPE event (or a VISEME event after convertToMouthShapeEvent has been called), returns a number from 0 to 255 specifying the total width of the mouth (from min width to max width) |
int |
getPhoneme()
If from a SAPI4 engine, returns the IPA phoneme corresponding to this event, otherwise, if from a SAPI5 engine, returns the Microsoft PhoneID for this sound - you will need to translate from the PhoneID to a unicode value. |
int |
getSentenceType()
Returns one of the fields UNKNOWN, COMMAND, EMPHASIS, EXCLAMATION, QUESTION or STATEMENT if the event is a VISEME or MOUTH_SHAPE event. |
int |
getTeethLowerVisible()
If this is a MOUTH_SHAPE event (or a VISEME event after convertToMouthShapeEvent has been called), returns a number from 0 to 255 specifying the visibility of the lower teeth. |
int |
getTeethUpperVisible()
If this is a MOUTH_SHAPE event (or a VISEME event after convertToMouthShapeEvent has been called), returns a number from 0 to 255 specifying the visibility of the upper teeth. |
int |
getTonguePosn()
If this is a MOUTH_SHAPE event (or a VISEME event after convertToMouthShapeEvent has been called), returns a number from 0 to 255 specifying the position of the tongue (0 being lowest, 255 being highest). |
int |
getViseme()
Returns one of the VISEME_XX fields corresponding to this event |
boolean |
isMSPhoneID()
Returns true if the value returned by getPhoneme is a Microsoft PhoneID (true for SAPI5 engines). |
| Methods inherited from class javax.speech.synthesis.SpeakableEvent |
getMarkerType, getText, getWordEnd, getWordStart |
| Methods inherited from class javax.speech.SpeechEvent |
getId, paramString |
| Methods inherited from class java.util.EventObject |
getSource, toString |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final int MOUTH_SHAPE
public static final int VISEME
public static final int PHONEME
public static final int UNKNOWN
public static final int COMMAND
public static final int EMPHASIS
public static final int EXCLAMATION
public static final int QUESTION
public static final int STATEMENT
public static final int VISEME_SILENCE
public static final int VISEME_AE_AX_AH
public static final int VISEME_AA
public static final int VISEME_AO
public static final int VISEME_EY_EH_UH
public static final int VISEME_ER
public static final int VISEME_Y_IY_IH_IX
public static final int VISEME_W_UW
public static final int VISEME_OW
public static final int VISEME_AW
public static final int VISEME_OY
public static final int VISEME_AY
public static final int VISEME_H
public static final int VISEME_R
public static final int VISEME_L
public static final int VISEME_S_Z
public static final int VISEME_SH_CH_JH_ZH
public static final int VISEME_TH_DH
public static final int VISEME_F_V
public static final int VISEME_D_T_N
public static final int VISEME_K_G_NG
public static final int VISEME_P_B_M
| Constructor Detail |
public CGSpeakableEvent(java.lang.Object source,
int id,
int viseme,
int phoneme)
| Method Detail |
public void convertToMouthShapeEvent()
public int getSentenceType()
public int getMouthHeight()
public int getMouthWidth()
public int getMouthUpturn()
public int getJawOpen()
public int getTeethUpperVisible()
public int getTeethLowerVisible()
public int getTonguePosn()
public int getLipTension()
public int getViseme()
public int getPhoneme()
The reason that this is not done automatically for you is that in the English PhoneID set, four PhoneIDs (namely 14, 16, 18 and 36 ) correspond to dipthongs (ie, two phonemes each), and also that the translation is language-dependent.
The English PhoneIDs and their unicode translations are documented in the "SAPI5Pronunciations.html" file which comes with the TalkingJava SDK.
isMSPhoneID()public boolean isMSPhoneID()
getPhoneme()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||