Discussions
Can I stream OpenAI's text responses directly to Heygen's avatar without accumulating the text?
28 days ago by Lucas Godtfredsen de Souza
Hi There!
Can I stream OpenAI's text responses directly to Heygen's avatar without accumulating the text?
Right now, I have to accumulate the text before sending it to avatar.current.speak(), otherwise, the avatar doesn't speak properly. Ideally, I would like to stream text to the avatar as it is generated by OpenAI. Is there a way to achieve this?
I also tried connecting via WebSocket to the session, but from what I observed, it seems that only audio can be sent through the Realtime API. Is that correct? Is there any way to send text directly via WebSocket for the avatar to speak in real-time?