
manishabh77
USA
Asked
Hello,
I successfully created a speech recognition command for my JD robot, where I say "hello," and JD responds with "Nice to meet you, human." How can I evolve this into a more interactive conversation between me and JD?
Here's the scenario I would like to achieve: After JD greets me, it should ask for my name. Once I tell JD my name, I want JD to recognize it and respond with, "It's nice to meet you, [Your Name]."
I've been experimenting with the audio options in Synthiam ARC, but it only seems to handle single commands when recognizing speech.
Thanks,
Manisha
Related Hardware JD Humanoid
Related Controls
Synbot Plugin
DialogFlow
Below is an approach to evolving your "Hello" command into a multiturn conversation using DialogFlow within ARC. In this example, JD will greet you, ask for your name, then use your reply to respond with a personalized greeting.
Below are the recommended steps:
1. Create a Multi-Turn Intent in DialogFlow
You’ll want to create an intent (or intents) that allow for a follow-up conversation. For example:
Intent Name: greetAndAskName
Training Phrases:
Hi
Hello
Hey there
Response:
"Nice to meet you, human. What’s your name?"
Intent Name: CaptureName
Training Phrases:
My name is
I’m
It’s
Entity: Create an entity (if needed) for the name parameter, or simply use DialogFlow’s built-in capabilities. In this case, the parameter "userName" should be marked as required with a prompt such as "Could you please tell me your name?" This makes the intent multi-turn.
Response for CaptureName:
"It’s nice to meet you, $userName."
In DialogFlow, you can easily add required parameters and prompts so that if the name isn’t provided initially, the system will ask the user for the missing information.
For more detail on creating conversational intents with required parameters, please see the DialogFlow support page.
2. Configure ARC to Use the DialogFlow Skill
Within ARC, do the following:
Add the DialogFlow Plugin:
Make sure your ARC project includes the DialogFlow skill and that it’s configured with your DialogFlow agent.
Script Configuration:
In the DialogFlow skill’s configuration (using the kebab menu), click "CONFIG" then "SCRIPT" where you can add the following JavaScript code. (Remember to use
print()
for output if needed, but for audio, ARC’sAudio.say()
is recommended.)Below is a sample script that checks which intent is active and responds accordingly:
Notes:
$APIIntent
and$APIParameters
provide the data sent by DialogFlow. You can view variables and debug using the VARIABLE WATCHER control.Audio.say()
to speak back to you, but you can adjust the responses per your preferences.3. Test the Conversation Flow
Speak Your Greeting:
Say "Hello" so that the DialogFlow plugin recognizes the greeting, and JD responds with "Hello, it's nice to meet you, human. What is your name?"
Provide Your Name:
Reply with "My name is [Your Name]" (or simply "[Your Name]"), and the CaptureName intent should be triggered. JD will then respond with "It’s nice to meet you, [Your Name]."
Review and Adjust:
If any gaps exist in the conversation, review the parameters and training phrases in DialogFlow and adjust the responses in your ARC script as needed.
4. Further Enhancements
You can extend the conversation further by adding more intents and follow-up questions.
Use the Variable Watcher in ARC to see the values of
$APIIntent
,$APIComplete
, and$APIParameters
as you test the conversation.If you need even more interactivity, consider creating or modifying a robot skill as outlined in our Create robot skill Overview.
Feel free to ask additional questions if you need further clarification or run into any issues. How does this approach sound for your interactive conversation scenario?
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.