https://retellai.com/?utm_source=discord&utm_medium=seo logo
my voice agent switches accents in the middle
# ❓・ai-evy-support
v
@AI Evy my voice agent switches accents in the middle. how to avoid that
a
Thanks for tagging me @Vyyy. I'll look through relevant sources and get back to you shortly.
### Answer \To prevent your voice agent from switching accents mid-call, you can configure the
voice_temperature
parameter, which controls voice stability. [(1) ]() [(2) ]() Lower values make the voice more stable and consistent, while higher values introduce more variation in speech generation. The value ranges from 0 to 2, with a default of 1. To reduce accent switching, set
voice_temperature
to a lower value (closer to 0) :
Copy code
javascript
const agentResponse = await client.agent.update('your_agent_id', {
  voice_temperature: 0.5
}) ;
[(1) ]() Additionally, ensure you've selected an appropriate
voice_id
and
voice_model
for your use case, as different TTS providers and models have varying levels of consistency. [(1) ]() [(2) ]() You can also configure
fallback_voice_ids
to maintain consistency even during TTS provider outages.
​ To learn more, see the sources I considered: [[1] Update Voice Agent](https://docs.retellai.com/api-references/update-agent) [[2] Create Voice Agent](https://docs.retellai.com/api-references/create-agent) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.