شعار Make Npcs Talk

Make Npcs Talk

المجتمع
christos-antono
make-npcs-talk

Make NPCs in a game talk back. The player speaks or types, the NPC answers in character, in a cloned voice, about 1-2 seconds later, and can act on what was said. Covers the whole loop and the order to build it in (who is being talked to, what the scene is, speech-to-text, an LLM in character, Fish Audio voices on a GPU, streamed playback from the NPC, subtitles, mouth movement, actions), the four hooks a game has to provide, latency budgets, costs, testing in the real game, and the rules (single-player, voices you have the rights to, nothing of the game shipped). Use when the user wants NPCs, characters, villagers, companions or enemies in any game to hold conversations, react to the player's voice, or be voiced by Fish Audio (S2 Pro or Drama 3) and an LLM.

نظرة عامة

الناشرchristos-antono
المستودعNPCTalk
اسم المهارةmake-npcs-talk
النجوم
201
التفريعات
17
الملفات المرفقة
3
الترخيصMIT
الروابط
  • تعليمات بصيغة Markdown

    ملف SKILL.md يُحمّله النموذج عند الحاجة، فلا يستهلك توكنات إلا عندما يَرِد طلب ذو صلة فعلًا.

  • تعمل مع أي نموذج لغوي كبير

    مهارات الذكاء الاصطناعي مكتوبة بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا تعمل مع GPT أو Claude أو Gemini أو Grok أو نموذج محلي.

  • الملفات المرفقة: 3

    نصوص برمجية وقوالب ومراجع يمكن للنموذج قراءتها أثناء عمله. الملفات للقراءة فقط ولا تُنفّذ أبدًا.

  • مفتوحة المصدر

    نشرها christos-antono على GitHub. اطّلع على المصدر قبل تثبيتها.

التثبيت

ثبّت مهارة الذكاء الاصطناعي Make Npcs Talk في TypingMind لاستخدامها مع أي نموذج لغوي كبير، أو أضفها إلى وكيل ذكاء اصطناعي آخر يقرأ SKILL.md.

1

التثبيت في TypingMind

يُثبّت TypingMind المهارة مباشرةً من مجلدها على GitHub — فيقرأ SKILL.md، ويجمع ملفات الموارد في حزمة، ويحفظ النتيجة محليًا.

  1. افتح التطبيق وانتقل إلى «الإضافات» ثم «المهارات».
  2. اختر «تثبيت من GitHub».
  3. الصق رابط مجلد المهارة الموضّح أدناه وأكّد التثبيت.
    https://github.com/christos-antono/NPCTalk/tree/main/.agents/skills/make-npcs-talk
  4. فعّل المهارة في كل محادثة تريد إتاحتها فيها.
الإضافات ← المهارات ← إضافة مهارة ← من رابط GitHub، ثم الصق رابط المجلد واضغط على «متابعة».
2

التثبيت في وكيل ذكاء اصطناعي آخر

يمكن لأي وكيل ذكاء اصطناعي يقرأ تنسيق Agent Skills استخدام هذه المهارة — انسخ المجلد إلى مجلد المهارات الخاص بذلك الوكيل.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/christos-antono/NPCTalk.git /tmp/NPCTalk
mkdir -p .claude/skills
cp -r /tmp/NPCTalk/.agents/skills/make-npcs-talk .claude/skills/make-npcs-talk
أعد تشغيل Claude Code بعد النسخ ليتعرّف على المهارة الجديدة.

استخدمها في TypingMind

فعّل Make Npcs Talk في أي محادثة على TypingMind وسيتولى النموذج الباقي. تتضمن مطالبة النظام اسمها ووصفها، وبمجرد ورود طلب ذي صلة، يُحمّل النموذج التعليمات الكاملة تلقائيًا — فلا تحتاج إلى استدعائها يدويًا، ولا تستهلك أي توكنات حتى تُستخدم فعليًا.

يُحمّل النموذج مهارة Make Npcs Talk تلقائيًا بمجرد ورود طلب ذي صلة بها.

تعمل مع أي نموذج ذكاء اصطناعي

