Himanshu Bansal
11/03/2025, 7:05 AMChiranjeet Mishra
11/03/2025, 7:05 AMHimanshu Bansal
11/03/2025, 7:20 AMChiranjeet Mishra
11/03/2025, 8:45 PMtypescript
// English assistant
await client.assistants.create({
name: "EN Support",
hooks: [{ on: "customer.speech.timeout", options: { timeoutSeconds: 10 }, do: [{ type: "say", exact: [ "Are you still there?", "Can I help you with anything else?" ] }] }]
});
// Spanish assistant
await client.assistants.create({
name: "ES Support",
hooks: [{ on: "customer.speech.timeout", options: { timeoutSeconds: 10 }, do: [{ type: "say", exact: [ "¿Sigues ahí?", "¿Puedo ayudarte con algo más?" ] }] }]
});
2. **Dynamic configuration**: Use model-generated responses that adjust based on the language detected via the say.prompt option:
typescript
await client.assistants.create({
name: "Multi Support",
hooks: [{
on: "customer.speech.timeout",
options: { timeoutSeconds: 10 },
do: [{ type: "say", prompt: "Based on the above conversation in {{transcript}} ask the user in the language of the conversation if they need help or if not you will be ending the call. If no conversation is provided, default to English." }]
}]
});
For additional customization, you can explore the [Idle messages configuration guide](https://docs.vapi.ai/assistants/idle-messages).