Settings
Voice Agent
The Settings message is a JSON command that serves as an initialization step, setting up both the behavior of the voice agent.
Purpose
Section titled “Purpose”The Settings message is an initialization command that establishes both the behavior of the voice agent and the audio transmission formats before voice data is exchanged. The client should send a Settings message immediately after opening the websocket and before sending any audio.
Example Payloads
Section titled “Example Payloads”This example uses a very basic Settings to establish a connection. To send the Settings message, you need to send the following JSON message to the server:
JSON
{
"type": "Settings",
"tags": ["demo", "voice_agent"],
"audio": {
"input": {
"encoding": "linear16",
"sample_rate": 24000
},
"output": {
"encoding": "linear16",
"sample_rate": 24000,
"container": "none"
}
},
"agent": {
"language": "en",
"listen": {
"provider": {
"type": "deepgram",
"model": "nova-3",
"smart_format": false
}
},
"think": {
"provider": {
"type": "open_ai",
"model": "gpt-4o-mini",
"temperature": 0.7
}
},
"speak": {
"provider": {
"type": "deepgram",
"version": "v2",
"model": "flux-kit-en"
}
}
}
}Upon receiving the Settings message, the server will process all remaining audio data and return the following SettingsApplied message.
JSON
{
"type": "SettingsApplied"
}Next Steps
Section titled “Next Steps”- Voice Agent Message Flow for the correct message flow when building a Voice Agent client.