مهارات الذكاء الاصطناعي هي تعليمات بصيغة Markdown وليست شيفرة خاصة بمزوّد معيّن، لذا لا ترتبط Make Npcs Talk بالنموذج الذي كُتبت له. ثبّتها مرة واحدة في TypingMind واستخدمها مع GPT-5 أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو نموذج محلي تشغّله بنفسك — كل ذلك باستخدام مفاتيح API الخاصة بك.

  • تُحمَّل عند الحاجة فقط

    تتضمن مطالبة النظام الاسم والوصف فقط. وتُجلب التعليمات عند أول طلب ذي صلة، لذا لا تستهلك تعليمات المهارة أي توكنات ما دامت المهارة غير مستخدمة.

  • بدّل النماذج أثناء المحادثة

    لأن المهارة تعليمات وليست شيفرة، فإن تغيير النموذج لا يعطّلها — فالنموذج التالي يقرأ ملف SKILL.md نفسه.

تعليمات المهارة

هذا هو محتوى SKILL.md الذي يُحمّله النموذج. اقرأه قبل التثبيت — فالمهارة عبارة عن تعليمات سيتبعها نموذجك.

Make NPCs talk

The finished loop, as built for GTA V (examples/gta-v), with times measured in the game:

player's mic ──► voice activity ──► speech-to-text ──► who? + scene ──► LLM in character ──► voice server ──► NPC speaks
   (open mic,       (end of the       (fal Nemotron,     (the game)      (Cerebras, with      (Fish Audio on     (streamed PCM,
    push-to-talk,    sentence)         0.4-0.8 s)                         persona + lines,    an H100, first     panned, subtitles,
    or typing)                                                            0.3-1.0 s)          audio ~0.4 s)      mouth, action)
                                                                │
                                                                └──► action choice (Jev, ~0.1 s, in parallel) ──► animation

From the end of the player's sentence to the NPC's voice: 1.2-2.2 s warm with push-to-talk (logged exchanges: 1.15 s, 1.20 s, 1.57 s, 2.19 s); the open mic adds the 0.7 s of silence it waits for before deciding the sentence ended. The LLM sometimes spikes to 5-8 s, so log every step's time per exchange.

The loop: build it in this order

  1. Recon the game. Version, how code runs inside it (script hook, mod loader, plugin API, or your own engine), single-player or not, how other mods find nearby characters and play sounds. Read references/game-hooks.md for the engine, and knowledge/ for anyone who already did this game.
  2. Pick the engines (table below). Default: Fish Audio Drama 3 on Modal for voices, Cerebras for the LLM, fal for speech-to-text.
  3. Stand the voice server up first, outside the game (skill fish-voice-server): npctalk health, then npctalk say "..." --voice Name/clone. A game is the worst place to debug a GPU server.
  4. Make reference voices for two or three characters (skill voice-references).
  5. Vertical slice in the game: one NPC, typed text → LLM → voice → playback. Implement the four hooks below, nothing else. Log stt / llm / tts / total for every exchange.
  6. Voice input (skill voice-input): push-to-talk first, then the open mic.
  7. Characters (skill npc-dialogue): persona files, the character's own lines as style samples, scene facts, per-NPC history, output cleaning.
  8. Actions (skill npc-actions): what they physically do, and doing what they're told.
  9. Verify in the real game, with a dev mode that shows the target, the timings and the mod's state (below).
  10. Show it (skill npc-showcase-clips), and if voice likeness matters, measure it (skill voice-likeness-eval) before claiming a setting is better.
  11. Write it down: a field note in knowledge/games/<game>/ (see knowledge/README.md).

The four hooks a game has to provide

Everything else is game-free code. In the GTA V example about 2,450 of the mod's ~5,500 lines (dialogue, LLM, voice clients, streaming playback, speech-to-text, open mic, action picking) build and run outside the game: examples/gta-v/tools/npcvoice-check compiles exactly those files into a console app.

