https://retellai.com/?utm_source=discord&utm_medium=seo logo
is there a way ti know which lenguage an agent swi...
# ❓・ai-evy-support
k
@AI Evy is there a way ti know which lenguage an agent switched to, un a Payload webhook?
a
Thanks for tagging me @K Rudy. I'll look through relevant sources and get back to you shortly.
### Answer Based on the available sources, I don't see a specific field in the webhook payload that directly indicates which language the agent switched to during a call. The webhook payload includes the call object with fields like
transcript
,
transcript_object
, and
transcript_with_tool_calls
, but there's no explicit language field documented in the webhook response structure. [(1) ]() Potential workarounds: 1. **Post-call analysis**: You could configure custom post-call analysis to extract the detected language from the transcript. 2. **Custom function call**: You could have your agent call a custom function when it detects a language switch, passing the language as a parameter to your backend. 3. **Transcript analysis**: Parse the
transcript
or
transcript_object
from the
call_ended
or
call_analyzed
webhook to detect language patterns. If you need this as a native feature, I'd recommend reaching out to Retell support or checking their latest API documentation for any recent additions. Check out these potentially useful sources: - [Webhook Overview]() - [Dynamic Variables]() Would you like me to try providing a general answer on how you might implement language detection through custom functions?
​ To learn more, see the sources I considered: [[1] Webhook Overview](https://docs.retellai.com/features/webhook-overview) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.
k
@AI Evy when a “switch” to another languages happens on a multilingual agent, does that get registered in an event?
a
Thanks for the follow-up, @K Rudy. I'll get back to you soon.
### Answer Based on the available sources, I don't have specific documentation about whether a language switch event is registered when a multilingual agent changes languages during a call. The changelog documentation I have access to covers API changes, SDK updates, and features like function calling and transcription, but doesn't detail multilingual agent behavior or language-switch event logging. [(1) ]() Suggested next steps: Check out these potentially useful sources: - [Documentation]() - [Hire certified Retell partner]() Would you like me to try providing a general answer based on my broader knowledge of how such events might typically be handled?
​ To learn more, see the sources I considered: [[1] Platform Changelogs | Retell AI](https://www.retellai.com/changelog) ​
Feel free to tag @AI Evy with additional questions. I also appreciate feedback, it helps me improve.