incomprehensible conversations
# support
h
Hi, I hope you are well. I have an assistant with a script hook "Hi, is this {{customer.name}}?!" This assistant sometimes makes some incomprehensible conversations. For example, in this conversation, instead of the customer's name, it makes incomprehensible conversations. https://storage.vapi.ai/8aeec76d-b09e-4ddd-b703-396c586ccd41-1743458754805-ceb34fc6-b002-4525-960b-dd4e9c48b872-mono.wav I don't know why this happens. Please check it.
v
Hi there! 👋 I'm unable to listen to the specific audio file you've shared, but I can definitely help explain why your assistant might be having issues with the
{{customer.name}}
variable and producing incomprehensible conversations. ## Possible Causes for Your Issue Based on the information I've found, there are several potential reasons why your assistant is having trouble with the
{{customer.name}}
variable: ### 1. Variable Substitution Issues The most likely cause is that the
customer.name
variable isn't being properly passed or substituted. According to [Vapi documentation](https://docs.vapi.ai/assistants/dynamic-variables), dynamic variables like
{{customer.name}}
need to be properly defined and passed to work correctly. For SIP inbound calls,
customer.name
is extracted from the
From
SIP header. If this information is missing or malformed, the variable won't be substituted properly. ### 2. Customer Field Configuration The customer field, including the name, needs to be set when creating a call, not when creating an assistant. Here's how it should be configured:
Copy code
javascript
const call = await vapiClient.calls.create({
  phoneNumberId: "your-phone-number-id",
  customer: {
    number: "+1234567890", // Customer's phone number
    name: "John Doe",      // Customer name that will replace {{customer.name}}
    metadata: {}           // Optional metadata
  },
  assistant: {
    // Your assistant configuration
  }
});
### 3. Voice Distortion or Model Issues Sometimes incomprehensible conversations can result from voice distortion due to network issues or problems with the voice synthesis itself. High style property settings can also lead to AI hallucinations and instability, making the conversation difficult to understand. ## Troubleshooting Steps Here are some steps you can take to resolve this issue: 1. **Check your variable syntax**: Ensure you're using the correct syntax
{{customer.name}}
in your script hook.
2. **Verify customer data**: Make sure the customer name is being properly passed when creating the call. 3. **Check execution order**: Ensure that the customer data is set before the script hook tries to use it. 4. **Review logs**: Check the Vapi logs to see if there are any error messages related to variable substitution. 5. **Try a different approach**: Some users have found success using
{{name}}
instead of
{{customer.name}}
in their prompts. 6. **Check voice model settings**: If you're using 11labs voice models, try switching to "turbo" as some users have reported issues with the "11labs flash_model". Would you like me to provide more specific troubleshooting steps for any of these potential causes? Source: - [Vapi documentation](https://docs.vapi.ai/assistants/dynamic-variables)
k
Hey! To help track down this issue, could you share: - When exactly this happened (the timestamp) - What response you expected to get - What response you actually got instead This would really help us figure out what went wrong!
Hi, Hamid. I require your help in clearly defining them all so that I could understand what you mean by incomprehensible conversations.