← Blog

I Built an AI Spanish Tutor in Second Life — and She Actually Speaks

Sophia AI NPC bot speaking in Second Life with green voice bars above her avatar
Contents

Note: This post was partly written with the help of Claude Code (AI). The build, the green bars moment, the opinions — those are mine.


There’s a moment every hacker lives for: the moment the thing you’ve been wiring together for 48 hours actually works.

Mine happened in Second Life, on a parcel at Virtlantis — a virtual language learning community generously donated by Kip Yellowjacket. I was standing in front of a Second Life NPC named Sophia, and I watched green voice bars float above her head as she spoke back to me in Spanish.

I built that. With Claude Code, open-source software, and a weekend.

The Idea: An AI Language Tutor Who Lives in Second Life

Second Life has always had something special for language learners: immersion. You can walk into a virtual café in a Spanish-speaking sim, sit down, and have a conversation. But unless another human is online — with patience, availability, and no other commitments — you’re talking to nobody.

What if the NPC behind the counter could actually talk back?

Not scripted responses. Not a decision tree. A real AI brain — the kind that understands context, corrects your grammar, stays in character, and keeps the conversation flowing.

That was the idea. One weekend to see if I could pull it off.

The Stack: Claude Code Meets Open Source

The build had three major pieces:

1. The Second Life Bot Sophia is a scripted avatar running as a bot — always online, always present on the parcel. She’s driven by LSL scripts and an external controller that manages her state, her animations, and her voice.

2. The AI Brain Rather than hardcoding a single LLM, I wired Sophia up to OpenRouter, which lets her connect to dozens of different models. For Spanish tutoring conversations, I can run GPT-4o Mini for cost efficiency, or switch to a heavier model when I want richer, more nuanced responses. I also gave her the option to run a full Hermes agent locally — which means she can reason, plan, and use tools autonomously, not just respond.

3. Text-to-Speech in Second Life Voice This was the hard part. Second Life has a voice layer, but getting synthesized audio into it isn’t straightforward. I patched in a TTS pipeline using open-source speech synthesis — the same kind of approach I explored when building Agent Vibes — generating audio server-side and routing it through the virtual parcel’s audio stream so Sophia’s voice came out of her avatar, complete with spatial positioning. Stand closer to her and she gets louder. Walk away and she fades.

When those green bars appeared above her head — Second Life’s visual indicator that a voice is transmitting — I genuinely stopped and just stared.

Want AI bots for your Second Life sim?

I build voiced, scripted AI avatars for sims, events, and educational spaces — characters with real personalities, spatial awareness, and in-world behavior. If you're curious what this could look like in your space, get in touch.

Explore the SL AI service →
1-on-1 coaching with Paul

The Dashboard

Sophia doesn’t just sit there and wait. She comes with a web dashboard that gives me full control:

  • Login / logout — bring her online or take her offline on demand
  • Knowledge base — add items she should know about: vocabulary lists, grammar rules, topic-specific context, or anything about the sim she’s in
  • AI model selector — switch between OpenRouter models or Hermes depending on the session
  • Soul notecard — Sophia’s personality lives in a Second Life notecard. Hand her a new one in-world and her character, tone, and teaching style update immediately — no dashboard required

Want to drill irregular verbs? Load a verb pack into her knowledge base and set her to GPT-4o Mini. Want a fully autonomous tutor who can adapt her lesson plan mid-conversation? Switch to Hermes and let her run. Want to change who she is? Edit the notecard.

The Moment at Virtlantis

I tested her on a parcel at Virtlantis, a real Second Life community built around language learning. There’s something poetic about that — virtual real estate donated specifically because someone believed in the value of learning languages in virtual spaces.

My avatar walked up to Sophia. I typed a Spanish greeting. She responded — out loud, in voice, through the sim’s audio channel. The green bars hovered. She answered in Spanish, corrected a small error I’d made, and asked me a follow-up question.

I had a conversation. With an AI. In Second Life. In Spanish. With spatial audio.

That was the moment I knew this was worth building.

Watch It

Here’s the video — Sophia in action at Virtlantis, doing exactly what she was built to do:

What’s Next

This was a weekend proof-of-concept, and it already works well enough to have a real Spanish conversation. But there’s a lot more to explore:

  • Persistent memory — Sophia remembering where you left off last session
  • Adaptive difficulty — detecting your level and adjusting
  • Multiple personas — a café owner, a market vendor, a hotel receptionist, each with their own context
  • Other languages — French, Portuguese, Japanese — the pipeline is the same

Second Life is 20+ years old and there are still people building remarkable things inside it. Sometimes the best sandbox for an experiment isn’t the newest platform — it’s the one with the most depth.

Sophia is part of a broader project — if you want to see how the full SL AI bot platform works (including Lewis Starlight, who sings, codes LSL, and patrols sims), read I Gave Second Life Bots a Brain, a Voice, and a Soul.

Sophia’s still online at Virtlantis. Come say hola.


Comments

Loading comments…

Leave a comment

Want to work together?

If something here resonated, let's talk. I help teams build AI systems and automate workflows.