private void StartControls()
{
// Start up each of the area controllers. The order
// here is important.
try
{
sound.Start(); // Sound output
talker.Start(); // Synthesis
listener.Start(); // Recognition
converse.Start(); // Topic-specific conversations
env.Start(); // Environmental awareness
}
catch (Exception e)
{
System.Windows.Forms.MessageBox.Show("Speech can not start. See log.");
Logger.Log("Speech can not start.", Helpers.LogLevel.Error, e);
System.Console.WriteLine(e.StackTrace);
MarkDisabled();
return;
}
// Register the speech-related actions for context menus.
// Editing voice assignments to avatars.
instance.ContextActionManager.RegisterContextAction(
new GUI.AvatarSpeechAction(instance, this));
// Reading the contents of notecards.
instance.ContextActionManager.RegisterContextAction(
new GUI.NotecardReadAction(instance, this));
talker.Say("Rahdegast is ready.");
}