Defining the name of a dsp.AudioRecorder input

4 ビュー (過去 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 Center および File ExchangeActiveX についてさらに検索

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by