Listen to streaming radio with ruby?

Does anyone have any information they can share with me on reading an
audio
stream with ruby? I am teaching myself ruby and they say to find a
project
and build it, so here i am. I listen to a lot of online radio and i
thought
i would try and listen to an audio stream from ruby, if its possible.
Thanks!
~Nick

On Jul 5, 8:11 pm, Nick H. [email protected] wrote:

[Note: parts of this message were removed to make it a legal post.]

Does anyone have any information they can share with me on reading an audio
stream with ruby? I am teaching myself ruby and they say to find a project
and build it, so here i am. I listen to a lot of online radio and i thought
i would try and listen to an audio stream from ruby, if its possible.
Thanks!
~Nick

Since I listen a lot of online radio stations I’ve made small GUI
utility for myself. It downloads list of radio stations from Shoutcast
and Xiph and on Linux uses any player (I use audacious2 on Ubuntu).
You can see it on http://github.com/bosko/rstreamtuner. You’ll need
wxRuby in order to use it.

Regards,
Bo¹ko Ivani¹evi

Nick H. wrote:

Does anyone have any information they can share with me on reading an
audio
stream with ruby?

If you want to ‘catch’ the stream on its way in, I might try something
like raw HTTP request:

http://en.wikibooks.org/wiki/Ruby_Programming/Reference/Objects/Socket#Example

or use EventMachine to do the same, if you plan on having multiple
connections open.
GL.
-r

Nick H. wrote:

Does anyone have any information they can share with me on reading an
audio stream with ruby? I am teaching myself ruby and they say to find a
project and build it, so here i am. I listen to a lot of online radio and i
thought i would try and listen to an audio stream from ruby, if its possible.
Thanks!
~Nick

Hi Nick, a very simplistic maybe => invoke a system command to run VLC,
passing it the url of the radio stream; like:

system “vlc http://radio1.internode.on.net:8000/117 vlc://quit ;”

rob

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs