Server VAD not working (MacOS application)

I updated my session to enable turn detection using server VAD. When I play the response audio my microphone picks up what the AI is saying… The API then thinks that is what I am saying so the AI is talking to itself. How can I make it so it knows not to listen to the AI’s response?

let sessionUpdateJson: [String: Any] = [
            "type": "session.update",
            "session": [
                "modalities": ["text", "audio"],
                "instructions": "MY INSTRUCTIONS",
                "voice": "alloy",
                "input_audio_transcription": [
                    "model": "whisper-1"
                ],
                "turn_detection": [ "type": "server_vad" ]
            ]
        ]
1 Like

When using a setup with speakers, it’s probably best to integrate your own echo cancellation.

There are many libraries out there to do this.

So for your issue you would use server_vad with your own implementation of echo cancellation or even noise reduction.

Good luck! :hugs:

1 Like

Gotcha. Thanks for the response!

1 Like

No worries. Glad to hear that it helped!
Feel free to mark my response as an answer for future users who might struggle with the same issue. :hugs:

1 Like