Make audio recording simulation run in real time?
2 views (last 30 days)
Show older comments
Hello,
As part of some university work, I am trying to modulate audio to be recorded from my mic using the Audio Device Reader block with an Audio Oscillator block acting as the carrier signal. However, whenever I try to run the simulation, in which i want it to be ten seconds long so I have time to speak what i need to get modulated, the simulation runs instantly instead of in real time. Is there any way to get the simulation to run in real time so when looking at the time scope I can watch the amplitude change with my speaking?
0 Comments
Accepted Answer
Zinea
on 31 Mar 2025
In order to be able to watch the amplitude change while speaking in real time, the following need to be ensured:
1) The sample time for the "Audio Device Reader" and "Audio Device Writer" blocks is set correctly. It should be small enough to capture and play audio in real time, typically around 1/44100 for a 44.1 kHz sample rate.
2) The "Simulation Pacing" option can be used to slow down the simulation to real time. It can be set to 1x for real time pacing.
You can refer to the model attached where the amplitude change is reflected in the time scope in real time while speaking.
Hope this helps, best!
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!