https://retellai.com/?utm_source=discord&utm_medium=seo logo
How can i choose voice for my inbound agent, if I ...
# ❓・ai-evy-support
q
@AI Evy How can i choose voice for my inbound agent, if I use same agent for different customers and they all want different voices? is there api or anything else that I could update agent each time I use it?
a
Thanks for tagging me @Q4. I'll look through relevant sources and get back to you shortly.
### Answer Yes, you can update the voice for your agent dynamically via the API using the Update Voice Agent endpoint. [(1) ]() You would call the update endpoint with the
voice_id
parameter set to the desired voice for each customer before their call:
Copy code
javascript
import Retell from 'retell-sdk';
const client = new Retell({
  apiKey: 'YOUR_RETELL_API_KEY',
}) ;
const agentResponse = await client.agent.update('16b980523634a6dc504898cda492e939', { agent_name: 'Jarvis' }) ;
console.log(agentResponse.agent_id) ;
The
voice_id
parameter accepts the unique voice id for the agent. You can find the list of available voices and their previews in the Dashboard. Key parameters you can update per customer: -
voice_id
– Unique voice id used for the agent -
voice_model
– Select the voice model (e.g.,
eleven_turbo_v2
,
sonic-2
,
tts-1
, etc.) -
voice_speed
– Controls speed of voice (range 0.5–2) -
voice_temperature
– Controls voice stability (range 0–2, applies to 11labs voices) So your workflow would be: before each inbound call for a specific customer, call the update API to set their preferred
voice_id
, then the agent will use that voice for the call.
​ To learn more, see the sources I considered: [[1] Update Voice Agent](https://docs.retellai.com/api-references/update-agent) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.