Asked

Chatgpt Skill Response Delay Issue

I have a question regarding the OpenAI ChatGPT robot skill in Synthiam ARC.

When I use Bing Speech Recognition in conjunction with the ChatGPT skill, activated by a wake word, the responses seem to be consistently one question behind.

Why is there a delay or silence when I ask the first question?

Additionally, why does it respond to the first question only after I have asked a second question?

How can I resolve this issue so that the system answers the correct question in real-time?


Related Hardware EZ-InMoov Robot Head

ARC Pro

Upgrade to ARC Pro

ARC Pro will give you immediate updates and new features needed to unleash your robot's potential!

PRO
Synthiam
#1   — Edited

If you could share the code you have in the robot skills, that would be useful. Otherwise, it's a guessing game:). I can't think of why the GPT responses could be one behind. To be clear, the first time you ask a question, there's no response from the GPT.

Post the code that's in each of these (and please format the code that you paste into the response so it can be read, thanks)

  • bing speech recognition "any recognized" script
  • Open AI Chat GPT "response" script

Post the code from those two robot skills so it can be better understood what you have configured

PRO
Canada
#2  

To address the issue of the OpenAI ChatGPT robot skill responding one question behind, let's first ensure that the scripts in both the Bing Speech Recognition and OpenAI ChatGPT skills are correctly configured. Please follow these steps:

  1. Bing Speech Recognition - All Recognized Script:

    • Ensure that the script sends the recognized speech to the OpenAI ChatGPT skill immediately after recognition.
    • Here is an example of how the script should look in JavaScript:
    // Send the recognized speech to OpenAI ChatGPT
    ControlCommand("OpenAI ChatGPT", "Send", getVar("$BingSpeech"));
    
  2. OpenAI ChatGPT - Response Script:

    • Ensure that the response from the ChatGPT skill is processed and spoken immediately.
    • Here is an example of how the script should look in JavaScript:
    // Speak the response from OpenAI ChatGPT
    Audio.say(getVar("$OpenAIResponse"));
    
  3. Check for Delays:

    • Ensure there are no unnecessary delays or sleeps in the scripts that could be causing the response to be delayed.
  4. Test the Configuration:

    • After making these changes, test the configuration by asking a question and observing if the response is immediate.
  5. Debugging:

    • If the issue persists, consider adding print statements to debug and see where the delay might be occurring. For example:
    // Debugging: Print the recognized speech
    print("Recognized Speech: " + getVar("$BingSpeech"));
    
    // Debugging: Print the response from OpenAI ChatGPT
    print("ChatGPT Response: " + getVar("$OpenAIResponse"));
    

By ensuring that the scripts are correctly configured and there are no delays, the system should respond to the correct question in real-time. If you continue to experience issues, please share the specific scripts you are using, and we can further troubleshoot the problem.


I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
#4  

Here are the simple setups for my chatgpt response script and my bing speech recognition script.

Still not sure what I need to add to fix this issue.

User-inserted image

User-inserted image

PRO
Synthiam
#5   — Edited

The issue is that you have the same code in both robot skills. You're speaking the response from open ai in both robot skills.

  1. In the bing speech recognition robot skill you should be pushing the text to the gpt robot skill

  2. In the gpt robot skill you should be pushing the text to the azure text to speech robot skill.

Look at it this way...

User-inserted image

You need to LISTEN before you can THINK before you can SPEAK. Make sense?

LISTEN = bing speech recognition THINK = gpt  SPEAK = azure text to speech

  1. So in Bing speech recognition, send the response to the open AI
  2. in open AI, send its response to azure text-to-speech

You can right-click in the editor or use the Cheat Sheet to see the available control commands. There are words written that describe what the control commands do when you hover over them.

PS, images can't be read by the AI or support system, so it's best to copy and paste them next time. You can select the text to copy with the mouse and right-click to choose COPY or press CTRL-C. That will copy the text to the clipboard. After that, you can use CTRL-V to paste it or right-click it in the forum to paste it into the message. There are buttons at the top of the editor for formatting code. It is like how Microsoft Word, Google Docs, Email clients, etc, work. Having the words in the message rather than images makes a huge difference on how the system or anyone else can help.

PRO
Synthiam
#6  

@Athena do you have anything more to add?

PRO
Canada
#7  

Certainly! Let's break down the steps to ensure your setup is correctly configured for seamless interaction between Bing Speech Recognition, OpenAI ChatGPT, and Azure Text-to-Speech:

Step-by-Step Configuration

  1. Bing Speech Recognition:

    • Script for All Recognized Speech:
      • Ensure that the recognized speech is sent to the OpenAI ChatGPT skill.
      • Example JavaScript code:
        // Send the recognized speech to OpenAI ChatGPT
        ControlCommand(OpenAI ChatGPT, Send, getVar($BingSpeech));
        
  2. OpenAI ChatGPT:

    • Response Script:
      • Ensure that the response from ChatGPT is sent to Azure Text-to-Speech for speaking.
      • Example JavaScript code:
        // Send the response from OpenAI ChatGPT to Azure Text-to-Speech
        ControlCommand(Azure Text-to-Speech, Speak, getVar($OpenAIResponse));
        
  3. Azure Text-to-Speech:

    • Ensure that this skill is configured to receive text and convert it to speech.

Debugging Tips

  • Check for Delays:

    • Ensure there are no unnecessary delays or sleeps in the scripts that could be causing the response to be delayed.
  • Test the Configuration:

    • After making these changes, test the configuration by asking a question and observing if the response is immediate.
  • Debugging:

    • Add print statements to debug and see where the delay might be occurring.
    • Example:
      // Debugging: Print the recognized speech
      print("Recognized Speech: " + getVar($BingSpeech));
      
      // Debugging: Print the response from OpenAI ChatGPT
      print("ChatGPT Response: " + getVar($OpenAIResponse));
      

Additional Considerations

  • Ensure Correct Order:

    • The flow should be: Listen (Bing Speech Recognition) Think (OpenAI ChatGPT) Speak (Azure Text-to-Speech).
  • Control Commands:

    • Use the right-click menu or Cheat Sheet in ARC to find and use the appropriate control commands for each skill.

By following these steps, you should be able to resolve the issue of delayed responses and ensure that your system answers the correct question in real-time. If you have any further questions or need additional assistance, feel free to ask!


I am a customer support GPT-powered AI and still learning. If you have doubts about my response, please use the support documentation to verify my answer.
#8   — Edited

Sorry I posted the same screenshot twice in my previous comment.

Bing Script:
ControlCommand("OpenAI ChatGPT", "Send",getVar("$BingSpeech"));
ChatGpt Script:
ControlCommand("Azure Text To Speech", "speak", getVar("$OpenAIResponse"));