quarc_host_speech_synthesis_animation_demo.mdl
Open this model

QUARC Host Speech Synthesis Animation Demo

This example demonstrates how to animated faces using the Host Speech Synthesis block from the QUARC Targets library. This particular example uses bitmaps for simple animation. However, more advanced 3D animation could be done using the Visualization facilities in QUARC. For details of the Host Speech Synthesis block, please refer to the Host Speech Synthesis block reference page in the QUARC documentation.

Host Speech Synthesis Animation Demo Simulink Diagram

Demonstration

Select Build from the QUARC menu of the diagram, or press Ctrl+B while the diagram is the active window. A great deal of output will appear in the Diagnostic Viewer about the progress of the build. If you cannot see the Diagnostic Viewer, you can open it by selecting View/Diagnostic Viewer from the menu of the diagram, or clicking on the View Diagnostics hyperlink at the bottom of the diagram. If you have MATLAB R2013b or earlier then the output will appear in the MATLAB Command Window.

Double-click on the Display Image block and the Viseme and Done Scopes to open them in a separate window.

Click on the Connect to Target button or select Connect to Target from the Simulation menu of the diagram to connect to the model.

Start the model by clicking on the Run button or selecting Run from the Simulation menu of the diagram. The Start item of the QUARC menu may also be used to both connect and start the model in one operation.

The model will begin talking. As it talks, the lips displayed by the Display Image block will animate in conjunction with the words being spoken.

Animated face

Notice that the speech is triggered by the rising edge of the "done" signal so that the speech is repeated. Each time the speech finishes, the "done" signal is asserted for one sampling instant, as shown in the Done Scope.

Done Scope

Also, while the text is being spoken, the Viseme Scope shows the viseme being displayed. A viseme is a code that identifies the position of the lips during speech. Think of it as the visual equivalent of a phoneme. The Host Speech Synthesis block provides 22 different visemes. As a point of comparison, Disney animation typically uses 13 visemes. The current viseme could also be used for animation of a robotic face. Note that this example uses the next viseme to be spoken for animation for better synchronization because the Display Image block is not really designed for real-time animation.

Viseme

Click on the Stop button or select Stop from the Simulation menu of the diagram to stop the model. The Stop item of the QUARC menu may also be used.

Running the example on a different target

To run the example on a different target, refer to the instructions on the Running QUARC Examples on Remote Targets page.