Skip to main content

A zero-latency, AI-powered cloud moderation proxy for live streamers using Vision Agents (Realtime Intelligent Stream Moderator).

Project description

RISM: Realtime Intelligent Stream Moderator

Python Vision Agents CLI

📋 Table of Contents

  1. Overview
  2. How It Works
  3. Features
  4. Prerequisites
  5. Installation
  6. Configuration
  7. Getting Started (OBS Guide)
  8. Uninstalling

🚀 Overview

RISM (Realtime Intelligent Stream Moderator) is a zero-latency, AI-powered "Cloud Proxy" built for live streamers. It intercepts your raw video stream before it reaches the public, utilizing the Vision Agents framework to process audio and video in real-time.

RISM acts as an automated digital bodyguard: it bleeps profanity, blurs NSFW content, and intelligently monitors context to protect your channel from ToS violations, outputting a clean, brand-safe feed to platforms like YouTube or Twitch.

🔄 How It Works

RISM uses a clever 3-Stage "Cloud Proxy" architecture. The secret to its seamless performance is a strict 2-second processing buffer. This invisible delay ensures the AI has time to analyze the content and maintain perfect audio/video synchronization.

  1. Ingestion (The Origin): Stream directly from your OBS to RISM via the WebRTC HTTP Ingestion Protocol (WHIP).
  2. The Moderation Engine (The Proxy): The stream is forked into three parallel AI pipelines:
    • Video: YOLO11 continuously scans for and blacks out NSFW visual content.
    • Audio: Deepgram STT listens for blocklisted profanities and injects a 1000Hz bleep mask dynamically.
    • Context: Gemini 2.5 Flash monitors the overall situation for complex Terms of Service violations.
  3. Egress (The Destination): The cleaned, fully moderated tracks are automatically muxed back into a standard RTMP feed and pushed to your actual YouTube/Twitch stream key.

✨ Features

  • Pure CLI Experience: Installs globally as an executable tool. No heavy GUIs required.
  • Near-Zero Latency: Built on ultra-fast WebRTC edge networks.
  • Perfect A/V Sync: The custom jitter buffer guarantees your bleeps and blurs happen at the exact right millisecond.
  • Bring-Your-Own "Brain": Powered by standard API keys from GetStream, Gemini, and Deepgram.
  • Pre-bundled Models: Comes with an edge-optimized YOLO NSFW detection model ready out of the box.

📋 Prerequisites

Infrastructure Requirements

  • Python 3.12+
  • uv (The fast Python package installer and resolver)
  • Free accounts for GetStream, Google AI Studio (Gemini), and Deepgram.

Application Requirements

  • OBS Studio (v30+ supporting native WHIP output)
  • Your YouTube (or Twitch) Stream Key

📥 Installation

Because RISM is packaged as a standard CLI tool, installation is a single command. Use uv to install it globally without messing with your local Python environments:

uv tool install rism

(Alternatively, if you are developing, clone this repo and run uv pip install -e .)

⚙️ Configuration

RISM needs your API keys to power its 3-stage brain. Navigate to the folder where you want to run your stream from, and create a .env file with the following keys:

# GetStream API Key (https://getstream.io/video/docs/python-vision/)
STREAM_API_KEY="..."
STREAM_API_SECRET="..."

# Google Gemini API Key (https://aistudio.google.com/)
GOOGLE_API_KEY="..."

# Deepgram API Key (https://console.deepgram.com/)
DEEPGRAM_API_KEY="..."

# Your YouTube Stream Key for RTMP Egress
YOUTUBE_STREAM_KEY="..."

Note: RISM has a built-in safety check. If you forget a key, it will instantly tell you which one is missing and safely exit.

🎬 Getting Started (OBS Guide)

Using RISM is incredibly simple. It takes less than 30 seconds to start your proxy stream.

1. Start the Moderation Engine

Open your terminal in the directory containing your .env file and type:

rism run --no-demo

RISM will warm up its AI models, connect to the edge network, and present you with a beautiful CLI box containing your WHIP URL and a Bearer Token.

2. Connect OBS

  1. Open OBS Studio.
  2. Go to Settings > Stream.
  3. Change Service to WHIP.
  4. Paste the URL and Bearer Token exactly as outputted by RISM.
  5. Click Start Streaming.

3. You are Live!

As soon as OBS connects, RISM will lock onto your signal, ingest your frames, run the moderation pipelines, and instantly route the safe stream out to the YOUTUBE_STREAM_KEY you provided.

🗑️ Uninstalling

Decided to turn off your digital bodyguard? Cleanly remove the tool and its entire isolated environment with one command:

uv tool uninstall rism

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

rism-0.1.2.tar.gz (5.1 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

rism-0.1.2-py3-none-any.whl (4.9 MB view details)

Uploaded Python 3

File details

Details for the file rism-0.1.2.tar.gz.

File metadata

  • Download URL: rism-0.1.2.tar.gz
  • Upload date:
  • Size: 5.1 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for rism-0.1.2.tar.gz
Algorithm Hash digest
SHA256 d3baad6a304d35e5ee88c7d6c082f88e7f6427acc02b1bcc409ec648b31ff567
MD5 041a13aca9f92c71a3aa4fe62e5a2fdf
BLAKE2b-256 9da30df4c6894f3aac5301b89fc0591c931ff9166df2a4dbd568c813927cd602

See more details on using hashes here.

File details

Details for the file rism-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: rism-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.9 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.6 {"installer":{"name":"uv","version":"0.10.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for rism-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 8b1031370a4ef3c0e7274e537d190c990db618578b0b44826d0592e6df86b5dd
MD5 f5a5bad45a7edbe2c07e1872d33c2624
BLAKE2b-256 39769e0a1cc70fe0954574be0ed293b36354867876aa4a5093fe488af836df4d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page