@@ -98,6 +98,17 @@ async def my_agent(ctx: JobContext):
9898 # llm=openai.realtime.RealtimeModel(voice="marin")
9999 # )
100100
101+ # # Add a virtual avatar to the session, if desired
102+ # # For other providers, see https://docs.livekit.io/agents/models/avatar/
103+ # avatar = anam.AvatarSession(
104+ # persona_config=anam.PersonaConfig(
105+ # name="...",
106+ # avatarId="...", # See https://docs.livekit.io/agents/models/avatar/plugins/anam
107+ # ),
108+ # )
109+ # # Start the avatar and wait for it to join (after session.start)
110+ # await avatar.start(session, room=ctx.room)
111+
101112 # Start the session, which initializes the voice pipeline and warms up the models
102113 await session .start (
103114 agent = Assistant (),
@@ -111,20 +122,6 @@ async def my_agent(ctx: JobContext):
111122 ),
112123 )
113124
114- # # Add a virtual avatar to the session, if desired
115- # # For other providers, see https://docs.livekit.io/agents/models/avatar/
116- # # 1. Install livekit-plugins-anam
117- # # 2. Set ANAM_API_KEY in .env.local
118- # # 3. Add `from livekit.plugins import anam` to the top of this file
119- # # Note: Anam requires session.start() to run first so it can attach to the active audio stream
120- # avatar = anam.AvatarSession(
121- # persona_config=anam.PersonaConfig(
122- # name="...", # Persona name
123- # avatarId="...", # See https://docs.livekit.io/agents/models/avatar/plugins/anam
124- # ),
125- # )
126- # await avatar.start(session, room=ctx.room)
127-
128125 # Join the room and connect to the user
129126 await ctx .connect ()
130127
0 commit comments