Clear Filters
Clear Filters

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

2 views (last 30 days)
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

Answers (1)

Amish
Amish on 20 May 2024
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!

Categories

Find more on Audio I/O and Waveform Generation in Help Center and File Exchange

Products


Release

R2019a

Community Treasure Hunt

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

Start Hunting!