
A bit of an unusual request, but there is reasoning behind what I'm about to ask. So my question is...
Is there a way to display a robots spoken response as text with ARC?
Let me explain. Speech synthesis for a robots response is not an option here. You speak to a robot using speech recognition and the robot responds with text displayed on the computer screen. Now using the Pandorabot control will do this showing the robots response in the debug window, but the text is too small.
If your familiar with Pandorabot, you'll know that when you have a published bot, you get your own page where your Pandorabots response is displayed and you can add HTML code to change the text layout. This is something like what I'm looking to do via ARC. I could use the Pandorabot portal, but I would need control commands which are imbedded in the bots responses to activate when the response is given.
The reasoning behind this, is for someone who is hard of hearing to interact and converse with the robot, so you see why speech synthesis can't really be used in this situation. I might be overlooking something obvious here, or there might be something that I'm unaware of, so ANY input anyone can offer on this really would be gratefully appreciated.
Cheers,
Steve.
I've sent it in an email with instructions. Let me know how it goes and what changes need to be made. I'm sure I haven't thought of everything. Maybe not even most things. Have "fun". Try not to curse me too much.
EDIT Well darn! The email was rejected because of the attachment. Probably because it's an EXE file. I'll try again by renaming the file so that it has a TXT extension. You can put it back to EXE on your end.
Thanks buddy. I'll check it out hopefully this weekend, and get back to you.
EDIT.
I just saw your edit about the email. Can you not attach the file to a forum post?
Ok, I'm trying to attach the file to this post. If it seems to work, I'll put the instructions I put in the email here as well.
Didn't see anything. Zip Files are listed as a legitimate file to attach. So I zipped it up and tried again.EZDisplayInstaller.zip
Looks like that may have worked so here is what I wrote in the email:
Hi Steve;
I've attached an installer for what I'm calling the EZDisplay. It will allow for step by step setup even though there are only three files involved. There are certain directories that must be setup as well and an installer seemed like the most straightforward way to do it.
Be sure to take note of whatever directory you choose to set it up in (copy and paste is good) so you can put the same root directory in the accompanying script. A good place might be the ARC directory itself, but anything is fine. The default will be what I chose during the development process (F:\EZ_DisplayD7\TestArea).
Once installed, it will be ready to go (in theory). There is even a check box at the end to launch it for the first time if you wish and a desktop icon should be created for subsequent startups. Of course you can also start/stop it via the Exec script command.
The directory for the data transfer is called, appropriately enough, "Transfer." And the transfer file itself is called "DisplayText.txt." The DisplayText.txt file is used by both the EZDisplay program and the ARC script. Speaking of the script, here it is:
It's fairly simple. I put it in a script control called "SendToDisplay". You can call it whatever you wish. The main variable is $DisplayText. You would use that variable in whatever script you want to send data to the Display. All you have to do it set the $DisplayText equal to what you want to send, usually what the robot says. When you do that, The "WaitForChange" command is satisfied and the script goes beyond that and sends the line out.
Of course you will want to put the path you chose at installation for the $TheFileName variable. The path in this example is: "F:\EZ_DisplayD7\TestArea"
The last part ("Transfer\DisplayText.txt" ) will always be the same. Also, never put anything else in the Transfer directory. It must contain only the DisplayText.txt file.
To set it up you have to have another script first call it via a Command Control. Here is a script I used for testing:
The first line calls the SendToDisplay script one time to allow it to set itself up. Once done, the SendToDisplay script will run in an endless loop until terminated by: CC("SendToDisplay",ScriptStop).
It can also be stopped by setting $StopSendToDisplay to True.
This test script simply sends out the same line with a new line number attached 101 times. Again, when you actually use the SendToDisplay script, just run CC("SendToDisplay",ScriptStart) once somewhere in an Init script and set $DisplayText equal to what you want to send each time.
I have gotten most of the functions I wanted to have in the Display program working. You can bring up the options by right clicking anywhere in the display area with a right mouse click or pressing the "Set" button at the lower left. The options are: Word Wrap - Same as in Notepad and other editors. Auto Clear - Clears the display area each time a new line comes in Show Buttons - Not implemented yet Show Vert Scroll - Show the vertical scroll bar Show Horiz Scroll - Show the horizontal scroll bar Set Font - Opens another window to set the font options
All the settings, as well as, the window size and position, and font options will be remembered when the window is closed.
As I said, I have no idea just how it will work out on the tablet, especially when you turn it from Portrait to Landscape position. Just have to try it and see. Then you can advise me on what needs to be done to make it look better.
The reason I have not implemented the "Show Buttons" option is that I'm not sure how you would get to the options if you set Show Buttons to False (no buttons or button panel shown at the bottom). That will show only display text area, but without a mouse, I don't know how you would get to the options after you hid the "Set" button.
So, give it a try and let me know what happens.
Excellent stuff. I look forward to trying this. If I can get the time I'll try it tonight as I'm itching to have a play. Thanks again, and I'll let you know how it goes.
Use the Sketch Pad control: https://synthiam.com/Tutorials/Help.aspx?id=195
It has many ControlCommands() which you will find in the Cheat Sheet. One is for DrawString, which accepts colors, size and the string. Simply use the Clear ControlCommand() before drawing the text each time to start with a blank canvas of your preferred color.
Resize the control to be your preferred size as well.
@DJ Sures
Thanks for the info, but there's the rub. There is NO further information. Even the tutorial gives no clue you can even "write" strings in that control. There is nothing as to what form or range the numbers involved should be. HTML code? RGB code? Just numbers? What? You can't just reference the tutorial and say all you need to do is this and this and bingo! See how simple it is?.I finally figured out what the range should be by making them too big and got an error message which indicated they needed to be between 0 and 255. Same with the number of parameters must be in each command. The error message told me that, finally. All this stuff should be in the tutorial. And that doesn't count the fact nothing mentions the numbers have to be in quotes. I still don't know what sort of number has to be in this command as to color:
Whatever I put in there seems to do the same thing. There seems to be no wrong answer for color.
When I first brought up the Cheat Sheet for this control all 3 possible commands were exactly the same. Only when I tried the one shown above, did it change to show 3 different commands.
That is why people don't even try controls like this. Don't even know this one can display text.
You will find examples in the examples folder of ARC. Here is an important tutorial on example files: https://synthiam.com/Tutorials/Lesson/22?courseId=6
The Example Project is pretty nifty, it provides and I think it'll prove to be robust once we all have more examples and see it used more. My question is, in the code example above $x and $y provides the location to display the text, but what does the value of "15" do? I thought it was font size at first but I can change the value and it does not appear to make a difference.