Home / Guides / AI NPCs that talk

How to make AI NPCs that talk in your game

Short answer: to try a talking NPC today for free, use Convai's plugin in Unity or Unreal, or build a small DIY version: send the player's line to a language model, then read the reply out loud with text to speech. Prototyping is free. Shipping to real players almost always costs money, because every conversation is a paid API call. Every plan limit and license below comes from each company's own site, checked Oct 23, 2026. We only cover free plans, plus the first paid step where it matters.

The 30 second version

Talking NPC tools compared

Free plans first, from each tool's official pricing page or docs, checked Oct 23, 2026.

ToolFree planEngines (official)Ship a game with it free?
Convai100 interactions a month (50 with flagship LLMs), 1 concurrent session, 1 monthly active end user, no ElevenLabs voices, no long term memory.Unity SDK, Unreal Engine 5 plugin, Web SDKNo, 1 monthly active end user. Indie Dev is $29/mo for 3,000 interactions and 75 users.
Inworld AI (On-Demand)$0 to start, pay as you go. Up to 70 minutes of TTS or 400 minutes of speech to text free, 5 concurrent requests, voice cloning and design, access to 100+ LLMs.APIs (Realtime over WebSocket or WebRTC), TTS SDKs for Node.js and Python. Engine SDKs unverified, see below.Commercial license is included on On-Demand. Usage after the free allowance is paid.
Charisma.ai (Pro)No free plan listed. Pay as you go at $5 per 50,000 credits, about 200 experience minutes per Charisma.Unity and Unreal Plug 'n' Play SDKs, JavaScript and Python SDKsNo free tier to ship on
ElevenLabs (voice only)10,000 credits a month. Text to speech uses about 1 credit per character.API, works with any engine through your serverNo, the commercial license starts on Starter at $6/mo
Ollama + Piper (local)Free and open source, runs on your own computer.Any engine that can make HTTP requestsFree, but each model and voice has its own license, and players would need to run it too
Godot built-in TTSFree, uses the player's system voices.GodotYes, it is part of the engine. Voice quality depends on the player's computer.

Step 1: design the NPC before you pick a tool

A talking NPC is three parts in a loop: something to hear the player (typed text or speech to text), a language model that writes the reply in character, and text to speech that says it. Before you touch any tool, write a short character sheet:

Start with one NPC with one job. A shopkeeper who can chat but always ends with your scripted sell menu is a great first project.

Option A: Convai (fastest in Unity and Unreal)

Convai's pricing page (checked Oct 23, 2026) lists a Free plan "to test out the platform": 100 interactions a month, 60 minutes of cloud rendered Avatar Studio and Convai Sim, 1 character session at a time and 1 monthly active end user. Only 50 of those interactions can use its flagship LLMs, and high quality third party voices such as ElevenLabs are not included. Convai counts one interaction every time a player sends input and the character responds, and unused interactions do not roll over. The free plan still includes Convai's character creation tools and its server based character animation.

The catch for shipping: 1 monthly active end user means only you. Indie Dev is $29/mo ($22/mo billed yearly) with 3,000 interactions and 75 monthly active end users, and adds long term memory. Professional is $99/mo with 10,000 interactions and 250 users.

Engine setup

Before you build a player version, read Convai's Ship a secure build page. It explains Auth Token mode, which keeps your account API key out of the build. In API Key mode the key is included in the build as usual, and Convai itself warns that any key shipped inside a client build is ultimately extractable.

Option B: Inworld AI (voice APIs with a commercial free tier)

Inworld changed a lot. Its Character Studio deprecation page (checked Oct 23, 2026) says the legacy Character Studio has been retired, and that you now build characters with its Agent Runtime and character templates for Unity, Unreal and Node.js. When we checked, the Unity and Unreal Runtime doc pages it links to redirected to the Inworld Portal instead of loading, and Inworld's Node.js Runtime template repos on GitHub are archived. So we treat Inworld's engine SDKs as unverified today. What is clearly live is its API platform: text to speech, speech to text, a Realtime voice API over WebSocket or WebRTC, and LLM access through one API.

