mirrorstage is a one-shot AI livestreaming platform that creates automated talking head videos in response to user input or chat messages.
- modular service architecture - swap between different LLM, TTS, and video sync providers
- real-time chat ingestion - automatically responds to pump.fun chat messages
- obs integration - seamless streaming with dynamic video switching
- concurrent processing - handles multiple requests with configurable queue limits
- vision analysis - can analyze screenshots from obs (currently disabled)
- character customization - define custom AI personalities and prompts
- openai
- openrouter
- zonos (local/api)
- elevenlabs
- latentsync (local)
- fal api (latentsync/pixverse)
- sync labs
-
clone this repo
-
install dependencies
npm install # or yarn install -
set up assets
- add
base_video.mp4to_assets/(30 seconds, front-facing human, minimal movement) - add
base_audio.wavto_assets/(voice sample for tts reference)
- add
-
configure character
- edit
server/prompts/character-file.tsto define your AI personality
- edit
-
set up environment
cp .env.example .env # edit .env with your api keys and configuration -
configure obs
- install obs studio
- enable websocket server in obs (tools → websocket server settings)
- default port: 4455
- set password if desired (update in .env)
-
run the service
npm run dev # or for production npm run build && npm start
key environment variables:
# api keys
OPENAI_API_KEY=your-key
ELEVENLABS_API_KEY=your-key
FAL_KEY=your-key
# obs configuration
OBS_WEBSOCKET_URL=ws://localhost:4455
OBS_WEBSOCKET_PASSWORD=your-password
# file paths
BASE_VIDEO_PATH=./_assets/base_video.mp4
BASE_AUDIO_PATH=./_assets/base_audio.wav
OUTPUT_DIR=./_outputs
# processing settings
PIPELINE_CONCURRENT_LIMIT=2
MAX_QUEUE_SIZE=10npm run cli:dev
# type messages directly to test the pipeline# set PUMP_FUN_URL in .env
# the service will automatically monitor pump.fun chatinput sources → evaluation → text generation → tts → video sync → obs stream
↓ ↓ ↓ ↓ ↓ ↓
cli/chat priority filter llm api audio talking broadcast
response generation head
mirrorstage/
├── server/
│ ├── app.ts # main pipeline orchestrator
│ ├── config.ts # configuration management
│ ├── services/ # modular service implementations
│ │ ├── interfaces.ts # service interfaces
│ │ ├── OBSStream.ts # obs integration
│ │ ├── PipelineInitializer.ts
│ │ └── ...
│ ├── prompts/ # ai prompts and character definitions
│ └── utils/ # utilities and helpers
├── _assets/ # base video/audio files
├── _outputs/ # generated content
└── package.json
- implement the appropriate interface from
server/services/interfaces.ts - add service initialization in
PipelineInitializer.ts - update environment configuration in
config.ts
npm run lint- ensure obs websocket server is enabled
- check port and password match your .env settings
- verify obs is running before starting the service
- check api keys are valid
- ensure base video/audio files exist
- verify output directory has write permissions