2

Using VB.NET, I want to analyze input audio streams obtained from Web radio stations (e.g.: "Flower Power Radio" via TuneIn). However, I am struggling in finding a suitable starting point.

Obviously, when entering into the Web browser a Web address (as given in above example), a stream starts flowing and is being interpreted by, in this case, said Web browser.

Only that my planned experiments do not involve the requirement for a browser; and since I do not want to replay the received audio stream, nor record it, I can also abstain from using the MediaPlayer.

I "just" want to intercept the stream's payload data in order to perform time–frequency analysis for music signals. But, how do I access this continuously delivered data?


(Edit: I should probably add, that I do not really embrace using 3rd party libraries of any sort.)

1 Answers1

0

To intercept the stream's payload data use the browser's developer tools. Press F12, go to the Network tab and select 'All'. Then press F5 to refresh the page. enter image description here

Notice the first row entry which is the stream's source. From there you can check the request/responses from this stream http://flower.serverhostingcenter.com:8433/;

Now to access the downloading data use:

Dim c As New WebClient()
        Dim responseData As Byte() = c.DownloadData("http://flower.serverhostingcenter.com:8433/;")

Since the streaming is endless, the file will keep downloading. It's up to you when you want to stop it and analyse the results. You can use Async events as well.

alwaysVBNET
  • 3,150
  • 8
  • 32
  • 65
  • Thanks for putting me on the right track, going with `OpenRead` now. –  Jul 07 '17 at 09:39
  • @Herb please keep me posted if you can on how you progress this – alwaysVBNET Jul 07 '17 at 12:38
  • Sure, here's my [follow-up question](https://stackoverflow.com/questions/45117152/recognize-and-skip-invalid-or-proprietary-mp3-frame-headers-from-web-audio-st). –  Jul 15 '17 at 10:31