Thumbnail

Pandorabots

Connects ARC to Pandorabots for AI chat, sends text and gets replies (executes [EZ-Script]), integrates with speech recognition and custom bots

How to add the Pandorabots robot skill

  1. Load the most recent release of ARC (Get ARC).
  2. Press the Project tab from the top menu bar in ARC.
  3. Press Add Robot Skill from the button ribbon bar in ARC.
  4. Choose the Artificial Intelligence category tab.
  5. Press the Pandorabots icon to add the robot skill to your project.

Don't have a robot yet?

Follow the Getting Started Guide to build a robot and use the Pandorabots robot skill.


How to use the Pandorabots robot skill

The Pandorabots skill lets your ARC project hold a text-based conversation using the Pandorabots A.I. service. The skill sends the phrase you enter (or a phrase sent from another skill) to the Pandorabots online server using ARC’s ControlCommand() interface, then displays and stores the response so your robot can speak, move, or run scripts based on what the A.I. replies.

Main Window

The Main Window is used to manually test conversations and to verify that the skill is successfully sending and receiving messages. It behaves like a simple chat client.

Pandorabots skill main window
Main Window Controls
  1. Text Display
    Shows the conversation history. Your sent text and the Pandorabot responses appear here in order. Use this area while troubleshooting to confirm requests are being sent and responses are being returned.
  2. Send Button
    Sends the contents of the Text Entry Field to the Pandorabot. This is the same action that happens when another skill calls ControlCommand() to send a phrase programmatically.
  3. Text Entry Field
    Type what you want to say to the Pandorabot. Press the Send button to transmit it. This field is mainly for testing; during real robot operation you will typically feed phrases in automatically (for example, from a speech recognition skill).

Settings

The Settings control how the skill authenticates and which Pandorabot it communicates with. These settings also control where the response is stored, and what ARC should do when a response arrives.

Pandorabots skill settings
Settings Fields
  1. Pandorabot ID
    The unique ID of the bot hosted on Pandorabots. The skill ships with Synthiam’s default bot ID so you can use it immediately.

    Only change this if you created your own bot on Pandorabots and want ARC to talk to your bot instead. If you paste an invalid ID, the server may return errors or generic responses.
  2. Username
    Your Synthiam username used by the skill for identification with the service. This can help keep sessions consistent so the bot can maintain conversational context.

    If you run multiple robots/projects and want separate conversation histories, use distinct usernames (or separate ARC user profiles/projects) so each project has its own session identity.
  3. Response Variable
    The ARC variable that will be updated with the most recent bot response. This makes the response easy to use elsewhere in your project (for example, text-to-speech, screen display, decision logic, logging, etc.).

    Example usage after a response arrives:
    • Speak the response: Say(getVar($PandoraResponse))
    • Log it: Print("Pandora said: " + getVar($PandoraResponse))
    • Branch on keywords: If (Contains(getVar($PandoraResponse), "hello")) ...
  4. Response Script
    This script runs automatically when a response is received. Use it to trigger robot actions immediately after the bot replies.

    Common uses:
    • Speak the response using a speech synthesis skill.
    • Parse the response to decide which animation, gesture, or sound to play.
    • Route the response to other controls (for example, chat display, logging, or a remote UI).

Typical Project Workflow

  1. Capture a phrase
    Use a speech recognition skill (or another input method such as a mobile UI button, joystick button, or keyboard input) to produce text.
  2. Send the phrase to this skill
    The phrase is passed into this skill using ControlCommand().
  3. Receive a response
    The Pandorabots server returns a message, which is displayed in the conversation history and stored in your chosen Response Variable.
  4. React to the response
    ARC runs your Response Script so your robot can speak, move, or execute logic in real time.

Code Samples

ARC can execute EZ-Script that appears inside square brackets [ and ] in the bot response. This allows a bot response to trigger robot actions. Use this carefully and only with bots you trust.

Example: Response that includes an action
"Hello, I am a bot. [Servo(d2, 20)]"

In the example above, ARC will speak or display the text, and it will also execute the command inside the brackets (moving the servo on d2 to position 20).

Example: Send a phrase to the Pandorabots skill from another skill

Another control (such as a speech recognition skill) can send its recognized text to this skill. Here’s an example using the Bing Speech Recognition variable:

controlCommand("PandoraBot", "SetPhrase", getVar("$BingSpeech"))
What this does
  • "PandoraBot" is the name of the control instance in your ARC project. If your control has a different name, use that name here.
  • "SetPhrase" is the command that tells the skill what text to send to the Pandorabots server.
  • getVar($BingSpeech) is the recognized phrase produced by the speech recognition skill.

