How can I receive http audio streams in Matlab?

3 views (last 30 days)
I used to put the URL (ex: for the audio stream into Simulink Multimedia File Reader "File Name" parameter but this no longer functions. Is there a new way of getting streaming audio into a Simulink model? Is there a function that allows me to receive http streams in a Matlab script?

Answers (2)

Urmila Rajpurohith
Urmila Rajpurohith on 5 Aug 2019
Assuming you need to Process Audio file in your Simulink model:
The “From Multimedia Fileblock accepts the audio files which have extensions such as
.wav, .wma, .avi, .aif, .aifc, .aiff, .mp3, .au, .snd, .mp4, .m4a, .flac, .ogg
So if you need to access web based data use following function in MATLAB
And then you can access the data in Simulink using “From Workspace” block and can process it further.
You can refer to below documentation link for more details on how to use “webread” function.

Richard Keniuk
Richard Keniuk on 26 Aug 2019
Edited: Richard Keniuk on 26 Aug 2019
Thanks for the input Urmila,
Looks like webread will only work for file with a fixed filesize download (picture, web page data, image). I am trying to receive live a live audio stream which has no end. Maybe I am missing something here. I am using this URL for a test: ""




Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!