#Is it possible to turn off the voice activity detection?

1 messages · Page 1 of 1 (latest)

unborn sinew
#

Hi,

Is it possible to turn off the voice activity detection in voice agent in order to trigger bot responses manually?

It would be an equivalent of turn_detection: None in openai realtime API when bot responses are triggered using response.create.

Thanks

shadow anchorBOT
#

Hi @unborn sinew. I'm kapa.ai, your friendly support bot. I will try to answer your question by searching through the knowledge base. :wave:

#

Based on the knowledge sources provided, there isn't explicit information about completely turning off voice activity detection (VAD) in Deepgram's Voice Agent API to trigger bot responses manually. However, there are several approaches you could use to achieve similar functionality:

  1. Programmatically mute the microphone: You can control when the agent receives audio by muting the microphone input when you don't want the agent to respond to voice.

  2. Use a local VAD: You can keep the microphone enabled but use a local voice activity detector to control when audio is sent through the WebSocket.

  3. Inject Agent Messages: You can use the injectAgentMessage feature to manually trigger agent responses at specific times, which allows you to "[send] a message to immediately trigger an Agent statement" Inject Agent Message.

For microphone control in the Python SDK, you can use methods like:

microphone.finish()  # to stop the microphone
microphone.mute()    # to mute it temporarily

Additionally, when implementing your solution, you might want to handle the UserStartedSpeaking events appropriately. The documentation recommends: "Whenever you receive a UserStartedSpeaking message from the server, we recommend you discard any queued agent speech" Getting Started.

If you need more specific control, you might want to reach out to Deepgram support as the knowledge sources don't provide a direct equivalent to OpenAI's turn_detection: None parameter.

Note: you can ask me a follow up question by @ mentioning me again :speech_balloon:

#

@unborn sinew Kapa.ai is still learning and improving, please let me know how I did by reacting below.