Make audio recording simulation run in real time?

조회 수: 1 (최근 30일)
Oliver
Oliver 2025년 3월 28일
편집: Oliver 2025년 3월 31일
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?

채택된 답변

Zinea
Zinea 2025년 3월 31일
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!
  댓글 수: 1
Oliver
Oliver 2025년 3월 31일
Thank you, that example seems to be one way of having a system that is working in real-time on my laptop rn!

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Signal Import and Export에 대해 자세히 알아보기

제품


릴리스

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by