필터 지우기
필터 지우기

Microphone not recognized in simulink

조회 수: 10 (최근 30일)
isra
isra 2017년 1월 15일
댓글: Isra Haroun 2017년 8월 13일
Hello
I'm having trouble recording using MATLAB. It says that no audio input devices are detected. I tried recording outside MATLAB and my mic was working perfectly, only MATLAB wouldn't recognize any mic I plugged in. Here is a screenshot of what I got:
Thanks

답변 (2개)

Vishal Neelagiri
Vishal Neelagiri 2017년 1월 17일
In order to communicate with the audio hardware on a given computer, Simulink uses the open source PortAudio library. The PortAudio library supports a range of APIs designed to communicate with the audio hardware on a given platform. The following API choices were made when building the PortAudio library for Simulink:
Windows®: DirectSound, WDM—KS, ASIO™
Linux®: OSS, ALSA
Mac: CoreAudio
For Windows, the default is DirectSound, for Linux, the default is ALSA, and for Mac there is only one choice.
To determine the audio hardware API currently selected, type the following command in the MATLAB command prompt.
getpref('dsp','portaudioHostApi')
The output is a scalar indicating the choice of the API. 1 — DirectSound 3 — ASIO 7 — OSS 8 — ALSA 11 — WDM-KS To select a particular API, type the following command in the MATLAB command prompt.
setpref('dsp','portaudioHostApi',N)
It might be possible that the API that was setup on your computer is different than the one that is required by your operating system.
The above information is present in the following documentation link:
https://www.mathworks.com/help/dsp/ref/fromaudiodevice.html#brls9zm-1
  댓글 수: 2
isra
isra 2017년 1월 18일
Thanks for replying, I tried it and it gave me 1, which directsound. I'm using windows 7 so this should be correct right?
bob hnoupa
bob hnoupa 2017년 2월 12일
I have the same problem and no solution yet. (stereo usb sound card audio adapter)
When I try " audiorecorder" for example:
r = audiorecorder(22050, 16, 1);
.... it worked last week, but today not!
Error: "No audio input device found on this system."
Matlab system for raspberry (Raspberry Pi 3 Model B) reinstalled, but still no sound device - exactly as on the pics of ISRA here.
if typing:
getpref('dsp','portaudioHostApi')
ans = 1
Any new ideas what should I do? Thanks very for help

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


Alex Dashevsky
Alex Dashevsky 2017년 8월 11일
I have the same problem. My microphone connects to usb. How can solve it ?
  댓글 수: 1
Isra Haroun
Isra Haroun 2017년 8월 13일
I didn't continue in that approach, I had a similar problem with my usb camera too. I just had to download some drivers for windows camera from the list of vendors. I assume it's the same with the mic. you can look for the detected audio devices on the data acquisition app and download any missing drivers if nothing is detected.

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

카테고리

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

제품

Community Treasure Hunt

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

Start Hunting!

Translated by