#include <VisageLinkDoc.h>
Inheritance diagram for CVisageLinkDoc:
Public Member Functions | |
void | Notify (Visagesapi5tts *vtts, FBAPs *faps, CodingParameters *cp, long pts) |
Processing of the TTS viseme notification events. | |
void | BookMark (Visagesapi5tts *vtts, long qTimeStamp, DWORD dwMarkNum, WCHAR *markText) |
Processing of the TTS bookmark events. | |
void | StartSpeech (Visagesapi5tts *vtts, WCHAR *text) |
Processing of the TTS start speech events. | |
void | CheckFiles () |
Check if all necessary files are present. | |
Public Attributes | |
FAPlayer * | m_FAPlayer |
The FAPlayer. | |
Visagesapi5tts * | vtts |
The Visage TTS. | |
SimpleVORAction * | vor |
The Vestibolo-Ocular Reflex (gaze following) action. | |
bool | animationStarted |
Animation started flag. | |
Protected Member Functions | |
afx_msg void | OnFileStart () |
Initialize everything and start the animation. | |
afx_msg void | OnFileSpeak () |
Speak. | |
afx_msg void | OnOptionsGazefollowingvor () |
Enable gaze following (vestibulo-ocular reflex). | |
afx_msg void | OnOptionsDisablegazefollowingvor () |
Disable gaze following (vestibulo-ocular reflex). |
Implements the necessary functions of FARenderer and Visagesapi5ttsObserver.
Definition at line 78 of file VisageLinkDoc.h.
|
Processing of the TTS bookmark events. This function is the implementation of a virtual function from the Visagesapi5ttsObserver class. It is not to be called directly. Rather, the instance of CVisageLinkDoc is attached to the Visagesapi5tts, which calls the BookMark() function as appropriate, and passes the appropriate parameters to it. In this example we use the bookmarks to insert simple facial expressions or animations at particular times during the speech. This is done by playing a SimpleFacialExpression. The expression is initialized with the name from the bookmark tag, e.g. "surprise" or "joy". See SimpleFacialExpression for the list of supported expression names. The other bookmark that can occur is "wave", and if it is found we insert a simple waving animation - just moving the right hand.
Implements Visagesapi5ttsObserver. Definition at line 160 of file VisageLinkDoc.cpp. References m_FAPlayer, and FAPlayer::playTrack(). |
|
Check if all necessary files are present. All the file names in this example are hard-coded. This function checks if the files are actually present and gives error messages if they are not. The example should be run in the VisageLink folder where all necessary files are present. Definition at line 244 of file VisageLinkDoc.cpp. Referenced by OnFileStart(). |
|
Processing of the TTS viseme notification events. This function is the implementation of a virtual function from the Visagesapi5ttsObserver class. It is not to be called directly. Rather, the instance of CVisageLinkDoc is attached to the Visagesapi5tts, which calls the Notify() function as appropriate, and passes the appropriate parameters to it. This gives the possibility of additional control over the animation parameters generated by TTS. In this example we do not use it so it is empty.
Implements Visagesapi5ttsObserver. Definition at line 135 of file VisageLinkDoc.cpp. |
|
Speak. This method is called when the File->Speak menu option is selected. It reads the speech from the file and pronounces it using the speech synthesis object vtts. Definition at line 341 of file VisageLinkDoc.cpp. References animationStarted, Visagesapi5tts::speak(), and vtts. |
|
Initialize everything and start the animation. This method is called when the File->Start menu option is selected. It performs all necessary initializations, and starts the FAPlayer. Specifically:
Definition at line 301 of file VisageLinkDoc.cpp. References FAPlayer::addTrack(), animationStarted, Visagesapi5tts::attach(), CheckFiles(), FAPlayer::getFaceModel(), CMainFrame::GetOpenGLWnd(), COpenGLWnd::Init(), FAPlayer::init(), m_FAPlayer, FAPlayer::play(), Visagesapi5tts::setSpeaker(), FbaFileAction::smoothZeroValues(), and vtts. |
|
Disable gaze following (vestibulo-ocular reflex). This method is called when the File->Disable Gaze Following menu option is selected. It disables the gaze following (vestibulo-ocular reflex) by removing the vor object (a SimpleVORAction) from the FAPlayer.
Definition at line 385 of file VisageLinkDoc.cpp. References m_FAPlayer, FAPlayer::removeTrack(), and vor. |
|
Enable gaze following (vestibulo-ocular reflex). This method is called when the File->Enable Gaze Following menu option is selected. It enables the gaze following (vestibulo-ocular reflex) by attaching the vor object (a SimpleVORAction) to the FAPlayer.
Definition at line 367 of file VisageLinkDoc.cpp. References FAPlayer::addTrack(), m_FAPlayer, and vor. |
|
Processing of the TTS start speech events. This function is the implementation of a virtual function from the Visagesapi5ttsObserver class. It is not to be called directly. Rather, the instance of CVisageLinkDoc is attached to the Visagesapi5tts, which calls the StartSpeech() function as appropriate, and passes the appropriate parameters to it. In this example we use the bookmarks to insert simple expressions and animations at particular times during the speech. Some bookmarks are already inserted in the input text file. We use this function as a simple filter to insert additional bookmarks. So, when the string "surpr" is encountered, a bookmark for the surprize expression is inserted. This is a very simple example of using the Visagesapi5ttsObserver for processing the text and inserting appropriate actions.
Implements Visagesapi5ttsObserver. Definition at line 198 of file VisageLinkDoc.cpp. References Visagesapi5tts::toUnicode(). |
|
Animation started flag. This flags indicates that the basic animation is started and everything is initialised and ready for speaking.. Definition at line 107 of file VisageLinkDoc.h. Referenced by OnFileSpeak(), and OnFileStart(). |
|
The FAPlayer. The Face Animation Player (FAPlayer). It is used to load and play animation and corresponding sound. Definition at line 90 of file VisageLinkDoc.h. Referenced by BookMark(), OnFileStart(), OnOptionsDisablegazefollowingvor(), and OnOptionsGazefollowingvor(). |
|
The Vestibolo-Ocular Reflex (gaze following) action.
Definition at line 101 of file VisageLinkDoc.h. Referenced by OnOptionsDisablegazefollowingvor(), and OnOptionsGazefollowingvor(). |
|
The Visage TTS. The TTS object used for speaking. Definition at line 96 of file VisageLinkDoc.h. Referenced by OnFileSpeak(), and OnFileStart(). |