Download a continuous audio wave stream at specific intervals.

Hey guys, I'm currently working on a voice recognition application and one of the things I need is a audio wav stream. Well I got that working and I've managed to get a audio file going on a web page. I need to extract this audio file and use it in my application.

 using (WebClient webClient = new WebClient()) { byte[] data = webClient.DownloadData(@"http://ift.tt/1IwlcWX;); using (MemoryStream mem = new MemoryStream(data)) { System.IO.File.WriteAllBytes("c:\\Fraps\\myfile.wav", data); } } 

This is my current code but as you can see it gets stuck in a infinite loop because the audio file being streamed is continuous and does not have a end. How do I sample this audio and break it into chunks? This is the webpage I'm streaming the audio from –http://ift.tt/1IwlfSl

All help appreciated!

by ZodiacKiller20 via /r/csharp

Leave a Reply