I would like to develop two JavaScript scripts that can be initiated using the Bing Speech Recognition skill in Synthiam ARC. The first script is for a silent countdown timer, and the second is for an alarm that activates at a specified time, similar to an alarm clock. I frequently perform similar tasks with Alexa, but I'm encountering some challenges in implementing them within ARC using Bing Speech Recognition.
My wake word in Bing Speech Recognition is "Robot." I want to be able to say, "Robot, set a timer for 'X' minutes" or "X" seconds, or even "X" minutes and "X" seconds. Here, "X" would represent the desired countdown duration. I believe I need to create a script in Bing that utilizes the ControlCommand
function to initiate a separate standalone timer JavaScript. This script would also need to set a global variable to store the value of "X." The standalone timer script would then use this global variable to start the countdown. Once the countdown completes, a sound could be triggered from one of my ARC soundboards to notify me that the time is up.
The same concept applies to the alarm script. I am aware of the JavaScript command Utility.waitUntilTime(hour, minute)
, which might be suitable for the alarm script. However, if I want to use Bing Speech Recognition, would I still need to set a global variable with the desired hour and minutes to trigger the alarm at the specified time? Ideally, I would like to say, "Robot, set an alarm for X:xx am (or pm)."
Another challenge I face is how to capture a spoken time or time duration into a global variable using the Bing Speech Recognition skill. Is there a more efficient method to achieve this?
, could you assist in determining the best way to structure these functions using Bing Speech Recognition and guide me on how to write the necessary JavaScripts?
Certainly! Let's break down the process of creating a countdown timer and an alarm using JavaScript in Synthiam ARC, triggered by the Bing Speech Recognition skill.
Step 1: Setting Up Bing Speech Recognition
All Recognized Script
to handle the recognized phrases.Step 2: Creating the Timer Script
Global Variable for Timer:
$TimerDuration
, to store the duration in seconds.JavaScript for Timer:
Step 3: Creating the Alarm Script
Global Variables for Alarm:
$AlarmHour
and$AlarmMinute
, to store the alarm time.JavaScript for Alarm:
Step 4: Handling Speech Recognition
All Recognized Script
to parse the recognized speech and set the global variables.Step 5: Testing and Adjustments
By following these steps, you can create a countdown timer and alarm system using JavaScript in Synthiam ARC, triggered by Bing Speech Recognition. If you have any questions or need further 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.
Athena would expect you to be doing the parsing. You're trying to mimic a significantly large technological challenge by parsing the intent and complimentary adjectives of a command. That's called NLP (natural language processing). The trouble is, asking athena to provide javascript example wouldn't be possible because it would be a few million lines of code. So you are better off using one of the existing technologies. You have several options..
You can use Google Dialog Flow, which is how Alexa works. The reason alexa knows how to set an alarm and parse the sentence is using NLP. You can't easily create an NLP in javascript because it would be a million lines of code or so. So you'd be using one that already exists. Dialog Flow is my preferred, and probably one of the most popular. The manual for it is here: https://synthiam.com/Support/Skills/Artificial-Intelligence/DialogFlow?id=15882
You can use Chat GPT. In the "personality", specify that if an alarm is requested, to include the hour & minute in the response. For example...
That way, if you ask it to set an alarm, the response will start with the word "Cmd", and you can parse if it's an alarm. Then you know to look for the hour and minute. You can specify other commands as well and parse in the response for how to handle them. Here's manual for Chat GPT: https://synthiam.com/Support/Skills/Artificial-Intelligence/OpenAI-ChatGPT?id=21559
You can use the Conversation Menu robot skill. That way you can have a selection of menu options that are handled verbally. It's like when you call those phone numbers and they provide you with a menu to press 1 or press 2, etc. You can find the manual here: https://synthiam.com/Support/Skills/Audio/Conversational-Menu?id=21091
You can have a phrase in speech recognition such as "Set An Alarm". And then it runs the script which can ask the questions for hour and minute using the Audio.waitForSpeechRange() or Audio.waitForAnyNumberSpeech. You can also add use those two commands in the previous example of Conversation Menu (point 3) for each step of the menu.
@athena expand on these so dave better understands what his options are.
Certainly! Let's delve deeper into the options available for implementing a timer and alarm system using natural language processing (NLP) and other methods in Synthiam ARC.
Option 1: Google DialogFlow
Overview:
How to Use:
Benefits:
Option 2: OpenAI ChatGPT
Overview:
How to Use:
Benefits:
Option 3: Conversational Menu
Overview:
How to Use:
Benefits:
Option 4: Direct Speech Recognition with Scripts
Overview:
How to Use:
Audio.waitForSpeechRange()
orAudio.waitForAnyNumberSpeech()
.Benefits:
Summary
Each option has its strengths and is suitable for different scenarios. If you need advanced NLP capabilities, DialogFlow or ChatGPT would be ideal. For structured interactions, the Conversational Menu is a great choice. If you prefer direct control and simplicity, using Bing Speech Recognition with scripts is effective.
Feel free to ask if you need further clarification or assistance with any of these options!
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.
That's a good amount to get an idea of what option you want to go with. You can build off either one you choose for more features as well. I personally think the Chat GPT is the best option because you can expand on that by providing simple written instructions rather than programming.
Thanks DJ. I appreacheate the input and like these options. I'll have to study each of these options and see which one I can integrate into my robot the best considering his current setup. These timer and alarm features area not mission critical to my B9 robot. I had a conversation with a fellow Lost in Space B9 robot builder and he had mentioned having these features triggered by voice recognition would be a cool thing to have. I thought it would be fun to learn how to make this happen and do it. I do want to dive into this and have some fun with it. I had no idea it would be so involved.
I had wanted to use Bing VR to trigger and set the timer or alarm as it's how I mainly interact with my robot and control it. Perhaps one of your suggestions will work better or alongside of Bing. I would still like my robot to acknowledge the start and end of the alarm or timer with my current robot voice and sound files. I have these stored in ARC's soundboards and use them in other functions and animations. I have hundreds of voice files recorded by the original voice actor that did the B9 robot's voice, Dick Tufeld. For timer and alarm the files simply need to be some of Dick's lines that acknowledge starting the process and then ending it, followed by an alarm sound of some type. Again, I already have these recordings in the soundboards.
Dave, you can do this now: https://synthiam.com/Support/Skills/Artificial-Intelligence/OpenAI-ChatGPT?id=21559
Look at the default description in the robot skill configuration tab. There is an example of a personality for the open ai gpt robot skill to execute scripts.
Just write your description of the code in the personality. You can copy and paste it into athena and she can help you generate a personality that will execute your commands as needed.
This is the default script...
Wow DJ that is some cool stuff. Awesome. Time to play!
Pretty wild right?! It’s something we’ve been working on for a while - part of ARCx so I threw it into ARC. The idea is to program the robot using English instructions rather than code. The ai will generate the code in real-time as needed.
the original plan was to have a bunch of hooks in the software for the ai to trigger. But it makes more sense to have it generate code in real-time.
the image manipulation component i am working on next. It should allow navigation - slowly mind you. Very very slowly haha but the robot eventually gets there.
@dark harvest, if you liked that - check out what we just did with the camera as well. The personality has been updated so you'll want to check it out for the changes. But the personality now includes the ability for it to request images and describe them. Look at this screenshot log where i asked it how many fingers i was holding up.
Wow @DJ. This is an amazing step. Thanks so much for the personal touch and work. I'll need to go through all this and get it implemented. I'll check back in and update my progress. Life it a bit busy right now so it may take a little while to get this all figured out. Thanks again!
Thanks Dave! I know this time of year is busy - hopefully you find some time to robot! I'm going to make a short video about the new features of the open ai chat gpt skill and how it works now. This new feature is pretty wild and we've been doing some amazing stuff with it - including navigation and full conversation with movement and scripting.
Hi DJ, looking forward for the video. This integration opens so much possibilities. I am just finishing my roomba encoder modification to test with the BN. I rewired the roombas encoders and connected them directly to an arduino to use the Wheel Encoder Counter robot skill. Lets see how it works out.
@DJ , I'm looking forward to watching your video on this skill upgrade. It does sound "wild". A video where I can watch how it's used and what it can do will help me wrap my head round this. It will really make it easier to implement and use. Thanks again for all your brilliant work.
I would like to see a video too. This does sound very interesting!