HookWhat it returnsGTA V (ScriptHookVDotNet)
Who is being talked toThe NPC, or nobodyLiving humans within 12 m; within 5 m always counts, 5-12 m only if the camera points at them (dot > 0.85). Named characters win ties; the last partner sticks while within 6 m
Scene factsA few short stringsZone and street name, time, weather, the player's vehicle and weapon, wanted level, health, whether this is the NPC's home
Voice at the NPCPlay streamed PCM from that NPCNAudio playback, panned by screen position, faded 4-30 m, mouth driven by the audio level, the game's subtitle style
ActionsName → animation or behaviourAnim dictionaries checked at load (a missing one falls back), clothing swaps, tasks (flee, fight, kneel)

Keep the hooks thin. If a game exposes them, the rest of this repo's code carries over.

Choosing engines

NeedDefaultAlternatives
Voice, realtimeFish Audio Drama 3 self-hosted on Modal (server/drama3.py): first audio ~0.4 s warm, acts [tags] wellS2 Pro (server/s2pro.py, smaller, fine-tunable); MiniMax via fal (no GPU to run, $1.50 per voice clone, 2.5-4.5 s per line)
Voice, pre-rendered (cutscenes, demos)Drama 3 with best_of: 8 (best likeness measured)ElevenLabs (scored lowest here, 0.612)
LLMCerebras qwen-3.8-27b, reasoning off (~0.3 s)Any OpenAI-compatible endpoint; reasoning models add seconds
Speech-to-textfal nvidia/nemotron-asr-multilingual/asr (~0.4 s, audio inline)Whisper anywhere
ActionsTypeSafe Jev (typed choice + probability, ~0.1 s)A second LLM call with a JSON schema (slower, less calibrated)

Costs: an H100 runs about $4/hour while it's up; it scales to zero 5 minutes after the last request, and the next request waits 1-3 minutes for a cold start. The game pings the server while it runs, so it stays warm exactly while someone plays (server/keepwarm.py holds it up for a demo without the game).

Verify like you mean it

  • Log every exchange with each step's time and what was heard and said. Most "it doesn't work" reports are answered by the log (in GTA V: "open mic -> nobody near" 755 times = the target lookup found nobody).
  • Show the mod's state on screen. A mod switched off with a hotkey looks exactly like a broken one; say "off" somewhere visible. Show who would be talked to (a marker) in a dev mode.
  • Test the network half without the game (npcvoice-check in the GTA example, npctalk say for the server).
  • Measure, don't eyeball, voice likeness (skill voice-likeness-eval). Two runs of ten lines fooled us once; ten runs didn't.

Rules

  • Single-player, or servers you run. Never inject into online games with anti-cheat (for GTA V: never launch GTA Online with a script hook installed).
  • Voices you have the rights to. Your own, an actor who agreed, a licensed or generated voice. Cloning a game's characters for your own single-player experiment is one thing; publishing those clones is another. Never commit voice clips, game audio, or the game's dialogue (npctalk check blocks audio and transcripts).
  • No secrets in the repo. Keys come from environment variables. A server URL is a secret too when its /health needs no token: anyone with it can keep your GPU awake.
  • Content. NPCs swear if the game's characters do. Slurs are filtered by default and opt-in per persona (skill npc-dialogue).
  • Ask first before driving the user's keyboard and mouse in a running game, installing into game folders, or publishing anything.

Full reasoning: references/safety.md. Architecture and file map: references/architecture.md.

الملفات المرفقة

يقرأ النموذج هذه الملفات عند الحاجة ما دامت المهارة محمّلة. وهي متاحة للقراءة ولا تُنفّذ أبدًا.

الأسئلة الشائعة

ماذا تفعل مهارة الذكاء الاصطناعي Make Npcs Talk؟

Make NPCs in a game talk back. The player speaks or types, the NPC answers in character, in a cloned voice, about 1-2 seconds later, and can act on what was said. Covers the whole loop and the order to build it in (who is being talked to, what the scene is, speech-to-text, an LLM in character, Fish Audio voices on a GPU, streamed playback from the NPC, subtitles, mouth movement, actions), the four hooks a game has to provide, latency budgets, costs, testing in the real game, and the rules (single-player, voices you have the rights to, nothing of the game shipped). Use when the user wants NP...

