Unknown Country
Asked

Two Robot Heads Talking To Each Other

I am trying get two robot heads to talk to each other.  They are both clients on my wifi network, and I am using one computer, and one speaker output.

My major problem is that I am using sound servo (pc speaker) to move the robot heads jaws, and it only works for one of the two heads (e.g., port 0.D2).  I want sound servo to move the jaw servo for robot A when it is talking (port 0.D2), and I want sound servo to move the jaw servo for robot B when it is talking (e.g., port 1.D2).

How do I do this?  I don't want to use two computers.  If I use two computers, the speaker out of computer A would have to be the mic in of computer B, and vice versa, and I would use speech recognition.  If however I use a single computer, I can sequence the "robot conversation" mp3 files in soundboard via scripting with delays.  The problem is that I can't get only the jaw of robot A to move when it is speaking, but then only have the jaw of robot B move when it is speaking.


Related Hardware EZ-B IoTiny
Related Control Sound Servo (PC Speaker)

ARC Pro

Upgrade to ARC Pro

Experience early access to the latest features and updates. You'll have everything that is needed to unleash your robot's potential.

PRO
Canada
#1  

To achieve this, you can use two instances of the Sound servo (PC Speaker) skill, one for each robot head. Each instance of the skill can be configured to control a different servo, allowing you to control the jaws of both robot heads independently.

Here's how you can do it:

  1. Add the first instance of the Sound servo (PC Speaker) skill to your ARC project. Configure it to control the jaw servo of robot A (e.g., port 0.D2).

  2. Add a second instance of the Sound servo (PC Speaker) skill to your ARC project. Configure it to control the jaw servo of robot B (e.g., port 1.D2).

  3. In your script, you can control which robot head is talking by enabling and disabling the appropriate Sound servo (PC Speaker) skill. When robot A is talking, enable the first instance of the skill and disable the second one. When robot B is talking, do the opposite.

Remember, you can use the ControlCommand() to enable or disable a skill in a script. For example, to enable the first instance of the Sound servo (PC Speaker) skill, you can use the following command:

ControlCommand("Sound servo (PC Speaker) 1", Enable)

And to disable it, you can use:

ControlCommand("Sound servo (PC Speaker) 1", Disable)

Replace "Sound servo (PC Speaker) 1" with the title of your skill as needed. You can find more information about the ControlCommand() in the ARC manual.

Please note that this setup assumes that both robot heads are connected to the same EZ-B IoTiny and are both accessible from the same ARC project. If they are not, you may need to adjust your setup accordingly.


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.
Unknown Country
#2   — Edited

@athena

This sounds like a perfect solution, but ARC only allows one instance of sound servo per project.

Can I really install two instances of sound servo in the same project?

Also, each robot head naturally has its own EZB Tiny board, but both robot heads are controlled by one ARC project.

PRO
Synthiam
#3  

Arc was never designed for multiple robots per project. This is because you can simply run a second instance of ARC for each robot.

I would not advise using a single ARC instance for multiple robots. I recommend launching a second instance of ARC for the second robot

PRO
Canada
#5  

@athena I am curious how the licence works in the case of multiple robots on a single PC using multiple running instances of ARC  Is the license 1 license per computer or per instance or ARC running on a computer.  If I have 16 copies of ARC running on a 32 core computer can I control 16 robots?

PRO
Canada
#6   — Edited

The license for ARC is per computer, not per instance. This means that as a licensed user, you can run multiple instances of ARC on the same computer to control multiple robots without needing additional licenses. So yes, if your computer can handle it, you can control 16 robots with 16 instances of ARC running.


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.
Unknown Country
#7  

Thanks guys, I will follow up with a report.  I can run two instances of ARC on one computer.  The remianing questions is how to use the audio out as a speech recog input.  I am concerned about looping back audio out to headphone in, because of input impedance problems between the phono connections.  One youtube video suggests putting a cap and resistor in series between the audio out and mic in.

Again, thanks for all the help.

Unknown Country
#9  

Thanks DJ.

I am aware of how the sound servo works.  What I discovered is that both robot jaws move at the same time, even though they are in different instances of ARC.  So the speech recog trigger expressions must be listed the same for both ARC instances, even if a particular expression doesn't apply to one of the robots.  When the speech recog phase (from me, via mic) is heard by both instances of ARC, one ARC instance wlll have to be scripted to pause its sound servo, while the other ARC instance allows its sound servo to automatically mimic what is coming out of the PC speakers while playing that robot's mp3 file response.

The real problem arises when the end of say robot A's mp3 file is supposed to trigger a response from robot B. Robot B's speech recog will have to be listening to the computer speaker output.  I am now testing if a second mic near the the speakers hooked in parallel with the original mic (me) will do the trick.  Otherwise I will have to loop back audio out to mic in, which may require an external coupling circuit (cap and resistor).

Besides using a second mic in front of the computer's speaker, does anybody have a simple way to get a computer to listen to itself (speaker out goes to mic in)?  All I could find is this.

FYI, for speech recog in ARC, I have found that there must be a pause before the last words you want recognized. For example, if the mp3 file (or spoken word) is "But I'm not happy" and the speech recog skill is looking for "happy", the recording will have to be "But I'm not (pause) happy".  Since many of my mp3 robot responses are generated as synthetic voices with an AI app called Eleven Labs, I will probably have to add the pause using Audacity.

This is more complicated than i thought it would be!

Again, thanks.  If I get this to work, I will upload a video to youtube.

PRO
Synthiam
#11  

Ah, I was just on a conference call talking about something entirely unrelated, and my A.D.D. kicked in, and I think I solved the problem. I'll have to build a prototype robot skill first, but I think I have a solution to using third-party voices. We're finalizing the Open AI Whisper robot skill this week, so I can probably sneak in a few tests next week.

PRO
Belgium
#12  

hi all

you can easly stop a script by using the stop command . if one head uses d0 and d1 and the other excample d22 and d23 . avery time you make a script there"s is auto a stop script too .

User-inserted image