This message was deleted.
# ask-ai
s
This message was deleted.
t
Thanks for reaching out, Ali. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
It looks like there's a little hiccup with the LiveKit URL configuration. No worries, let's work through it together! Here are some steps that might help: 1. First, please double-check that your
LIVEKIT_URL
environment variable is set correctly. It should look something like this:
wss://your-subdomain.livekit.cloud
. 2. Next, make sure your
LIVEKIT_API_KEY
and
LIVEKIT_API_SECRET
are also properly set as environment variables. 3. Take a moment to verify your deployment environment is passing these variables correctly. For example, if you're using Docker, you can use
--env-file
, or if it's Kubernetes, ensure your ConfigMap or Secret is properly mounted. 4. It’s also a good idea to test the URL format and check network connectivity. Tools like
curl
can help confirm you can reach your LiveKit Cloud subdomain on port 443. If things still aren’t working as expected, feel free to share a bit more info with me: • The exact
LIVEKIT_URL
you’re using (just remember to mask any sensitive details). • Your deployment environment (like Docker, Kubernetes, or something else). • Whether you’re able to access your LiveKit Cloud dashboard without issues. With this info, I’ll be better equipped to help you get this sorted out smoothly. You’re doing great—let’s get this fixed together! Sources: .env.example | examples/avatar_agents/bey/README.md | frontend/lib/server-utils.ts | Configuring firewalls | LiveKit docs | regionurlprovider.go
Thanks so much for confirming that! To help us get to the bottom of this together, could you please share a few more details? • The exact
LIVEKIT_URL
you’re using (feel free to mask any sensitive info). • How you’ve set up the environment variables for Beyond Presence, like
LIVEKIT_API_KEY
,
LIVEKIT_API_SECRET
, and
LIVEKIT_URL
. • Any other logs or error messages you might have, beyond what you’ve shared already. With this info, we’ll be in a great spot to figure out what’s going on with Beyond Presence on LiveKit Cloud. Looking forward to your reply!
It looks like the error is due to the
LIVEKIT_URL
being formatted a bit differently than expected. It should actually use the WebSocket protocol (
wss://
) instead of
https://
. For example:
LIVEKIT_URL=wss://masked-masked.livekit.cloud
You're on the right track having these environment variables in your
.env
file! Just make sure they’re properly loaded into your application when it runs. If you’re using Python, the
python-dotenv
library is a great way to do this:
Copy code
from dotenv import load_dotenv
import os

load_dotenv()

