Build a Voice Agent

Handshake

GET

Headers

AuthorizationstringRequired

API key for authentication. Format should be token <DEEPGRAM_API_KEY>

Send

Settings Configurationobject

Configure the voice agent and sets the input and output audio formats

OR
Update Instructionsobject

Send a message to give additional instructions to the Think model in the middle of a conversation

OR
Update Speakobject

Send a message to change the Speak model in the middle of a conversation

OR
Inject Agent Messageobject

Send a message to change the Speak model in the middle of a conversation

OR
Function Call Responseobject

Configure the voice agent and configure the function call response

OR
Agent Keep Aliveobject

Send messages ensuring uninterrupted communication for your agent

Receive

Injection Refusedobject

Receive injection refused message

OR
Welcome Messageobject

Receive a welcome message from the server to confirm the websocket has opened

OR
Settings Appliedobject

Confirm the server has successfully received and applied the Settings Configuration message

OR
Conversation Textobject

Conversation Text facilitates real-time communication by relaying spoken statements from both the user and the assistant

OR
User Started Speakingobject

User Started Speaking notifies the client that the user has begun speaking

OR
Agent Thinkingobject

Agent Thinking informs the client when the agent is processing information

OR
Function Call Requestobject

Request to call a function by sending a Function Call Request message

OR
Function Callingobject

Provides insights into function call workflows to assist in debugging

OR
Agent Started Speakingobject

Get notified when the server begins streaming an agent’s audio response for playback

OR
Agent Audio Doneobject

Get signals that the server has finished sending the final audio segment to the client

OR
Agent Error Responseobject

Receive an error message from the server when an error occurs

Built with