A Unity package for 64-bit Windows

LocalNPC

Voice conversations with NPCs, on the player's PC.

Players speak into their microphone and hear voiced replies from in-game characters. Everything runs on the player's PC, with no cloud service and no API fees. LocalNPC sends no data about the player: its only network use is downloading the model files from Hugging Face (huggingface.co).

Quick Start All documentation

Demo video: coming soon

Placeholder. No video has been published yet.

Screenshots: coming soon

Placeholder. No screenshots have been published yet.

What it is

How it works, in 5 lines

  1. The microphone signal goes through the built-in energy (loudness) voice activity detection.
  2. Speech-to-text (Whisper) turns what the player said into text.
  3. A small language model (Qwen2.5, through llama.cpp) writes the reply in the character's personality.
  4. Each sentence is spoken with the Windows system voice while the language model is still writing the next ones.
  5. The sound plays from the NPC; an optional component opens a character's jaw with the loudness of the voice.

What you need

Models are downloaded on your click

The model files are not in the package. The Setup Wizard, the Model Manager or the sample scene's Download & Install Models button downloads them from Hugging Face (huggingface.co), over HTTPS with the server's certificate checked, and checks each file with SHA-256. LocalNPC runs no server of its own; Hugging Face sees the IP address of the computer that downloads. After the models are downloaded, LocalNPC makes no network requests (checked by reading the code; no network capture was made).

PresetLanguage modelSpeech modelDownload
Balanced (default)Qwen2.5-1.5B-Instruct Q4_K_MWhisper tiny.en1.20 GB
Fast (low-end PCs)Qwen2.5-0.5B-Instruct Q4_K_MWhisper tiny.en569 MB

How long a reply takes

Typically about 3 seconds after you stop talking: a 0.9 second end-of-speech wait plus about 2 seconds (measured 2.04 to 2.25 s on one laptop, Balanced preset, five voice turns). It depends on your hardware, and we have not measured other machines yet.

Honest limits of v1.0

The full list is under Known issues.

AI disclosure

LocalNPC is an AI-based asset.

This package runs a language model (Qwen2.5, downloaded at first use from Hugging Face) and a speech-to-text model (Whisper) on the player's PC. NPC replies are generated by the language model and are not reviewed. Parts of the package's code and documentation were written with the help of AI tools.

Licence

LocalNPC is sold on the Unity Asset Store; the standard Unity Asset Store EULA applies. Third-party components and their licences are listed in the Third-Party Notices, which ship with the package.