Is there a way to convert audio data output by audioread() into dsp.AudioFileReader object without saving and reading the file again.

5 views (last 30 days)
I am trying to apply effects on the audio in real time and doing it through dsp.AudioFileReader seems to work the best. I have tried using buffer() to turn the data from audioread() into smaller chunks however that solution is far from ideal. I have also tried saving the data into a temporary file and reading it back again however I don't like this solution as it creates unecessary files. Is there any way to directly convert that data into dsp.AudioFileReader object?
  2 Comments
Walter Roberson
Walter Roberson on 29 Oct 2020
I am trying to apply effects on the audio in real time and doing it through dsp.AudioFileReader seems to work the best
That does not sound right. I would have thought audioDeviceReader https://www.mathworks.com/help/audio/ref/audiodevicereader-system-object.html would be more appropriate for real-time.
Brian Hemmat
Brian Hemmat on 29 Oct 2020
You may find the following pages helpful as well.
Bare-bones intro to audio i/o:
Slightly more advanced, gets into prototyping the processing between the i and the o, and illustrates a workflow using the GUI Audio Test Bench:
A more advanced programmatic tutorial (note the quick-start examples provide different i/o configurations (i.e. file or microphone in, and file or speaker out):
All of the above tutorials require Audio Toolbox.

Sign in to comment.

Answers (0)

Categories

Find more on Measurements and Spatial Audio in Help Center and File Exchange

Tags

Products


Release

R2020a

Community Treasure Hunt

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

Start Hunting!