Getting an "end" message for model output when on ...
# support
a
I want to use model output as text to show what's being said instead of transcript as it's much faster. The problem is that it's hard to catch the end state of the model output. How should I proceed with this?
v
@armandas To capture the end state of the model output effectively, you might consider implementing a mechanism that detects when the model has stopped speaking or when there's a significant pause indicating the end of a statement. This could be done by analyzing the audio stream for periods of silence or by using a signal from the model itself if it provides such a feature. If you're looking to integrate this functionality into VAPI, you could explore the possibility of adding an event or callback that triggers when the model finishes speaking. This would require access to the model's internal state or output processing, which may not be directly exposed by the API. If VAPI currently doesn't support this feature, you could provide feedback or a feature request to the development team to consider implementing an end-of-speech detection mechanism. For now, if you need further assistance with the specifics of implementing this feature or if you have any other questions, please let me know, and I'll be happy to help!
You can continue this conversation by mentioning me in the message.
@armandas Sweet. Have a great day!
@Vapi Sweet. Have a great day!
a
Hey @Shubham Bajaj thanks for replying! Where should I set the field? I can't find it on API reference
btw, I'm using react-native package, might be missing from there
s
You have to update this at your assistant level. Here's the CURL request on how to enable to it for your assistant.
Copy code
curl -X POST https://api.vapi.ai/assistant \
     -H "Authorization: Bearer your-token-here" \
     -H "Content-Type: application/json" \
     -d '{
  "modelOutputInMessagesEnabled": true
}'
a
i found it on the dashboard in the client/server message types that are sent with the request, is that the same thing?
s
As of know no there is no way to get these as either client or server events.
a
thanks for the response 🙏
8 Views