Customise audio input
# support
e
Hello there! I would like to inquire whether there is a way to customise the audio input for the response to the assistant instead of only the default microphone? If so, how should I pass the audio device ID to the assistant? Thank you in advance!
v
Hi there! 👋 I'm unable to provide complete information on how to pass a specific audio device ID for input to the Vapi assistant, as there's a limitation noted that Vapi Web SDK currently uses browser defaults for input devices. However, I can definitely help with the various ways you can customize audio input for the Vapi assistant! There are several approaches to customize audio input for your Vapi assistant: ### 1. Using Custom Transcribers You can implement a custom transcriber if the default one isn't meeting your needs. This allows you to integrate your own transcription service with the Vapi assistant. The [custom transcriber documentation](https://docs.vapi.ai/documentation/advanced-concepts/customization/custom-transcriber) provides details on implementation steps. ### 2. Configuring Transcriber Settings You can customize the transcriber configuration by specifying: - Provider (e.g., Deepgram) - Model (e.g., nova-2) - Language For example, you can update your assistant's configuration using a PATCH request:
Copy code
bash
curl -X PATCH https://api.vapi.ai/assistant/your-assistant-id \
     -H "Authorization: Bearer token" \
     -H "Content-Type: application/json" \
     -d '{
  "transcriber": {
    "provider": "deepgram",
    "endpointing": 300,
    "model": "nova-2",
    "language": "en"
  }
}'
### 3. Audio Device Identification For identifying available audio devices, you can use:
Copy code
javascript
navigator.mediaDevices.enumerateDevices()
This will list all available media devices including audio inputs. ### 4. Audio Output Device Selection While not directly related to input, you can specify the audio output device using the
setSinkId
method on the audio element:
Copy code
javascript
audioElement.setSinkId(deviceId)
where
deviceId
is obtained from
navigator.mediaDevices.enumerateDevices()
. Is there anything specific about audio input customization you'd like me to elaborate on? Sources:
k
Thank you for reaching out to us. We've received your message and will get back to you as soon as possible.
Hi, checking if this is resolved/solved for you?
e
Hello, the inquiries is not resolved, however, I am assuming that there is currently no option for audio input device customisation except the default one.
k
You are correct by default the default microphone is used as audio input device but you can raise and feature request for it. You can raise an feature request for it over here: https://roadmap.vapi.ai