Ashwin
05/29/2024, 7:21 AMVapi Support
05/29/2024, 7:21 AMVapi Support
05/29/2024, 7:21 AMVapi Support
05/29/2024, 7:24 AMSahil
05/29/2024, 7:47 AMSova
05/29/2024, 7:56 AMaudio set to true. And this will set the audio input device to default device.
In my case, I'd like to specify the audio input device ID before joining the call. I have been able to archive that by accessing internal "call" object in the VAPI SDK and use the setInputDevicesAsync, and it works perfectly for changing Audio Input device (microphone)
However, for the Audio output device, it's a bit more tricky. To change the audio output device, we need to modify the "sinkId" property of the generated audio tag of VAPI SDK. I tried something like
const vapiAudioTags = document.querySelectorAll<any>(
'audio[data-participant-id]'
)
vapiAudioTags.forEach((el) => {
el.setSinkId(speakerDeviceId)
})
This works, but somehow the sinkId got "cleared" for every few miliseconds, thus resetting the audio output to default device. I can forcefully set the "sinkId" by use an interval and constantly set it to desired speaker device ID, but it would cause unstability in the audio output (because the output device gets changed back and forth continuously)
---------
My proposal is:
- Can VAPI SDK expose a method, something like changeMediaDevices that allow us to modify the Audio input and Audio output by specifying device IDs?
https://cdn.discordapp.com/attachments/1245275704061595679/1245284509470162985/image.png?ex=66583113&is=6656df93&hm=6c24317673e7ce743349fa3a0545dba30d05c88bfcaf4bf669577baf7d816f37&
https://cdn.discordapp.com/attachments/1245275704061595679/1245284509729947778/image.png?ex=66583113&is=6656df93&hm=8439dccaac1cd04432413d45835fd71613eee9b5cf8aaa6a57fd4234f3804213&Sahil
05/29/2024, 7:56 AMSova
05/29/2024, 7:56 AMSahil
05/29/2024, 8:37 AMAshwin
05/29/2024, 9:16 AMSahil
05/29/2024, 9:17 AMHenry Black
04/30/2025, 5:32 PMVapi
04/30/2025, 8:08 PM