LIVEKIT_URL = os.getenv("LIVEKIT_URL")
LIVEKIT_API_KEY = os.getenv("LIVEKIT_API_KEY")
LIVEKIT_API_SECRET = os.getenv("LIVEKIT_API_SECRET")
Also, double-check that your
.env
file includes:
Copy code
LIVEKIT_URL=wss://masked-masked.livekit.cloud
LIVEKIT_API_KEY=your-api-key
LIVEKIT_API_SECRET=your-api-secret
Once you’ve updated these, just restart your application so it picks up the new settings. If you run into any more questions or need a hand with anything else, I’m here to help!
Thank you so much for confirming that! To get to the bottom of this together, could you please share a bit more information? • What runtime environment are you working with? For example, are you using Docker, a local server, cloud hosting, or something else? • How are you loading the
.env
file into your application? Are you perhaps using a library like
dotenv
in Python? • Do you have any additional logs or debugging output that might show whether the environment variables are being loaded correctly when your app runs? With these details, we’ll be in a much better position to understand why the error is still showing up, even though your
.env
file seems set up correctly. Looking forward to your reply!
I'm sorry to hear that the avatar isn't showing up even though the audio is working. Let's work through this together step-by-step to get things back on track: 1. Verify the Avatar Session: Could you please check your logs to see if the
POST /v1/session
API call to start the avatar session was successful? Look out for any errors or retries related to this call. 2. Inspect Room State: Using the LiveKit CLI or dashboard, let's confirm that the
bey-avatar-agent
participant is present in the room and has both audio and video tracks published. 3. Check Agent Configuration: It’s important to make sure the agent's audio output is set up to send TTS audio via a WebRTC data channel to the avatar, including a synchronization reference to the video track. 4. Review Client Code: Please double-check that your client application is subscribing to the video track of the
bey-avatar-agent
participant and rendering it properly. The participant identity should match the one configured in your backend. If you’d like, feel free to share the following details so I can assist you better: • Logs showing the
POST /v1/session
call and any related errors. • Information about the room's participants and tracks (for example, from the LiveKit CLI). • How your client application is set up to subscribe to and render the avatar's video track. I'm here to help, so don’t hesitate to reach out with any questions or updates! Sources: Beyond Presence virtual avatar integration guide | LiveKit Docs | Bringing AI avatars to voice agents | plugins/bey/src/avatar.ts | examples/avatar_agents/README.md
It’s great that the avatar works well locally! Since it’s having trouble on LiveKit Cloud, it’s likely something related to the differences in the deployment environment. Let’s walk through a few key areas together to help pinpoint the issue: 1. Environment Variables: Could you please double-check that the
LIVEKIT_URL
,
LIVEKIT_API_KEY
, and
LIVEKIT_API_SECRET
are correctly set for your cloud environment? It’s important they match your LiveKit Cloud configuration exactly. 2. Network Access: Make sure your cloud deployment can reach the LiveKit Cloud endpoints. Specifically, check that outbound traffic to
*.livekit.cloud
on port 443 is allowed. 3. API Calls: It might help to look at the logs for the
POST /v1/session
API call in your cloud environment. Confirming that it completes successfully without errors can give us valuable clues. 4. Room State: Using the LiveKit dashboard or CLI, take a peek at the room on LiveKit Cloud. Check that the
bey-avatar-agent
participant is there and has both audio and video tracks published. 5. Client Configuration: Lastly, ensure your client application is connecting to the correct LiveKit Cloud room and is properly subscribing to the avatar’s video track. Since everything works locally, it’s very likely an environment or cloud-specific setting that needs a bit of tweaking. Please feel free to reach out if you’d like me to help you verify any of these steps—I’m here to support you!
Thank you for sharing the message
[Avatar] Not rendering - isVisible: false avatarTrack: null
. This usually means that the client application isn’t receiving or subscribing to the avatar’s video track. Don’t worry, I’m here to help you work through this! Here are some steps we can try together: 1. Verify Video Track Publishing: It’s a good idea to check the LiveKit dashboard or CLI to see if the
bey-avatar-agent
participant is actually publishing a video track in the room. If you don’t see a video track published, the issue might be with the avatar worker or how the session is set up. 2. Check Client Subscription: Next, let’s make sure the client application is correctly subscribing to that video track from
bey-avatar-agent
. Double-check that the participant identity matches what you have configured in your backend. 3. Debug Client Code: Adding some logging in your client app can really help here. Try logging all subscribed tracks and their types to see if the video track is received but just not rendering. 4. Frontend Rendering Logic: Lastly, take a look at the frontend rendering logic. The
isVisible
flag should switch to
true
when the video track is available, so make sure that’s working as expected. If you’d like, I’m more than happy to walk you through any of these steps or provide extra debugging tips. Just let me know!
Thanks for sharing the logs! It looks like the client application is recognizing the avatar participant (
agent-AJ_DTPC8fzZefHm
), but it’s not finding a video track to display. Let’s work through this together with a few steps that might help resolve the issue: 1. Verify Video Track Publishing: Could you please check the LiveKit dashboard or CLI to see if the participant
agent-AJ_DTPC8fzZefHm
is actually publishing a video track? If there’s no video track, the issue might be with the avatar worker or how the session is set up. 2. Inspect Backend Configuration: Let’s make sure the avatar session is set up to generate and publish a video track. Double-check that the
POST /v1/session
API call includes the right parameters for video generation. 3. Debug Client Subscription: It could be helpful to add some logging in your client app to list all tracks for
agent-AJ_DTPC8fzZefHm
. This way, we can see if a video track is coming through but maybe not rendering properly. 4. Frontend Rendering Logic: Take a look at how
isVisible
and
avatarTrack
are being set. Ensuring these update correctly when a video track becomes available can make a big difference. Please feel free to reach out if you’d like me to walk you through any of these steps or if you need more tips on debugging. I’m here to help!