France
Asked

Good Evening, I Don'T Know I

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.

$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

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

#1  

I found and it was easy as pie. I forgot to mention I use Synbot.

<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

@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.

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.

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