simon84734
03/26/2025, 12:35 AMVapi Support Bot
03/26/2025, 12:37 AMsonic
and sonic-preview
models in your Vapi assistant. Here's how to set it up:
1. In your Vapi assistant configuration, you'll need to configure the Voice component (one of the three core components of a Vapi assistant alongside Transcriber and Model).
2. You can set up your assistant configuration like this:
javascript
const assistant = {
model: {
provider: "openai",
model: "gpt-3.5-turbo",
systemPrompt: "Your system prompt here",
},
voice: {
provider: "cartesia",
voiceId: "sonic", // or "sonic-preview"
},
firstMessage: "Hi, how can I assist you today?",
};
3. For additional customization, Cartesia voices support experimental controls. According to the [documentation](https://docs.vapi.ai/changelog/2025/2/25), you can specify voice speed and emotional range with:
javascript
voice: {
provider: "cartesia",
voiceId: "sonic",
experimentalControls: {
speed: "fast", // or other speed settings
emotionalRange: ["happy", "excited"] // example emotional ranges
}
}
You can configure your assistant either through the Vapi dashboard or by using the API with a PATCH request to update your assistant configuration.
Is there anything specific about the Cartesia voice models you'd like to know more about?
Sources:
- [https://docs.vapi.ai/changelog/2024/12/30](https://docs.vapi.ai/changelog/2024/12/30)
- [https://docs.vapi.ai/assistants](https://docs.vapi.ai/assistants)
- [https://docs.vapi.ai/examples/voice-widget](https://docs.vapi.ai/examples/voice-widget)
- [https://docs.vapi.ai/changelog/2025/2/25](https://docs.vapi.ai/changelog/2025/2/25)Shubham Bajaj
03/26/2025, 11:46 PMjavascript
// Assistant configuration
{
// Other assistant config...
keypadInputPlan: {
enabled: true,
timeoutSeconds: 0, // Process each key press immediately
delimiters: [] // No delimiters needed for single key detection
}
}
Step 2: Add a transferCall Tool to Your Assistant
Add a transferCall
tool to your assistant that includes the external voicemail number as a destination:
javascript
// Assistant configuration with transferCall tool
{
// Other assistant config...
model: {
// Other model config...
tools: [
{
type: "transferCall",
destinations: [
{
type: "number",
number: "+1234567890", // Replace with your voicemail number
message: "Transferring you to voicemail now..."
}
]
}
]
}
}
Step 3: Add Logic to Handle DTMF "0" Input
In your assistant's prompt/system message, include instructions to transfer the call when "0" is pressed:
System: You are a helpful voice assistant. When a user presses 0 on their keypad, immediately transfer the call to voicemail.
If you detect that a user has pressed the 0 key (which will appear in the conversation as "User's Keypad Entry: 0"), use the transferCall tool to transfer them to the voicemail number without asking for confirmation.
Step 4: Testing Your Implementation
Once configured, test your setup by calling your Vapi number and pressing "0" during the conversation. The assistant should detect the keypress and automatically transfer the call to your configured voicemail number.simon84734
03/29/2025, 1:01 AMPraveen Nair
03/30/2025, 11:03 AMPraveen Nair
03/30/2025, 11:04 AM