How can I record my voice without pause?

I made a voice control ping-pong game with matlab gui.
In the middle of the game, pressing "r" initiates recording for 1 sec.
Problem is, the game stops just for 1 sec if I press "r" which means, nothing happens during recording.
Since the title of my project is "real-time voice control ping-pong game", this problem should be solved.
Any ideas???

답변 (1개)

Walter Roberson
Walter Roberson 2017년 12월 4일

0 개 추천

You need to use the facilities of the Audio System Toolbox. audiorecord() is not suitable for this purpose.

댓글 수: 5

minsoo kim
minsoo kim 2017년 12월 4일
Yes, I used audiorecord()... Is there any ways to solve my problem without buying Audio system toolbox??
Walter Roberson
Walter Roberson 2017년 12월 4일
audiorecorder() has a record() method that is not blocking. However it cannot be used for continuous voice input, as the data is not available until the end of the recording period. You cannot just keep calling the record method repeatedly because of the setup time -- that is, you would get gaps in the input.
The DSP toolbox has a continuous audio input function.
minsoo kim
minsoo kim 2017년 12월 5일
thanks!
minsoo kim
minsoo kim 2017년 12월 5일
sry, I have one more question. How can I stop record function? I mean, I want to record just for 1 second, but I have no idea how to do this...
minsoo kim
minsoo kim 2017년 12월 5일
ah nevermind. I solved the problem.

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

카테고리

도움말 센터File Exchange에서 Just for fun에 대해 자세히 알아보기

질문:

2017년 12월 4일

댓글:

2017년 12월 5일

Community Treasure Hunt

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

Start Hunting!