Welcome to Synthiam!

Program robots using technologies created by industry experts. ARC is our free-to-use robot programming software that makes features like vision recognition, navigation, and artificial intelligence easy.

Get Started
France
Asked

Question


Good evening, I don't know if it's possible,

I use a SARAH framework with plugins with a Dictionnary plugin that parse my answer. It works perfectly and I get my answer. I created a script that I named dico that I would like to launch with an HTTP request and a ControlCommand. 


Code:

$VoiceStart = "<prosody pitch='+10%' rate='-5%' range='+5%' contour='(0%,+30Hz) (10%,-2st) (40%,+10Hz)'> "
$VoiceEnd = "</prosody>"
$search = "voiture"
$SynbotTextResponse = HTTPget("http://127.0.0.1:8080/SARAH/dictionary?text="+$search)
SayWait($VoiceStart +$SynbotTextResponse+ $VoiceEnd)


But here is my question:

You will understand, instead of voiture I would like to put the object of my research $search = "voiture"

http://192.168.1.78/exec?password=admin&script=ControlCommand("dico".........search("mysearch")


Is it possible?

Another thing and it's important, I always have a problem with the accents in my answers. Is an update planned?

[url=https://synthiam.com/Question/3771][size=2][font=Verdana, Arial, Helvetica, sans-serif]see here[/font][/size] 

Thanks 










ARC Pro

Upgrade to ARC Pro

Become a Synthiam ARC Pro subscriber to unleash the power of easy and powerful robot programming

AI Support Bot
Related Content
Synthiam
#1  
I found and it was easy as pie. I forgot to mention I use Synbot.

Code:

<Model>
<Pattern>
<Item>DICO *</Item>
</Pattern>
<Response>
<x:EZcmd>HTTPget("http://127.0.0.1:8080/SARAH/dictionary?text=<Match />")</x:EZcmd>
</Response>
</Model>



Now I will be able to parse all my sites that I wish (dico, wikipedia, weather ...) with my framework. 

But I have always problem with the accents, it's impossible to use this (for the time being?).


#2   — Edited
I had already discussed the problem here

Here I have my accents in my answer.

User-inserted image

mécanisme automatique capable d'exécuter certaines tâches selon un programme fixe ou modifiable

But in synbot the accents are not present and the answer is unusable.

User-inserted image

mcanisme automatique capable d'excuter certaines tches selon un programme fixe ou modifiable

[color=#442e5f][size=3][font=OpenSans, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"][b]@DJ [/b]I specify that the site dictionary.reverso.net is in UTF-8, 
my plugin gives the answer in UTF-8 with all the accents.

Code:

request({ 'uri' : url ,'htm':{'Accept-Charset': 'UTF-8'}, }, function (err, response, body){

 I did the tests on 2 PCs and others ARC skill plugins (pandorabot, synbot,...)

#3  
@Dj Well, I found a solution by doing a regex. It's not really beautiful but it works, that's all that matters.



Code:

match = match.replace(/[éèê]/g,"é");