News for hackers. Stuff that matters.
Re:Show HN: Wsta – a CLI for working with WebSockets written... by nfriedly on Monday May 23, 2016 @08:32AM (#11753405)
Can I use this to send an initial JSON message and then pipe audio data from my mic?

(I wouldn't be surprised if this is possible with standard UNIX magic... But I just don't know how.)

Re:Show HN: Wsta – a CLI for working with WebSockets written... by tty7 on Monday May 23, 2016 @08:41AM (#11753452)
Something like: arecord -fdat | wsta ws:// ?
Re:Show HN: Wsta – a CLI for working with WebSockets written... by nindwen on Monday May 23, 2016 @09:35AM (#11753725)
Supposing this is correct, you can add the json with cat: arecord -fdat | cat init.json - | wsta ws://
Re:Show HN: Wsta – a CLI for working with WebSockets written... by nfriedly on Monday May 23, 2016 @10:24AM (#11754014)
Yep, that sounds like the magic I was looking for. I'll try it out later today.
Re:Show HN: Wsta – a CLI for working with WebSockets written... by esphen on Monday May 23, 2016 @11:59AM (#11754683)
Holler if it works, that sounds pretty awesome!
Re:Show HN: Wsta – a CLI for working with WebSockets written... by nfriedly on Thursday May 26, 2016 @02:15PM (#11780248)
I tried a few different things and couldn't make it work. I think the problem is that the audio data is getting sent as a text websocket message rather than binary message. I got a whole bunch of "error: stream did not contain valid UTF-8" and "No JSON object could be decoded" errors that I think both came from the remote end.