Inworld's pricing page (checked Oct 23, 2026) lists On-Demand at $0, pay as you go, "for evaluation and prototyping", with up to 70 minutes of TTS included (its FAQ says up to 70 minutes of TTS or 400 minutes of speech to text for free), 100 custom voices, voice cloning and design, 100+ LLM models and a commercial license. On-Demand allows 5 concurrent requests. After the free allowance, TTS-2 is $25 per million characters and TTS-2 Flash is $15 per million on On-Demand. Creator is $25/mo with $25 in credits a month. Inworld's voice is also on StarterLoot as Inworld TTS.

Inworld's docs are a good fit for the DIY approach below. Its security best practices show two safe patterns: proxy every call through your own backend, or have your backend mint short lived one-time tokens so the client can stream directly.

Option C: Charisma.ai (story first)

Charisma is built around writing. You lay out the story beats in its editor and use generative AI dialogue inside them. Charisma's pricing page (checked Oct 23, 2026) shows no free plan. Pro is pay as you go at $5 per 50,000 credits, which Charisma says is about 200 experience minutes, and includes speech to text, an AI voice library, custom AI voices and generative AI dialogue. Charisma's docs say new accounts start by getting in touch, and that its Plug 'n' Play SDKs for Unity and Unreal get a project running in engine. Charisma's GitHub also has SDKs for JavaScript and Python. We found no Godot SDK.

Option D: DIY, a language model plus text to speech

This is the most flexible path and the only one that works the same in every engine, including Godot. The loop is simple:

  1. The player types a line, or speaks and you turn it into text.
  2. Your game sends the line, plus the character sheet and the last few messages, to your own small server.
  3. Your server calls a language model and gets a short reply in character.
  4. Your server (or the game) turns the reply into audio with text to speech, and the NPC says it.

Free ways to get the language model

Free ways to get the voice

Making the call from your engine

A tiny Godot example that asks a local Ollama for a reply while you prototype (the model name is whatever you pulled with Ollama):

# Child node: HTTPRequest
func _ready() -> void:
    $HTTPRequest.request_completed.connect(_on_request_completed)

func ask_npc(player_line: String) -> void:
    var body = JSON.stringify({
        "model": "your-model",
        "stream": false,
        "messages": [
            {"role": "system", "content": "You are Mira, a grumpy blacksmith in Oakvale. Reply in one or two short sentences. Never mention the real world."},
            {"role": "user", "content": player_line}
        ]
    })
    $HTTPRequest.request("http://localhost:11434/api/chat", ["Content-Type: application/json"], HTTPClient.METHOD_POST, body)

func _on_request_completed(result, code, headers, body):
    var reply = JSON.parse_string(body.get_string_from_utf8())["message"]["content"]
    $Label.text = reply
    var voices = DisplayServer.tts_get_voices_for_language("en")
    if voices.size() > 0:
        DisplayServer.tts_speak(reply, voices[0])

This is a local prototype only. For a game other people play, point the request at your own server, not at a paid API with a key inside the game.

Costs and API keys: the two ways beginners get burned

Latency: hiding the wait

Speech to text, the language model and text to speech each add waiting time, and the player feels all of it. What helps:

Guardrails and moderation

Players will try to make your NPC say awful things. Plan for it:

  1. A strict system prompt: who the NPC is, what it knows, what topics it must refuse, and a reply length limit.
  2. A moderation check: run the player's line and the NPC's reply through a filter before showing it. OpenAI's moderation docs (checked Oct 23, 2026) say its moderation endpoint is free to use and classifies text for categories like harassment, hate, self-harm, sexual content and violence. It needs an OpenAI API key, so call it from your server.
  3. A scripted fallback: if anything is flagged, the NPC says a safe in-character line, such as "I would rather not talk about that, traveler."
  4. Logs: keep a log of flagged conversations so you can tighten the prompt.

On Steam this is required, not optional. Steam's Content Survey says Live-Generated AI content must follow the same rules as everything else, and you must tell Valve what guardrails you use to ensure it is not generating illegal content. Valve also says it will not ship Live-Generated AI Adult Only Sexual Content at this time.

