5235aa-web/Pebble_companionchat
À propos
A lightweight, locally-focused, and customizable chat impersonation application
IA et apprentissage automatiqueProgression mesurée des étoiles
- in 24h
- 0
- in 7 days
- 0
- in 15 days
- Historique en cours
- in 1 month
- Historique en cours
Variations nettes sur des périodes qui se chevauchent, pas des totaux quotidiens. Les mesures absentes restent vides. Les étoiles indiquent l’intérêt, pas la qualité.
README.md
OriginalPebble Companion Chat (P.C.C)
English | 简体中文
Lightweight, multi-sensory immersive AI character chat for local GGUF & cloud models — combining branched roleplay, multi-character group stages, cascading streaming voice calls, long-term memory, Live2D puppets, and an integrated picture studio.
Download Windows Installer (Ready-to-Run, No Python / Node Required) · Quick Start · Ask a Question / Report a Bug
Looking to just chat with your cards on Windows? You do not need Python, Node.js, or Git. Grab the pre-built installer from Latest Release, install it, import a
PNG/JSON/CHARX/.risumcard, and enter your API key (or connect Ollama / LM Studio /llama.cpp).
📋 Changelog
Current Version: v1.0.6 — View full release notes in CHANGELOG.md.
v1.0.6 upgrades Video Attachment Frame Extraction & Storyboard Vision (hardened FFmpeg duration probing, fast concurrent keyframe seeking, timeout/incomplete-frame recovery, timestamped 2×2/3×3/4×4 storyboard grid packing, 10-minute chunked STT, and automatic compact-grid retry on image/payload limits without blacklisting vision models) and adds Reference-Safe Attachment Cleanup (automatically removing orphaned attachment, poster, and frame files when clearing or deleting messages, branches, companions, or group rooms).
Previous release summary (v1.0.5)
v1.0.5 refreshes the Application Icon & Brand Logo (replacing the Tauri desktop icon and README banner with a minimalist #ece5d8-on-#0a0908 calligraphic PCC design).
🎬 Demo Video
https://github.com/user-attachments/assets/e769900a-3d63-4566-ba71-10a9fef491b6
✨ Overview
Pebble Companion Chat (P.C.C) is a desktop and web AI companion workspace driven by text, voice, and generated imagery. The backend is built with FastAPI + SQLite + WebSockets, paired with a Vue 3 + Pinia + Vite frontend (frontendV2) packaged as a lightweight Tauri 2 desktop application (with standalone backend packaging via PyInstaller).
Whether running local GGUF weights, calling cloud LLM APIs, holding live voice calls, or staging multi-character scenes, all conversations, character cards, and extracted memories remain persisted locally under your control.
🌟 Core Features
1. Single Chat & Multiple Conversations
Streaming narrative replies with candidate swipes, independent conversation branches per character card, and manual token-aware context compaction. Import SillyTavern JSONL logs directly into new branches with swipes and variables intact, or export any branch (automatically organized by character name) to Markdown, self-contained rich HTML, Pebble JSON, or SillyTavern JSONL.
2. Multi-Character Group Stage
Bring up to 3 companions onto a fanned portrait stage with @ speaker cues, autonomous multi-turn Relay, isolated room memories, and a one-click Narration Mode to steer scenes without polluting ongoing context.
3. Live2D
An optional local portrait-decomposition module (See-through, safely skipped with zero PyTorch required) that turns static art or expression packs into interactive WebGL2 puppets with breathing, gaze tracking, TTS lip-sync, multi-outfit switching, and touch reactions.
4. Character Cards & Isolated World Book Translation
Import and edit SillyTavern PNG / JSON, CHARX, and RisuAI .risum packages with automatic asset unpacking, inline media, a reactive Stage HUD, global rules, and a no-regex Scene Rules Workshop for plain-language or block-based customization — plus display-only Chinese / English translation for character descriptions and embedded World Books without modifying original prompts.
5. Script Mode
Direct stories scene by scene using ordered turn budgets, a structured <<<STATE>>> HUD progression protocol, isolated prompts, instant scene rewind, and preserved per-scene summary cards.
6. Long-Term Memory & Token Engine
Automatically extract and rank durable memories using embedding-free BM25 retrieval (no vector store or extra model needed), paired with provider-aware token counting across local and cloud backends.
7. Cascaded Streaming Voice Calls, TTS & ASR
Hold natural spoken conversations through an interchangeable ASR → LLM → TTS streaming loop with Silero VAD barge-in, supporting local audio.cpp engines alongside OpenAI-compatible and cloud speech providers.
8. Picture Studio & Multimodal Attachments
Chat with images, documents, and sampled video frames (with opt-in speech transcription), and generate manual or story-triggered scene illustrations via local ComfyUI or cloud image providers into a unified gallery.
9. Customizable Aesthetic
Switch seamlessly between Day / Night themes, 7 accent palettes (Amber, Ember, Celadon, Moon, Plum, Jade, Rose), selectable typography, and instant English / 中文 UI localization.
🧩 Supported Providers & Engines
| Capability | Local Engines / Protocols | Cloud / External Providers |
|---|---|---|
| LLM Chat | llama.cpp (llama-server with GGUF, mmproj vision & MTP), Ollama, LM Studio, any local OpenAI-compatible endpoint |
OpenAI, ChatGPT, DeepSeek, Qwen, Grok, Xiaomi MiMo, Volcengine, Anthropic, Gemini — every provider is called through the OpenAI-compatible /chat/completions protocol with a bearer key, so Anthropic and Gemini need a base URL that speaks it (their own gateway or a compatible proxy) |
| TTS (Voice) | audio.cpp (OmniVoice, DotTTS, Fish Audio, Ming 3.0 & custom GGUF specs), OpenAI-compatible HTTP endpoint |
MiniMax, ElevenLabs |
| ASR (Ears) | audio.cpp (built-in Qwen3-ASR, Confucius4-R2T2 & custom GGUF specs), custom OpenAI-compatible HTTP |
OpenAI-compatible STT endpoints |
| Picture Studio | Local ComfyUI (with custom workflow JSON import) | SiliconFlow (Kolors), Zhipu (CogView-3-Flash), Cloudflare Workers AI, AI Horde, Gemini, ModelScope, Pollinations |
🚀 Quick Start
Option 1: Windows Desktop Installer (Recommended)
Ready to run out of the box — no Python, Node.js, or command line needed:
- Download the Windows installer (
.exe) from Latest Release. - Run the installer (if Windows SmartScreen warns about an unsigned open-source app, click More info → Run anyway) and launch Pebble Companion Chat.
- Start chatting in 3 steps:
- Open Cast in the top bar and import a character card (
PNG/JSON/CHARX/.risum). - (Optional) Open Branches →
+ import JSONLto bring over an existing SillyTavern conversation. - Open Backstage → Model to enter a cloud API key (OpenAI, DeepSeek, Qwen, Gemini proxy, etc.) or connect a local server (Ollama, LM Studio,
llama.cpp).
- Open Cast in the top bar and import a character card (
Local
llama.cppGGUF Note (Optional):llama-server.exeis not bundled inside the installer to keep downloads small. If you want Pebble to manage local GGUF LLM launches directly (instead of Ollama / LM Studio / Cloud APIs), download allama.cpprelease for your GPU/CPU and point Backstage → Paths →llama.cpp runtimeto it. (audio.cppfor local voice is already bundled.)
Option 2: Run from Source (Developers / macOS / Linux)
Prerequisites
- Python 3.10+
- Node.js 18+ and
npm
1. Install Dependencies
# Core backend dependencies
pip install -r requirements.txt
# Frontend dependencies
cd frontendV2
npm install
2. Start Dev Servers
Windows One-Click Launcher:
companion.bat
macOS / Linux Launcher (Web UI):
chmod +x companion.sh frontendv2.sh
./companion.sh
Manual Startup:
# Terminal 1: Start the FastAPI backend (http://localhost:8002)
python -m uvicorn backend.main:app --reload --host 0.0.0.0 --port 8002
# Terminal 2: Start the Vite dev server (http://localhost:5176)
cd frontendV2
npm run dev
Open http://localhost:5176 in your browser to start.
3. Build Desktop Installer from Source (Tauri 2)
With the Rust toolchain installed, run inside frontendV2:
cd frontendV2
# Desktop development mode
npm run tauri:dev
# Build desktop installer (Windows NSIS)
npm run tauri:build
Optional: Enable Local Live2D Decomposition (PyTorch + See-through Models)
Skip this completely unless you want local Live2D portrait layer decomposition; every other feature runs without PyTorch.
Windows:
:: 1) Create & activate an isolated virtual environment (Python 3.11 / 3.12 recommended)
python -m venv "%USERPROFILE%\.pebblecompanion\inochi2d-venv"
"%USERPROFILE%\.pebblecompanion\inochi2d-venv\Scripts\activate.bat"
:: 2) Install PyTorch for your GPU (see backend/Inochi2D/requirements.txt for CUDA / ROCm / CPU notes)
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu126
:: 3) Install headless Live2D inference & post-processing dependencies
pip install -r backend\Inochi2D\requirements.txt
macOS / Linux (Experimental):
python3 -m venv ~/.pebblecompanion/inochi2d-venv
source ~/.pebblecompanion/inochi2d-venv/bin/activate
pip install torch torchvision --index-url https://download.pytorch.org/whl/cu126
pip install -r backend/Inochi2D/requirements.txt
Download the two See-through model repositories into your Models root directory (seethroughv0.0.2_layerdiff3d and seethroughv0.0.1_marigold):
- LayerDiff3D: https://huggingface.co/layerdifforg/seethroughv0.0.2_layerdiff3d →
<modelsRoot>/seethroughv0.0.2_layerdiff3d - Marigold Depth: https://huggingface.co/24yearsold/seethroughv0.0.1_marigold →
<modelsRoot>/seethroughv0.0.1_marigold
python -c "from huggingface_hub import snapshot_download; snapshot_download('layerdifforg/seethroughv0.0.2_layerdiff3d', local_dir='<modelsRoot>/seethroughv0.0.2_layerdiff3d'); snapshot_download('24yearsold/seethroughv0.0.1_marigold', local_dir='<modelsRoot>/seethroughv0.0.1_marigold')"
Both source runs and packaged desktop builds discover ~/.pebblecompanion/inochi2d-venv automatically, or you can point Backstage → Paths → Live2D Python to any existing venv / conda environment.
⚙️ Data Directory & Environment Variables
All writable user data is stored under ~/.pebblecompanion by default (including companions.db, uploads/, outputchat/, config/, and voice/ clips) so upgrades and rebuilds never overwrite your chats.
Optional environment overrides:
PEBBLE_DATA_ROOT— Override the root directory for writable user data and config files.PEBBLE_MODELS_ROOT— Override the default root directory for local model weights (also configurable via Backstage → Paths).
💬 Support, Questions & Feedback
Running into an API setup issue, a character card display quirk (PNG / CHARX / .risum), or have a feature idea?
- Open an Issue — Both English and Chinese (中文) are welcome! Screenshots or card format details are always helpful.
- If you enjoy using Pebble Companion Chat, leaving a Star helps more people discover the project.
Explorer des projets similaires
Chargement…