In .NET, how do I access the audio input stream?

Using VB.NET, I want to parse the input audio streams received from web radios (ex: Power Color Emission via TuneIn ). However, I am afraid to find a suitable starting point.

Obviously, when you enter a web address into a web browser (as indicated in the above example), the stream begins to flow and is interpreted, in this case, by the said web browser.

Just that my planned experiments are not related to a browser requirement; and since I don't want to play the resulting audio stream and not record it, I can also refrain from using the MediaPlayer.

I just "want to intercept the stream payload data to perform time-frequency analysis of the music signals . But , how can I access this continuously delivered data?"


(Edit: Perhaps I should add that I don't really use third-party libraries of any kind.)

+2


source to share


1 answer


To intercept stream payload data, use browser 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 line entry, which is the source of the stream. From there you can check the request / responses from this thread http://flower.serverhostingcenter.com:8433/;

Now, to access the data to load, 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 is up to you when you want to stop it and analyze the results. You can also use Async events.

+1


source







All Articles