danmuai  by PEPETII

AI danmaku assistant for Windows live streamers

Created 1 month ago
331 stars

Top 82.4% on SourcePulse

GitHubView on GitHub
Project Summary

Summary

PEPETII/danmuai is a Windows desktop application designed to assist live streamers by automatically generating danmaku (live chat messages) using AI. It captures screen content, processes it with various AI vision models, and displays the generated danmaku as a transparent overlay, prioritizing user privacy.

How It Works

The core architecture leverages Python 3.12 with FastAPI for a local Web API, pywebview (utilizing Windows WebView2) for the desktop shell, and PyQt6 for the danmaku overlay and system tray. Upon activation, the tool captures the full screen of a selected monitor. Screenshots are compressed in memory (JPEG, quality 85) and sent to a chosen AI provider via HTTP/2. The AI response, containing up to five danmaku messages, is then rendered as a scrolling, transparent overlay. This approach avoids disk I/O for screenshots and uses a thread pool for image processing and AI requests, preventing UI freezes.

Quick Start & Requirements

  • Installation: Clone the repository and install dependencies using pip install -r requirements.txt.
  • Running: Execute python main.py for the default Web console and Qt overlay experience. Use python main.py --web-browser to open the console in the system's default browser.
  • Prerequisites: Windows operating system is required due to the pywebview dependency on WebView2. Python 3.12 is recommended.
  • Configuration: API keys, endpoints, and model selections are managed via the Web console under "Assistant Settings."
  • Documentation: Detailed guides are available in docs/WEB_CONSOLE.md, docs/ARCHITECTURE.md, and docs/ROADMAP.md.

Highlighted Details

  • Multi-Provider Support: Integrates with numerous AI services, including Volcengine Ark (Doubao), Aliyun Bailearn (DashScope), Zhipu, Moonshot, SiliconFlow, and Xiaomi MiMo, supporting OpenAI-compatible endpoints.
  • Privacy-Focused Design: Screenshots are processed entirely in memory and are not saved to disk by default. API keys are encrypted using Fernet.
  • Web Console: Offers comprehensive control and monitoring, including runtime statistics, assistant settings, personality customization, danmaku history logs, and custom model management.
  • Overlay Customization: Features a transparent, always-on-top Qt overlay for danmaku display, configurable via the Web console.

Maintenance & Community

The project is described as being in "early active development," indicating potential for API and configuration changes. Contribution guidelines are provided in CONTRIBUTING.md, and community interaction is expected to follow CODE_OF_CONDUCT.md.

Licensing & Compatibility

  • License: Licensed under the GNU General Public License v3.0 or later (GPL-3.0-or-later).
  • Compatibility: The GPL-3.0 license imposes copyleft obligations, which may affect integration with closed-source or proprietary software. Commercial use is permitted under the terms of the GPL.

Limitations & Caveats

  • Platform Dependency: Primarily targets Windows due to its reliance on pywebview and WebView2.
  • Localization: The Web console UI is currently only available in Chinese.
  • Resource Management: Active network requests cannot be forcibly interrupted; the application waits for thread pool completion upon exit.
  • Feature Gaps: A visual selector for screen region selection is planned but not yet implemented.
Health Check
Last Commit

1 day ago

Responsiveness

Inactive

Pull Requests (30d)
5
Issues (30d)
2
Star History
94 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.