Play Audio Blob

Have you been able to play a short raw Audio Blob from an Agent? On an iPhone App? PC Browser? MMS message? Any of the above? I’d like to start simple. First with an idea, then some code?

You want to take a look at Lala: http://electricimp.com/docs/hardware/resources/reference-designs/lala/

It’s a reference design (+code) that demonstrates how to play and record audio! Your best bet for help with this board is @Aron - he’s written all sorts of Lala code.

That’s a great design! I looked at it last year. My code and hardware are much simpler. But I have only managed to record the audio. I’d like to play it back on a phone or PC. Not another Imp. Although the Imp might be easier? It’s not what I’m looking for…

The squirrel code for this reference design is in Github and includes the writeChunkHeaders() which adds WAV headers to make it playable on any device or software.

https://github.com/electricimp/examples/blob/master/lala/lala.agent.nut

A.

Does anyone have example code for sending a Blob from an Agent to a file on a web host? It should only be a few lines of code right? Only one line on the server.

file_put_contents(‘test.txt’, file_get_contents(‘php://input’));

In the past I have done it a much harder way with BASE64 encoding.

Similar project here. But the hardware is so much bigger in size:
http://forum.arduino.cc/index.php?topic=198336.0

I have a WAV file hosted on my server with a specific url. I cant seem to figure out how to adjust agent code to my external hosted WAV file. Help.