Asked
Resolved Resolved by DJ Sures!

How To Write The EZ-Command In Python

Hi, Can I know, how to write the ("Speech Recognition", "PauseOff") command in python? Thanks in advance!



Related Hardware (view all EZB hardware)
EZ-B V4 by EZ-Robot
EZ-B v4/2 robot controller: dual Cortex ARM, Wi-Fi, audio/video, 24 servo/digital ports, I2C/UART, camera and Synthiam ARC control for custom robots
Wi-Fi / USB
Servos 24
Camera
Audio
UART 3
I2C
ADC 8
Digital 24

Related Robot Skills (view all robot skills)
EZ-SLAM by Synthiam
Creates a map in a global variable; proof-of-concept SLAM visualizer (very experimental).
Human-like audio via IBM Watson Text-to-Speech: multi-language, selectable voices for accessibility and automated interactions. IBM Cloud required.
Connect Intel RealSense depth cameras to ARC NMS for depth-based distance detection, point-cloud mapping, video streaming, and navigation telemetry.

ARC Pro

Upgrade to ARC Pro

Take control of your robot's destiny by subscribing to Synthiam ARC Pro, and watch it evolve into a versatile and responsive machine.

Author Avatar
PRO
Canada
#1  

To use the Watson Text To Speech skill with your EZ-B v4 robot in ARC, you'll need to write a script that utilizes the ControlCommand() function to interact with the Watson Text To Speech skill. Since you're interested in using Python within ARC, you'll be using the Python scripting capabilities provided by ARC.

Here's an example of how you might write a Python script to use the Watson Text To Speech skill to speak a phrase:

# Import the ARC Python module
from ARC import ARC

# Initialize the ARC connection (replace with your actual connection details)
arc = ARC("YourARCConnectionDetails")

# The text you want the robot to speak
text_to_speak = "Hello, I am your robot assistant."

# Send the command to the Watson Text To Speech skill to speak the text
arc.sendCommand("ControlCommand(\"Watson Text To Speech\", \"Speak\", \"" + text_to_speak + "\")")

Regarding the (Speech Recognition, PauseOff) command, if you're looking to resume speech recognition after pausing it, you can use the ControlCommand() function in a similar way. Here's an example of how to resume speech recognition using Python:

# Resume speech recognition
arc.sendCommand("ControlCommand(\"Speech Recognition\", \"PauseOff\")")

Please note that the above examples assume that you have set up the Watson Text To Speech skill and the Speech Recognition skill in your ARC project, and that you have named them exactly as shown in the commands. Adjust the skill names as necessary to match your project's configuration.

Remember to replace "YourARCConnectionDetails" with the actual connection details for your ARC instance. The ARC module and sendCommand function are hypothetical examples, as the actual implementation may vary based on ARC's Python scripting API, which you can find in the ARC Python scripting documentation.

If you need further assistance with the specific syntax or available functions in ARC's Python scripting environment, please refer to the official ARC Python scripting documentation or reach out to the Synthiam community for support.


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.
#2  

"Speech Recognition" is Pause on when speaking! Can I write the code in python to "Pause off" for "Speech Recognition" when speaking long sentence or story?

Author Avatar
PRO
Synthiam
#3  

Use the Cheat Sheet tab to find control commands available for robot skills in your project