Skip to content

Ghost Brain

AI-powered real-time voice interviewer bot โ€” conduct natural, sub-second latency conversations through phone calls or your local microphone.

Deploy Docs Python 3.12 License: MIT FastAPI Terraform


  • Real-time voice


    Achieve sub-second latency for natural conversations using the Pipecat real-time audio processing pipeline.

  • Phone integration


    Native support for Twilio telephony. Connect a phone number and let callers interact directly with the AI via WebSockets.

  • Cloud-native


    Deploy instantly to Google Cloud Run with zero-downtime scalability. Includes complete Terraform infrastructure-as-code setup.

  • Advanced AI stack


    Powered by Deepgram Nova-2 (STT), Llama 3.1 70B via Groq (LLM), and OpenAI TTS-1 for the most intelligent and natural voice synthesis.


Quick start

Test GhostBrain locally with your microphone โ€” no Twilio setup required.

Run locally
# 1. Install dependencies
pip install hatch pyaudio

# 2. Set up API keys in .env
cat > .env << 'EOF'
GHOST_BRAIN_DEEPGRAM_API_KEY="your-deepgram-key"
GHOST_BRAIN_GROQ_API_KEY="your-groq-key"
GHOST_BRAIN_OPENAI_API_KEY="your-openai-key"
GHOST_BRAIN_ANTHROPIC_API_KEY="your-anthropic-key"
EOF

# 3. Run local microphone test
hatch run python -m ghost_brain.local_mic_test
Provision infrastructure
# Deploy the entire stack using Terraform
cd terraform/environments/prod
terraform init
terraform apply -var="project_id=your-gcp-project"

Features at a glance

  • Automatic transcription


    Every conversation is automatically transcribed and uploaded to a secure Google Cloud Storage bucket when the call ends.

  • Intelligent File Splitting


    Post-call processing uses Anthropic Claude 3.5 Sonnet to intelligently parse your transcripts, split them by topic, and format them into beautiful Markdown templates (e.g. Daily Logs, Project Ideas) that are saved back to your cloud storage.

  • Decoupled Architecture


    Eventarc triggers a secondary serverless Cloud Run processor to analyze transcripts without stealing CPU or causing latency for live voice callers.

  • Local testing


    Develop and test completely locally using PyAudio or Daily WebRTC before ever deploying to the cloud.


Where to go next

  • Architecture

    Learn how the pipeline flows from audio capture to LLM response and TTS generation.

  • Setup Guide

    Deploy your own production Ghost Brain instance using Google Cloud and Twilio.

  • Local Testing

    Detailed guide on testing with your microphone and debugging the AI pipeline.

  • API Reference

    MkDocs-generated code documentation for all modules and pipeline runners.