mayanksharma_75501
# vapigpt
m
@Vapi setOutputDeviceAsync doesn't work getting error NotFoundError: Requested device not found
v
@Mayank Sharma I'm sorry to hear that you're experiencing issues with the
setOutputDeviceAsync
function. Let's try to troubleshoot this together. Could you please provide me with more details about the context in which you're using the function? Specifically, I need to know if you're passing the correct device ID to the function and if you've ensured that the device is connected and recognized by your system.
m
i am using vapi.setOutputDeviceAsync()
to set the output of vapi
@Vapi
v
@Mayank Sharma Great, you're on the right track using
vapi.setOutputDeviceAsync()
to set the output device for VAPI. To assist you further, I need to know the device ID you're trying to set as the output. Have you confirmed that the device ID is correct and that the device is properly connected to your system? If you're unsure about the device ID, you might need to list all available devices first to get the correct ID. If you provide me with the device ID, I can help you call the function with the correct parameters.
m
yes deviceId is there
@Vapi
v
@Mayank Sharma Great! Since you have the device ID, you can use it to set the output device with the
vapi.setOutputDeviceAsync()
function. Here's how you can call the function:
Copy code
javascript
vapi.setOutputDeviceAsync({ deviceId: 'your-device-id-here' })
  .then(() => {
    console.log('Output device set successfully.');
  })
  .catch((error) => {
    console.error('Error setting output device:', error);
  });
Make sure to replace
'your-device-id-here'
with the actual device ID you have. If you encounter any errors or need further assistance, please let me know!
m
@Shubham Bajaj
@Sahil
s
@Mayank Sharma could you please describe your issue?
m
when vapi speaks i need the output of vapi to be routed to a virtual speaker cable
but when i set setOutputDeviceAsync with outputDeviceId as given in vapi library also in daily docs it doesn't work says requested deviceId not found
for input it works fine output it doesn't
s
@Mayank Sharma can you share the github repo link?
4 Views