{"id":45986296,"url":"https://github.com/mrwong99/glyphoxa","last_synced_at":"2026-03-04T01:23:50.659Z","repository":{"id":340471904,"uuid":"1166172302","full_name":"MrWong99/glyphoxa","owner":"MrWong99","description":"AI-Powered Voice NPCs for Tabletop RPGs — a platform-agnostic, provider-independent voice AI framework written in Go","archived":false,"fork":false,"pushed_at":"2026-02-25T01:22:37.000Z","size":5861,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-25T06:58:31.629Z","etag":null,"topics":["ai","discord-bot","golang","mcp","npc","speech-to-text","tabletop-rpg","text-to-speech","ttrpg","voice-ai"],"latest_commit_sha":null,"homepage":null,"language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MrWong99.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-02-25T00:19:58.000Z","updated_at":"2026-02-25T01:22:42.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/MrWong99/glyphoxa","commit_stats":null,"previous_names":["mrwong99/glyphoxa"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/MrWong99/glyphoxa","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrWong99%2Fglyphoxa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrWong99%2Fglyphoxa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrWong99%2Fglyphoxa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrWong99%2Fglyphoxa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MrWong99","download_url":"https://codeload.github.com/MrWong99/glyphoxa/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MrWong99%2Fglyphoxa/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29948228,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-28T18:42:55.706Z","status":"ssl_error","status_checked_at":"2026-02-28T18:42:48.811Z","response_time":90,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ai","discord-bot","golang","mcp","npc","speech-to-text","tabletop-rpg","text-to-speech","ttrpg","voice-ai"],"created_at":"2026-02-28T19:00:44.046Z","updated_at":"2026-02-28T19:00:44.604Z","avatar_url":"https://github.com/MrWong99.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"![Glyphoxa](assets/banner-logo.png)\n\n# 🐉 Glyphoxa\n\n[![CI](https://github.com/MrWong99/glyphoxa/actions/workflows/ci.yml/badge.svg)](https://github.com/MrWong99/glyphoxa/actions/workflows/ci.yml)\n[![Go Version](https://img.shields.io/badge/Go-1.26+-00ADD8?style=flat\u0026logo=go)](https://go.dev)\n[![License: GPL v3](https://img.shields.io/badge/License-GPLv3-blue.svg)](LICENSE)\n[![Go Report Card](https://goreportcard.com/badge/github.com/MrWong99/glyphoxa)](https://goreportcard.com/report/github.com/MrWong99/glyphoxa)\n\n**AI-Powered Voice NPCs for Tabletop RPGs** — a platform-agnostic, provider-independent voice AI framework that brings your NPCs to life.\n\n---\n\n## What is Glyphoxa?\n\nGlyphoxa is a real-time voice AI framework that brings AI-driven talking personas into live voice chat sessions. Built for tabletop RPGs, it serves as a persistent AI co-pilot for the Dungeon Master — voicing NPCs with distinct personalities, transcribing sessions, and answering rules questions — without ever replacing the human storyteller.\n\nWritten in Go for native concurrency and sub-2-second mouth-to-ear latency.\n\n\u003e **⚠️ Early Alpha** — Glyphoxa is under active development. APIs may change between commits.\n\n## ✨ Features\n\n- 🗣️ **Voice NPC Personas** — AI-controlled NPCs with distinct voices, personalities, and backstories that speak in real-time\n- 🧠 **Hybrid Memory System** — NPCs remember. Hot layer for instant context, cold layer for deep history, knowledge graph for world state\n- 🔧 **MCP Tool Integration** — Plug-and-play tools (dice, rules lookup, image gen, web search) with performance-budgeted execution\n- 🔄 **Provider-Agnostic** — Swap LLM, STT, TTS, or audio platform with a config change, not a rewrite\n- ⚡ **Sub-2s Latency** — End-to-end streaming pipeline with speculative pre-fetch and sentence-level TTS\n- 🎭 **Multi-NPC Orchestration** — Multiple NPCs with address detection, turn-taking, and priority-based audio mixing\n- 📜 **Live Session Transcription** — Continuous STT with speaker identification for session logging and future lookup\n- 🧪 **Dual-Model Sentence Cascade** — Experimental: fast model opener + strong model continuation for perceived \u003c600ms voice onset\n- 🗺️ **Entity Management** — Pre-session world-building with YAML campaign files and VTT imports (Foundry VTT, Roll20)\n\n## 🏗️ Architecture\n\n```\n┌──────────────────────────────────────────────────────────┐\n│                    Audio Transport                       │\n│              (Discord / WebRTC / Custom)                 │\n├────────────────────┬─────────────────────────────────────┤\n│   Audio In (VAD)   │          Audio Out (Mixer)          │\n├────────────────────┴─────────────────────────────────────┤\n│              Agent Orchestrator + Router                  │\n│    ┌─────────┐  ┌─────────┐  ┌─────────┐                │\n│    │ NPC #1  │  │ NPC #2  │  │ NPC #3  │  ...           │\n│    └────┬────┘  └────┬────┘  └────┬────┘                │\n├─────────┴────────────┴────────────┴──────────────────────┤\n│                  Voice Engines                            │\n│    Cascaded (STT→LLM→TTS) │ S2S (Gemini/OpenAI) │ ⚠Cascade │\n├──────────────────────────────────────────────────────────┤\n│   Memory Subsystem          │    MCP Tool Execution      │\n│  ┌─────┐ ┌─────┐ ┌─────┐  │  ┌──────┐ ┌──────┐         │\n│  │ Log │ │ Vec │ │Graph│  │  │ Dice │ │Rules │ ...      │\n│  └─────┘ └─────┘ └─────┘  │  └──────┘ └──────┘         │\n└──────────────────────────────────────────────────────────┘\n```\n\n## 🚀 Quick Start\n\n### Prerequisites\n\n- **Go 1.26+** with CGo enabled\n- **libopus** — `apt install libopus-dev` · `pacman -S opus` · `brew install opus`\n- **ONNX Runtime** — from [onnxruntime releases](https://github.com/microsoft/onnxruntime/releases) (for Silero VAD)\n\n### Build \u0026 Run\n\n```bash\ngit clone https://github.com/MrWong99/glyphoxa.git\ncd glyphoxa\n\n# Build\nmake build\n\n# Run\n./bin/glyphoxa --config config.yaml\n```\n\n### Development\n\n```bash\n# Run tests with race detector (459 tests)\nmake test\n\n# Full pre-commit check (fmt + vet + test)\nmake check\n```\n\n## 🔌 Provider Support\n\n| Component | Providers |\n|-----------|-----------|\n| **STT** | Deepgram Nova-3, whisper.cpp (local) |\n| **LLM** | OpenAI, Anthropic, Google Gemini, Ollama (local) — via [any-llm-go](https://github.com/mozilla-ai/any-llm-go) |\n| **TTS** | ElevenLabs, Coqui XTTS (local) |\n| **S2S** | Gemini Live, OpenAI Realtime |\n| **Embeddings** | OpenAI, Ollama (local) |\n| **Audio** | Discord, WebRTC |\n| **Memory** | PostgreSQL + pgvector |\n\n## ⚡ Performance Targets\n\n| Metric | Target | Hard Limit |\n|--------|--------|------------|\n| Mouth-to-ear latency | \u003c 1.2s | 2.0s |\n| STT time-to-first-token | \u003c 300ms | 500ms |\n| LLM time-to-first-token | \u003c 400ms | 800ms |\n| TTS time-to-first-byte | \u003c 200ms | 500ms |\n| Concurrent NPC voices | ≥ 3 | ≥ 1 |\n| Hot memory assembly | \u003c 50ms | \u003c 150ms |\n\n## 📦 Project Structure\n\n```\nglyphoxa/\n├── cmd/glyphoxa/          # Entry point\n├── internal/\n│   ├── agent/             # NPC agents, orchestrator, router, address detection\n│   ├── config/            # Configuration schema and loader\n│   ├── engine/            # Voice engines (S2S wrapper, sentence cascade)\n│   ├── entity/            # Entity management (CRUD, YAML, VTT import)\n│   ├── hotctx/            # Hot context assembly and formatting\n│   ├── mcp/               # MCP host, bridge, budget tiers, built-in tools\n│   └── transcript/        # Transcript correction pipeline\n├── pkg/\n│   ├── audio/             # Platform + Connection interfaces, mixer, WebRTC\n│   ├── memory/            # Store interface, PostgreSQL + pgvector, knowledge graph\n│   └── provider/          # LLM, STT, TTS, S2S, VAD, Embeddings interfaces + impls\n├── docs/design/           # Architecture and design documents\n├── research/              # Research notes\n└── configs/               # Example configuration files\n```\n\n## 📖 Documentation\n\nComprehensive guides for developers and contributors — see the [full documentation index](docs/README.md).\n\n| Guide | Description |\n|-------|-------------|\n| [Getting Started](docs/getting-started.md) | Prerequisites, build, first run |\n| [Architecture](docs/architecture.md) | System layers, data flow, key packages |\n| [Configuration](docs/configuration.md) | Complete config field reference |\n| [Providers](docs/providers.md) | Provider system, adding new providers |\n| [NPC Agents](docs/npc-agents.md) | NPC definition, entities, campaigns |\n| [Memory](docs/memory.md) | 3-layer memory system |\n| [MCP Tools](docs/mcp-tools.md) | Tool system, building custom tools |\n| [Audio Pipeline](docs/audio-pipeline.md) | Audio flow, VAD, engine types |\n| [Commands](docs/commands.md) | Discord slash and voice commands |\n| [Deployment](docs/deployment.md) | Docker Compose, production setup |\n| [Observability](docs/observability.md) | Metrics, Grafana, health endpoints |\n| [Testing](docs/testing.md) | Test conventions and patterns |\n| [Troubleshooting](docs/troubleshooting.md) | Common issues and debugging |\n\n## 📚 Design Documents\n\n| Document | Description |\n|----------|-------------|\n| [Overview](docs/design/00-overview.md) | Vision, goals, product principles |\n| [Architecture](docs/design/01-architecture.md) | System layers and data flow |\n| [Providers](docs/design/02-providers.md) | LLM, STT, TTS, Audio platform interfaces |\n| [Memory](docs/design/03-memory.md) | Hybrid memory system and knowledge graph |\n| [MCP Tools](docs/design/04-mcp-tools.md) | Tool integration and performance budgets |\n| [Sentence Cascade](docs/design/05-sentence-cascade.md) | ⚠️ Dual-model cascade (experimental) |\n| [NPC Agents](docs/design/06-npc-agents.md) | Agent design and multi-NPC orchestration |\n| [Technology](docs/design/07-technology.md) | Technology decisions and latency budget |\n| [Roadmap](docs/design/09-roadmap.md) | Development phases |\n| [Knowledge Graph](docs/design/10-knowledge-graph.md) | L3 graph schema and query patterns |\n\n## 🤝 Contributing\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) for development setup, code style, and workflow guidelines.\n\n- **Bugs** → [Bug Report](.github/ISSUE_TEMPLATE/bug_report.yml)\n- **Features** → [Feature Request](.github/ISSUE_TEMPLATE/feature_request.yml)\n- **Security** → [SECURITY.md](SECURITY.md)\n\n## 📄 License\n\n[GPL v3](LICENSE) © Glyphoxa Contributors\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrwong99%2Fglyphoxa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmrwong99%2Fglyphoxa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmrwong99%2Fglyphoxa/lists"}