Robot Not a Dev? Buy Now
Not a Dev?

Misty Community Forum

Post Body for misty.SendExternalRequest

Is there any way to provide a post body for the JavaScript sdk call misty.SendExternalRequest?

My goal is to send an audio recording up for speech to text/intention/text to speech, but I need to find a way to get the recording up to the http server.


Hi cbattlegear,
You can use the arguments parameter to include audio or image content in string format. Check out the REST documentation for more detail on that. Unfortunately, we don’t currently provide support for multipart uploading in that command, nor can you simply reference a file on the robot to upload. I will discuss adding to upcoming sprints with the team.


Hi cbattlegear,
Have you had any luck sending content through SendExternalRequest?

Hey @cbattlegear!

This might be helpful, @cameron created a skill that uses Google’s DialogFlow to do what you’re probably attempting yourself.

In essence the simplest thing to do is to send the audio file as a base64 string (Google Cloud Services accepts audio in that format). Check out function ProcessAudioFile(data) which uses the misty.SendExternalRequest() call to see how Cameron accomplishes this!

Out of curiosity, are you writing your own ‘intent detection’ method or are you utilizing Google/Watson/Cognitive services?

Let me know if this helps!

1 Like

I was able to get it working! I am currently using Azure Cognitive Services (LUIS and the Azure Speech service) to determine intent/speech-to-text/speech synthesis.

Here is the gist of the code I am using (extremely simple proof of concept at this point)

If you want I can put up a gist of the Azure Function that is doing the processing also (it is poorly written but works!)


Hooray! Thanks for the update @cbattlegear! I’d love to see your Azure Function!

Here’s the azure function, at this point is just does local current weather and is genuinely disgusting code, but it works!