Discussions

Ask a Question
Back to All

Real-Time Text Streaming Integration

Hi Team HeyGen,

We are working on a project where we want to integrate real-time text streaming (from GPT-4o or similar LLMs) with a HeyGen interactive avatar using the avatar.speak() method (Node SDK). While the documentation suggests this is possible, we’ve hit roadblocks getting the avatar to speak words in a natural sequence when feeding streaming text deltas.

Currently, we feed the final_content to avatar.speak() but this causes long latency.

Goal: Stream text chunks from an LLM API (e.g., GPT-4o) directly into avatar.speak() for real-time conversational responses.

How could we integrate real-time text streams (e.g., GPT-4o) with HeyGen avatars?
Perhaps, text-buffer function (to feed stream output sentence-by-sentence) would be a potential workaround?

Thank you!