From b3fedff7cae891680f91e056f2731a5468c17bd8 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Wed, 29 Apr 2026 21:16:10 -0700 Subject: [PATCH 1/3] Add anam virtual avatar example comment --- src/main.ts | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/main.ts b/src/main.ts index 11ffdbc..fe6c0bb 100644 --- a/src/main.ts +++ b/src/main.ts @@ -73,6 +73,20 @@ export default defineAgent({ }, }); + // // Add a virtual avatar to the session, if desired + // // For other providers, see https://docs.livekit.io/agents/models/avatar/ + // // 1. Install '@livekit/agents-plugin-anam' + // // 2. Set ANAM_API_KEY in .env.local + // // 3. Add `import * as anam from '@livekit/agents-plugin-anam'` to the top of this file + // // Note: Anam requires session.start() to run first so it can attach to the active audio stream + // const avatar = new anam.AvatarSession({ + // personaConfig: { + // name: '...', // Persona name + // avatarId: '...', // See https://docs.livekit.io/agents/models/avatar/plugins/anam + // }, + // }); + // await avatar.start(session, ctx.room); + // Join the room and connect to the user await ctx.connect(); From e78437576d4cb6edfaf62cb33baf92717f8a2778 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Wed, 29 Apr 2026 21:39:14 -0700 Subject: [PATCH 2/3] Trim anam avatar comment to match original style --- src/main.ts | 25 +++++++++++-------------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/src/main.ts b/src/main.ts index fe6c0bb..0b9a208 100644 --- a/src/main.ts +++ b/src/main.ts @@ -62,6 +62,17 @@ export default defineAgent({ // llm: new openai.realtime.RealtimeModel({ voice: 'marin' }), // }); + // // Add a virtual avatar to the session, if desired + // // For other providers, see https://docs.livekit.io/agents/models/avatar/ + // const avatar = new anam.AvatarSession({ + // personaConfig: { + // name: '...', + // avatarId: '...', // See https://docs.livekit.io/agents/models/avatar/plugins/anam + // }, + // }); + // // Start the avatar and wait for it to join (after session.start) + // await avatar.start(session, ctx.room); + // Start the session, which initializes the voice pipeline and warms up the models await session.start({ agent: new Agent(), @@ -73,20 +84,6 @@ export default defineAgent({ }, }); - // // Add a virtual avatar to the session, if desired - // // For other providers, see https://docs.livekit.io/agents/models/avatar/ - // // 1. Install '@livekit/agents-plugin-anam' - // // 2. Set ANAM_API_KEY in .env.local - // // 3. Add `import * as anam from '@livekit/agents-plugin-anam'` to the top of this file - // // Note: Anam requires session.start() to run first so it can attach to the active audio stream - // const avatar = new anam.AvatarSession({ - // personaConfig: { - // name: '...', // Persona name - // avatarId: '...', // See https://docs.livekit.io/agents/models/avatar/plugins/anam - // }, - // }); - // await avatar.start(session, ctx.room); - // Join the room and connect to the user await ctx.connect(); From f7e098c41acfdda52d76c5887158d12ba4536742 Mon Sep 17 00:00:00 2001 From: Ben Cherry Date: Wed, 29 Apr 2026 22:02:02 -0700 Subject: [PATCH 3/3] Move anam avatar comment to after session.start --- src/main.ts | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/src/main.ts b/src/main.ts index 0b9a208..407db5e 100644 --- a/src/main.ts +++ b/src/main.ts @@ -62,17 +62,6 @@ export default defineAgent({ // llm: new openai.realtime.RealtimeModel({ voice: 'marin' }), // }); - // // Add a virtual avatar to the session, if desired - // // For other providers, see https://docs.livekit.io/agents/models/avatar/ - // const avatar = new anam.AvatarSession({ - // personaConfig: { - // name: '...', - // avatarId: '...', // See https://docs.livekit.io/agents/models/avatar/plugins/anam - // }, - // }); - // // Start the avatar and wait for it to join (after session.start) - // await avatar.start(session, ctx.room); - // Start the session, which initializes the voice pipeline and warms up the models await session.start({ agent: new Agent(), @@ -84,6 +73,17 @@ export default defineAgent({ }, }); + // // Add a virtual avatar to the session, if desired + // // For other providers, see https://docs.livekit.io/agents/models/avatar/ + // const avatar = new anam.AvatarSession({ + // personaConfig: { + // name: '...', + // avatarId: '...', // See https://docs.livekit.io/agents/models/avatar/plugins/anam + // }, + // }); + // // Start the avatar and wait for it to join + // await avatar.start(session, ctx.room); + // Join the room and connect to the user await ctx.connect();