Before you ship: commercial use checklist

  1. Convai Free: 1 monthly active end user, so move to a paid plan before real players arrive.
  2. Inworld On-Demand: commercial license included, usage after the free allowance is billed.
  3. Charisma.ai: pay as you go, no free plan listed.
  4. ElevenLabs Free: no commercial license. Starter ($6/mo) or higher to sell your game.
  5. Ollama models and Piper voices: the software is free, but each model and voice has its own license. Check every one.
  6. Gemini API Free tier: Google says free tier content is used to improve its products.
  7. Steam: disclose Live-Generated AI in the Content Survey and describe your guardrails. More in Can I sell a game made with AI art?

Not legal advice. Plans and terms change often, so re-check each official page before you pay or ship.

Sources, checked Oct 23, 2026: Convai pricing, Convai Unity SDK docs, Convai Unreal plugin docs, Inworld pricing, Inworld Character Studio deprecation, Inworld security best practices, Charisma.ai pricing, Charisma docs, ElevenLabs pricing, Ollama on GitHub, Piper on GitHub, Gemini API pricing, OpenAI moderation guide, Godot text to speech, Steam Content Survey.

Related

Need voices for scripted lines? Read Best free AI tools for game voice acting. Building in Godot? See Build a Godot game with AI coding agents. New to all of this? Start with Make your first game with free AI tools. Browse every voice and dialogue tool and game design and writing tool on StarterLoot.

FAQ

Are AI NPCs free?

You can build and test them for free, but shipping them to real players usually costs money. Convai's Free plan (checked Oct 23, 2026) gives 100 interactions a month and only 1 monthly active end user. Inworld's On-Demand plan is $0 to start with up to 70 minutes of TTS included, then pay as you go. Running a model on your own computer with Ollama is free, but your players would need to run it too. The only truly free option for every player is pre-written dialogue voiced ahead of time, or Godot's built-in text to speech using the player's own system voices.

Can I use AI NPCs in a Steam game?

Yes, but you must disclose it. Steam's Content Survey (checked Oct 23, 2026) has a Generative AI section. Content made by AI while the game runs counts as Live-Generated, and Valve says you need to tell them what guardrails you use to make sure it is not generating illegal content. Valve also says that if your game connects to an AI service with ongoing costs, you must handle access for players and collect any payment with a Steam-supported method, for example by building the cost into the game price, microtransactions, a subscription or a DLC.

Which AI NPC tool works with Godot?

None of the three NPC platforms we checked list an official Godot plugin. Convai's docs cover Unity, Unreal Engine and web SDKs, Inworld's character templates were for Unity, Unreal and Node.js, and Charisma's SDKs cover Unity, Unreal, JavaScript and Python. In Godot, use the DIY approach: an HTTPRequest node that calls your own server (or a local Ollama for testing), plus Godot's built-in text to speech or pre-made voice files.

Can I put my API key in the game build?

No. Inworld's security docs say anything you ship to users can be inspected, including game builds, and that any credential that has ever been in a client build should be treated as compromised. Convai's Unity docs say any key shipped inside a client build is ultimately extractable. Keep keys on a small server you control, and have the game talk to that server.

Can I sell a game that uses ElevenLabs free plan voices?

No. ElevenLabs' pricing page (checked Oct 23, 2026) lists the Commercial License starting on the Starter plan at $6 a month. The Free plan gives 10,000 credits a month for testing. Inworld's free On-Demand plan does include a commercial license.

Why is my AI NPC so slow to answer?

Every step adds waiting time: turning the player's speech into text, waiting for the language model, then turning the reply into audio. Keep replies short, stream text as it arrives, and play a short filler line or a thinking animation while the model works. Inworld's docs suggest speaking short fillers like "let me think" while the main model warms up.

Get the free First Game Starter Pack

A 7-step path to your first tiny game, free art and sound you can actually use, and our AI tools kit for Godot, Unity, Unreal and Roblox. Plus one short tool tip a week. No spam, unsubscribe any time.

No spam. Unsubscribe in 1 click. Privacy See past issues

Preview of the First Game Starter Pack: the README, the AI Tools Kit and the first game checklist