Requirements

  • Internet connection required
    This skill communicates with an online A.I. service, so ARC must have internet access while the skill is running.
  • Network setup
    If your robot controller is providing WiFi access point mode, you may need to switch the EZ-B to Client Mode so it can join your router and reach the internet. See the EZ-B v4 WiFi Modes Activity: WiFi Modes Activity.
  • Speech recognition not included
    This skill does not perform speech recognition by itself. Combine it with a speech recognition skill to create a conversational robot.

Troubleshooting

  • No response / blank replies
    Confirm ARC has internet access. Then verify the Pandorabot ID is valid and that the service is reachable from your network (some school/corporate networks block certain endpoints).
  • Responses don’t trigger actions
    Ensure your Response Script is configured, and confirm you are reading the correct Response Variable. Use a Print() in the Response Script to verify it is firing.

Resources

If you would like to host an AIML configuration locally (and not rely on the Pandorabots online service), consider the AIMLBot skill: AIMLbot Skill.

To create and manage your own Pandorabot, visit: Pandorabots. By default, this ARC skill is configured with the Synthiam Pandorabot so you can start immediately.

Speech Recognition Skills

Pair this skill with one of the following speech recognition skills:


Control Commands for the Pandorabots robot skill

There are Control Commands available for this robot skill which allows the skill to be controlled programmatically from scripts or other robot skills. These commands enable you to automate actions, respond to sensor inputs, and integrate the robot skill with other systems or custom interfaces. If you're new to the concept of Control Commands, we have a comprehensive manual available here that explains how to use them, provides examples to get you started and make the most of this powerful feature.

Control Command Manual

SetPhrase", "[phrase]

Example: controlCommand("PandoraBot", "SetPhrase", "[phrase]")

Video


ARC Pro

Upgrade to ARC Pro

Unlock the true power of automation and robotics by becoming a proud subscriber of Synthiam ARC Pro.

Author Avatar
PRO
Canada
#1  

While using the Pandorabots skill I came across some interesting things:

  1. When the "Speak Responses" checkbox is selected, ARC will automatically pause the Speech Recognition skill but only for the duration of the response.

  2. When the "Use EZ-B v4 speaker" checkbox is selected, ARC will automatically pause the Speech Recognition skill and keep it paused.

  3. When a Pandorabots response is received the sound will play out of the EZ-Bv4 or PC speaker (depending on checkboxes selected) but when combined with the Talk servo skill, the response will take place and the Talk servo will move after the response is played. So the sound and movement are out of sync.

My Questions are:

  1. Could we get a checkbox to be able to disable the pausing of Speech recognition? I would like to explore the possibility of having the robot trigger its own actions with the Speech Recognition skill based upon responses from Pandorabots.

  2. Is it possible to sync up the Pandorabots response with Talk servo movement?

Thanks!!

Author Avatar
PRO
Canada
#2   — Edited

I did a bit more testing with 3. above and found that if I use Bing Speech recognition to send a received message to Pandorabots it will sync up perfectly with Talk Servo, it seems to only happen out of sync when I type and send a message with the keyboard.

Sorry, one more question: What is the Javascript equivalent of this EZ-script?

ControlCommand("PandoraBot", SetPhrase, $BingSpeech)

I thought it was:

ControlCommand("PandoraBot", "SetPhrase", $BingSpeech); 

The compiler doesn't like the variable being in the last position, it seems to accept only "text".

Author Avatar
PRO
USA
#3   — Edited

in Bing Speech Recognition I put for javascript:

ControlCommand("PandoraBot", "SetPhrase", getVar("$BingSpeech"));

Author Avatar
PRO
Canada
#5  

Thanks for the help guys. All good now! With a bit more fooling around I found that I could just use another ControlCommand to Pause/Unpause the Speech recognition. Whoops, my bad! Classic feature is already there without me being aware.

Code sample for others who may wander down this path:

controlCommand("Speech Recognition", "PauseOff");
Author Avatar
PRO
Australia
#6  

I am getting this same error with Pandorabot... "Error on line 3: Missing String Quotes or Invalid Expression at index 0" Often the $BotResponse value is unusable as it contains linefeeds and other characters which cause an invalid expression error. Is there a update on this Control which addresses this problem?

#7   — Edited

Can you give us an example of a sentence that will trigger an error like that? The pandora bot response comes from their server and may be mal-formed. We can most likely filter their incorrectly formed responses.

*Note: We moved your question here to the PandoraBot robot skill

Author Avatar
PRO
Australia
#8  

It is the same as used to be the case with the Aimlbot. "What is your favorite movie?". Response will be "My fav<LF> movie is 2001 a Space Oddessey..." There are probably others but that's the only one I can repeat consistently.