Skip to content

Repository files navigation

Persona AI logo

Persona AI

Psychologist avatar — voice-first chat, OpenAI-compatible TTS/STT, Rhubarb lip-sync, and FAQ-guided replies

License: MIT Python 3.10-3.12 Tauri 2 FastAPI Backend CI Linux desktop CI macOS desktop CI

Installation · Development · Build · Verify releases · Changelog


Description

Persona AI is an open-source research demo: a supportive psychologist-style assistant with a 3D VRM/GLB avatar, Rhubarb lip-sync, and OpenAI-compatible chat / TTS / STT. A FastAPI backend loads a small FAQ corpus as a high-priority conversational roadmap (short clarifying questions), synthesizes speech, and derives mouth cues from the audio. The Tauri desktop app bundles the same stack and starts the Python sidecar automatically on launch. The UI opens in voice conversation first.

Disclaimer: This is a research / demo assistant. It does not diagnose or replace professional mental-health care. Configure the emergency contact number in apps/backend/.env.

Current version: 1.3.3


Features

  • Voice-first UI — full-screen voice sanctuary on launch; switch to chat anytime
  • Bilingual UI — Persian and English with locale-locked system prompts
  • OpenAI-compatible TTS / STT — HTTP speech synthesis and transcription
  • Rhubarb lip-sync — mouth cues from the WAV (A–H / X → VRM / GLB morphs)
  • VRM / GLB avatar — Three.js + @pixiv/three-vrm; named catalog (Kira, Lucien)
  • FAQ roadmapdata/faq_dataset.json steers short, question-led replies (no vector RAG)
  • Safety layer — high-risk detection and escalation replies
  • Desktop app — Tauri + PyInstaller sidecar (Windows NSIS; Linux/macOS via CI releases)
  • Themeable UI — themes, voice picker, and face-age controls

Screenshots

Persona AI preview

Chat session with avatar Voice conversation — male avatar

Voice conversation — female avatar


Demo

Animated preview: assets/media/preview.gif. Full installers: GitHub Releases.


Installation

Prerequisites

Requirement Notes
Python 3.10–3.12 Recommended; 3.14 may break pydantic wheels
Node.js 20+ Desktop build only
Rust Desktop build only
LLM API Ollama, vLLM, GapGPT, or any OpenAI-compatible chat endpoint
TTS / STT API OpenAI-compatible speech endpoints (often the same provider as chat)

Quick start (web / dev server)

git clone https://github.com/Satan2049/persona-ai.git
cd persona-ai/apps/backend
python -m venv .venv

Windows: .venv\Scripts\activate · Linux/macOS: source .venv/bin/activate

pip install -r requirements.txt
cp .env.example .env    # Windows: copy .env.example .env

Edit apps/backend/.env — set MODEL_* and optionally TTS_* / STT_*. Then from the repo root:

scripts\start-backend.bat        # Windows
./scripts/start-backend.ps1      # PowerShell

Open http://127.0.0.1:8000/ · Health check: http://127.0.0.1:8000/health

Desktop app (release)

Download the latest installer from GitHub Releases.

On first launch the app:

  1. Starts the bundled persona-backend sidecar on a local port
  2. Waits for /health, then loads the UI in voice mode
  3. Shows setup tips if the LLM or TTS API is misconfigured

Verify downloads with docs/TRUST.md.


Development

persona-ai/
├── apps/
│   ├── backend/          # FastAPI, TTS, STT, Rhubarb, FAQ guidance
│   └── desktop/          # Tauri + sidecar packaging
├── assets/               # Icons, media (screenshots/GIF), avatars source, default.env
├── data/                 # FAQ corpus
├── docs/                 # Architecture, trust, voice, release notes, data layout
├── scripts/              # Dev and release helpers
└── ui/                   # Static avatar + voice UI
Task Command
Start API (dev) scripts/start-backend.bat
Sync UI → desktop .\scripts\sync-desktop-ui.ps1
Desktop dev npm run sidecar:build then npm run desktop:dev
Ensure Rhubarb npm run rhubarb:ensure
Backend docs apps/backend/README.md
Desktop docs apps/desktop/README.md
Changelog CHANGELOG.md
Release notes (1.3.3) docs/release-notes-1.3.3.md

Not in git: API keys, generated apps/audio/ cache, downloaded tools/rhubarb/.


Build

Python sidecar (PyInstaller)

Windows:

npm run sidecar:build

Linux / macOS:

chmod +x scripts/build-sidecar.sh
./scripts/build-sidecar.sh

Desktop installer (Tauri)

npm install
.\scripts\sync-desktop-ui.ps1
npm run sidecar:build
npm run desktop:build
  • Windows: apps/desktop/src-tauri/target/release/bundle/nsis/
  • Linux / macOS: GitHub Actions uploads AppImage/deb/DMG (+ SHA256-*.txt) on v* tags

Release checksums

.\scripts\generate-sha256.ps1 -ReleaseDir "dist\release"

See docs/TRUST.md and docs/release-notes-1.3.3.md.


Tech stack

Layer Technology
Frontend HTML, CSS, vanilla JavaScript (ui/)
Avatar Three.js + @pixiv/three-vrm (VRM / GLB)
API FastAPI + Uvicorn
Style context FAQ JSON roadmap (static prompt injection)
TTS / STT OpenAI-compatible HTTP
Lip sync Rhubarb Lip Sync
LLM OpenAI-compatible HTTP
Desktop Tauri 2 + PyInstaller sidecar

Documentation


License

MIT — see LICENSE.

About

Offline-first psychologist avatar: bilingual chat, TTS, lip-sync UI, and a Tauri 2 Windows desktop app.

Topics

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages