matlab set my audio device as an output, can i set it as a input to use my headset's microphone

2 次查看(过去 30 天)
Hello ,
i want to record sound with 2 differents microphones, when i use the fonction : "audiodevinfo", matlab doesn't see neither my headset's microphone (jack) nor my external's mircophone (USB) as input .
Given that, jack audio device ins an input and an output, matlab defines it as an output
Do you know how can i transform the audio output into a input?
Fanny

回答(1 个)

Amish
Amish 2024-5-20
Hi Fanny,
Transforming an audio output to an input within the MATLAB environment or through the "audiodevinfo" function isn't directly possible. This is because the designation of a device as either an input or an output device is determined by the host operating system and the device drivers, not by MATLAB itself.
Therefore, you will need to go and check in your corresponding Operating System's sound settings to make sure that the microphones are recognized and enabled as input devices.
In case, MATLAB still does not recognise your devices correctly while they are being correctly recognised by the OS, try using the "audiorecorder" function to manually force the recording device. This can be done as following:
recObj = audiorecorder(SamplingRate, BitDepth, NumChannels, DeviceID);
Replace the "DeviceID" with the ID of your required device.
Additionally, you can find the documentation link here: https://www.mathworks.com/help/matlab/ref/audiorecorder.html
Hope this helps!

类别

Help CenterFile Exchange 中查找有关 Audio I/O and Waveform Generation 的更多信息

产品


版本

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by