Example #1
0
    //Sets current GUI notification from ARCOR. If TextToSpeech is enabled, notification is synthesized.
    public void SetGuiNotificationMsg(GuiNotificationMsg msg)
    {
        //prevent duplicate messages
        //if(!currentGuiNotification.GetMsg().Equals(msg.GetMsg())) {
        currentGuiNotification = msg;

        Debug.Log("SPEAKING: " + currentGuiNotification.GetMsg());
        if (texttospeech_enabled)
        {
            //if temp notification cames, wait until regular stops speaking and then play
            if (currentGuiNotification.GetTemp())
            {
                if (IsSpeakingOrInQueue())
                {
                    WaitAndSay(currentGuiNotification.GetMsg());
                }
            }
            else
            {
                Speak(currentGuiNotification.GetMsg());
            }
        }
        //}
    }
Example #2
0
    public new static void CallBack(ROSBridgeMsg msg)
    {
        GuiNotificationMsg GNmsg = (GuiNotificationMsg)msg;

        TextToSpeechManager.Instance.SetGuiNotificationMsg(GNmsg);
    }