Defining the name of a dsp.AudioRecorder input

조회 수: 1 (최근 30일)
Matt
Matt 2015년 9월 7일
댓글: Ashwini Srivastava 2015년 9월 18일
Hey,
I have an external sound card I would like to sample from using Matlab.
Using
adev_info=audiodevinfo
I can see 2 inputs.
adev_info.input.Name
Gives me
ans =
Primary Sound Capture Driver (Windows DirectSound)
ans =
Line (2- SB X-Fi Surround 5.1) (Windows DirectSound)
Therefore I assume the name when calling dsp.AudioRecorder should be "Line (2- SB X-Fi Surround 5.1) (Windows DirectSound)" But I get an error saying,
Error using matlab.system.StringSet/findMatch (line 58)
Line (2- SB X-Fi Surround 5.1) (Windows DirectSound) is
not a valid setting for the DeviceName property.

답변 (1개)

Matt Cohen
Matt Cohen 2015년 9월 9일
Hi Matt,
I understand that you are encountering an issue when trying to assign a device by its name to a dsp.AudioRecorder object.
I think the issue here is due to potential differences in naming convention between the output from "audiodevinfo" and the valid values of the dsp.AudioRecorder object's 'DeviceName' property for your computer. The dsp.AudioRecorder object expects a slightly truncated version of the device's name for some devices. For example, the Windows DirectSound portion of the device's name likely is not included as an expected portion of an input device's name.
In your example, try using 'Line (2- SB X-Fi Surround 5.1)' instead of the full name. Also, as mentioned in the documentation for the dsp.AudioRecorder object :
"You can use tab completion to query valid 'DeviceName' assignments for your computer by typing H.DeviceName = ' into the MATLAB command window and then pressing the tab key. The tab completion functionality shows all valid audio device names for your computer."
You can create an empty dsp.AudioRecorder object and use the tab completion process to determine the valid format for the device names.
I hope this helps.
Matt Cohen
  댓글 수: 1
Ashwini Srivastava
Ashwini Srivastava 2015년 9월 18일
Thx. It was helpful. I was able to select the recording device. I was using multiple microphone arrays.

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

카테고리

Help CenterFile Exchange에서 Audio and Video Data에 대해 자세히 알아보기

태그

Community Treasure Hunt

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

Start Hunting!

Translated by