lunar_tools  by lunarring

Python toolkit for interactive exhibits

created 1 year ago
290 stars

Top 91.7% on sourcepulse

GitHubView on GitHub
Project Summary

Lunar Tools is a Python toolkit designed for creating interactive exhibitions, offering modular components for handling audio, video, MIDI, AI interactions, and communication. It aims to simplify the development process for exhibitors and provide a seamless experience for visitors.

How It Works

The toolkit provides high-level abstractions for common interactive exhibition tasks. It leverages libraries for audio recording/playback, webcam access, MIDI input processing (with support for mapping controls to variables), real-time rendering of various image formats (including direct GPU rendering), and speech-to-text/text-to-speech capabilities powered by OpenAI and ElevenLabs. Communication is facilitated via ZMQ for bidirectional data and image streaming, and OSC for sending/receiving messages.

Quick Start & Requirements

  • Install via pip: python -m pip install git+https://github.com/lunarring/lunar_tools
  • Ubuntu dependencies: sudo apt-get install libasound2-dev libportaudio2
  • API Keys for OpenAI, Replicate, and ElevenLabs can be set as environment variables (e.g., OPENAI_API_KEY="XXX").
  • Supports Python >= 3.10.

Highlighted Details

  • Real-time voice interaction with OpenAI models, supporting custom instructions, voice selection, and callbacks for transcription events.
  • Direct GPU rendering for Torch tensors, NumPy arrays, and PIL Images without CPU transfer.
  • MIDI input handling with configurable button modes (toggle, held_down, pressed_once, released_once) and slider value mapping.
  • ZMQ-based remote streaming for displaying generated images on separate machines, with automatic JPEG compression.
  • Built-in FPS tracker and logging utilities.

Maintenance & Community

  • The project is maintained by lunarring.
  • Links to community channels or roadmaps are not explicitly provided in the README.

Licensing & Compatibility

  • The README does not specify a license. Compatibility for commercial use or closed-source linking is therefore undetermined.

Limitations & Caveats

  • MIDI device configuration requires manual YAML file creation for unsupported devices.
  • The README mentions that in-depth guides for MIDI configuration are "coming soon."
  • No explicit license is stated, which may pose a barrier for commercial adoption.
Health Check
Last commit

3 days ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
0
Star History
0 stars in the last 90 days

Explore Similar Projects

Feedback? Help us improve.