Discussions
Streaming Avatar Flutter
4 days ago by null
I have an app which will use streaming avatar from heygen to start chat with avatar by text messages .
I have such a flow for now
- Create token
- Create session using this end point /v1/streaming.new and this request sample
{
"avatar_name": "Bryan_FitnessCoach_public",
"voice": {
"id": "1985984feded457b9d013b4f6551ac94",
"emotion": "Friendly",
"rate": 1.0
},
"quality": "medium",
"video_encoding": "H264",
"version": "v2"
}
and getting such a response
{
"code": 100,
"data": {
"session_id": "2bdef448-c90a-11ef-8158-baf75b83e28b",
"sdp": null,
"access_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJleHAiOjE3MzU5MDk1MDAsImlzcyI6IkFQSUplMjZaamg4YUFYRCIsIm5iZiI6MTczNTgyMzEwMCwic3ViIjoiY2xpZW50IiwidmlkZW8iOnsiY2FuUHVibGlzaCI6dHJ1ZSwiY2FuUHVibGlzaERhdGEiOnRydWUsImNhblN1YnNjcmliZSI6dHJ1ZSwiY2FuVXBkYXRlT3duTWV0YWRhdGEiOmZhbHNlLCJyb29tIjoiMmJkZWY0NDgtYzkwYS0xMWVmLTgxNTgtYmFmNzViODNlMjhiIiwicm9vbUpvaW4iOnRydWV9fQ.ARk2m3wS5WfuajD_dqyXh3u9tQb7Os7RiawKQfPdXcI",
"url": "wss://heygen-feapbkvq.livekit.cloud",
"ice_servers": null,
"ice_servers2": null,
"is_paid": true,
"session_duration_limit": 2147483647,
"realtime_endpoint": "wss://webrtc-signaling.heygen.io/v2-alpha/interactive-avatar/session/2bdef448-c90a-11ef-8158-baf75b83e28b"
},
"message": "success"
}
So, to show the streaming avatar in my app i will use live kit client and web socket to handle live streaming .
When i tried to connect to room with session id and access token then i got room does not exist .
What is the problem in my flow and how i can fix it ?