firstMessage issue
# support
s
I've set firstMessage and firstMessageMode to assistant-speaks-first and when I initiate a call by vapi api using createCall api, it calls the customer and while ringing the assistant speaks after the customer answers the call, assistant does not speak anything. How to make the assistant speak after the user answers the call?
v
I understand you're having an issue with the assistant not speaking after the customer answers the call, despite having configured
firstMessage
and
firstMessageMode
correctly. Have you checked the
startSpeakingPlan.waitSeconds
parameter in your assistant configuration? This controls the delay before the assistant starts speaking (default is 0.4 seconds), and adjusting it might help ensure the assistant speaks immediately after the call is answered.
Copy code
javascript
const assistant = {
  firstMessageMode: 'assistant-speaks-first',
  startSpeakingPlan: {
    waitSeconds: 0.2 // Try a lower value
  }
  // other configurations
};
Source: - [Discord discussion about startSpeakingPlan.waitSeconds](https://discord.com/channels/1211482211119796234/1343915991670853654)
s
yeah i've tried them, same
c
To have your assistant speak only after the customer answers the call, you'll want to adjust the
firstMessageMode
setting. Changing it to
assistant-waits-for-user
could help ensure that the assistant's message is not played until the user answers and engages in the call. Additionally, you might want to use live call control to trigger the message if there's no response within a few seconds into the call. This can improve the interaction flow and ensure timely conversation. Let me know if you need help with implementing these settings.
s
assistant-waits-for-user works if the user speaks, I don't want it. I want only if the user answers the call, I mean accepts the call without speaking, then assistant should start speaking firstly
c
Hey, could you help me understand your problem? I am not understanding what exactly issue you are facing. If you could explain to me with an example, it will be really helpful for me to suggest you a solution aligned to your issue.
7 Views