لماذا تستخدم Make Npcs Talk على TypingMind؟

لأنك تثبّتها مرة واحدة وتستخدمها مع أي نموذج. مهارة Make Npcs Talk عبارة عن نص Markdown وليست شيفرة خاصة بمزود بعينه، لذا تعمل المهارة نفسها مع GPT-5 أو Claude أو Gemini أو Grok أو نموذج محلي، ويمكنك تبديل النموذج أثناء المحادثة دون تعطّل المهارة. يعمل TypingMind بمفاتيح API الخاصة بك، فتدفع للمزودين مباشرةً بدلًا من اشتراك لكل مقعد، وتبقى مهاراتك ومحادثاتك في مساحة التخزين الخاصة بك.

كيف أثبّت Make Npcs Talk في TypingMind؟

في TypingMind، افتح «الإضافات»، ثم «المهارات»، ثم اختر «التثبيت من GitHub» والصق https://github.com/christos-antono/NPCTalk/tree/main/.agents/skills/make-npcs-talk. يقرأ TypingMind ملف SKILL.md الخاص بالمهارة، ويجمع ملفاتها ويثبّتها كمهارة يمكنك تفعيلها لكل محادثة على حدة.

ما نماذج الذكاء الاصطناعي التي يمكنها استخدام Make Npcs Talk؟

أي نموذج تربطه في TypingMind. مهارات الذكاء الاصطناعي عبارة عن تعليمات Markdown وليست شيفرة خاصة بمزود بعينه، لذا يمكن لكل من GPT وClaude وGemini وGrok والنماذج المحلية تحميل هذه المهارة عندما يتوافق الطلب معها.

كم نموذج ذكاء اصطناعي يمكنني استخدامه مع Make Npcs Talk؟

أي عدد تريده. ما دام النموذج يدعم المهارات، يمكنك استخدام Make Npcs Talk معه، سواء كان GPT أو Claude أو Gemini أو Grok أو DeepSeek أو Mistral أو Llama أو غيرها، وكل ذلك على TypingMind باستخدام مفاتيح API الخاصة بك.

هل مهارة الذكاء الاصطناعي Make Npcs Talk مجانية؟

نعم. نشرها christos-antono على GitHub بموجب ترخيص MIT. لا تدفع إلا لمزود الذكاء الاصطناعي الخاص بك مقابل التوكنات التي تستخدمها.

ما هي مهارات الذكاء الاصطناعي؟

مهارة الذكاء الاصطناعي حزمة تعليمات قابلة لإعادة الاستخدام تعلّم نموذج الذكاء الاصطناعي كيفية تنفيذ مهمة محددة. وتتبع تنسيق Agent Skills المفتوح: ملف SKILL.md يتضمن اسمًا ووصفًا، إلى جانب أي نصوص برمجية أو قوالب أو ملفات مرجعية قد يحتاج إليها النموذج. لا يقرأ النموذج التعليمات إلا عندما يتوافق طلبك مع المهارة، لذا لا تترتب على المهارة المثبتة أي تكلفة حتى تُستخدم.

كيف تختلف مهارات الذكاء الاصطناعي عن الإضافات أو موصلات MCP؟

تمنح الإضافة أو موصل MCP النموذج أدوات جديدة يمكنه استدعاؤها، وهي شيفرة تُنفَّذ في مكان ما وتُرجع نتيجة. أما مهارة الذكاء الاصطناعي فتزوّد النموذج بالمعرفة ومنهجية العمل: كيفية التعامل مع مهمة، والخطوات التي ينبغي اتباعها، وما ينبغي أن تكون عليه المخرجات الجيدة. المهارات عبارة عن نصوص Markdown، لذا لا تحتاج إلى خادم أو مفتاح API أو بيئة تشغيل، وتعمل مع أي نموذج.

عرض الكل

أنشئ مساحة عملك للذكاء الاصطناعي الآن

اشترك في نشرتنا الإخبارية لتصلك أخبار الميزات الجديدة والهدايا القادمة 👇