Install any skill in seconds. Free to start, no credit card required.
Get Started Free →matlab/matlab-play-record-audio
Reference for MATLAB audiostreamer (Audio Toolbox R2025a+). Without this skill, agents consistently default to legacy audioDeviceWriter/audioDeviceReader or base MATLAB sound(), producing less capable code.
Passed 21 of 22 test cases with the skill, and 8 of 22 without it.
and 25 more in the full report
13 fixed8 passed either way1 still failing0 broke
Tokens, turns and time describe resource use, not a dollar price.
One of 13 test cases the skill fixed. Same model, same prompt, with and without the skill.
Write a MATLAB script to record 5 seconds of stereo audio at 48000 Hz from the default microphone into a matrix y using the Audio Toolbox audio streaming hardware API.
| Checked | Without skill | With skill |
|---|---|---|
| The audiostreamer instantiation sets Mode to recorder. | Missed | Passed |
| The audiostreamer instantiation sets RecorderChannels to 1:2. | Missed | Passed |
The instructions your model reads when the skill loads.
audiostreamer is the unified replacement for audioDeviceWriter, audioDeviceReader, and audioPlayerRecorder. It provides player-only, recorder-only, or full-duplex modes with callbacks, pre-buffering, transport control, and measurement helpers.
Version requirements: audiostreamer requires Audio Toolbox R2025a or later. The start and write methods were added in R2026a.
sound or soundsc is fine for one-shot playback of a short clip with no sequencing. For sequential playback (e.g., before/after comparison), use audiostreamer — its play() calls queue automatically, whereas overlapping sound calls play simultaneously.audiostreamer does not yet support codegen; use legacy APIs if targeting codegenaudiostreamersound/soundsc, audioplayer/audiorecorder, or audioDeviceWriter (DSP System Toolbox) if the user lacks Audio Toolboxaudioread/audiowrite, not this skilldaq objectmididevice/midicontrols, not audiostreamerUse Name-Value pairs for Mode and SampleRate (positional shorthand exists but does not support tab-completion):
The default Mode is "player". You MUST set Mode explicitly if recording — either Mode="recorder" or Mode="full-duplex". Mode is not inferred from other properties like Recorder or RecorderChannels.
as = audiostreamer % default: player mode, 44100 Hz
as = audiostreamer(Mode="player", SampleRate=fs) % player at fs Hz
as = audiostreamer(Mode="recorder", SampleRate=fs) % recorder at fs Hz
as = audiostreamer(Mode="full-duplex", SampleRate=fs) % simultaneous play + record
as = audiostreamer(Mode="full-duplex", SampleRate=48000, Driver="ASIO", ...
Player="Focusrite USB ASIO", Recorder="Focusrite USB ASIO", ...
PlayerChannels=[1 2], RecorderChannels=[1 2])
test cases passed, vs 8 / 22 without
More skills from the same source and nearby in the registry, with their headline benchmark lift.