latishab's picture
Update TARS Conversation App with TarsApp framework
e8ed0e1 verified

TARS Source Code

Python source code for TARS voice AI.

Structure

src/
β”œβ”€β”€ tools/           # LLM callable functions (robot, persona, vision)
β”œβ”€β”€ services/        # Backend services (STT, TTS, memory, robot control)
β”œβ”€β”€ processors/      # Pipeline frame processors
β”œβ”€β”€ observers/       # Pipeline observers
β”œβ”€β”€ transport/       # WebRTC transport layer
β”œβ”€β”€ character/       # TARS personality and prompts
└── config/          # Configuration management

Entry Points

Entry point scripts are in the project root:

  • bot.py - Browser mode (web UI)
  • tars_bot.py - Robot mode (RPi connection)
  • pipecat_service.py - FastAPI backend for browser mode

Imports

All entry points add src/ to the Python path automatically:

import sys
from pathlib import Path
sys.path.insert(0, str(Path(__file__).parent / "src"))

# Now you can import from src/ directories
from tools import execute_movement
from services import tars_robot
from config import DEEPGRAM_API_KEY

Documentation

Each directory contains a README.md explaining its purpose:

Not Source

This directory is for Python source code only:

  • Web UI files are in web/
  • Documentation is in docs/
  • Scripts are in scripts/
  • Assets are in assets/