Skip to main content

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

Metadata

Release files for rism 0.1.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for rism 0.1.2
File Size Uploaded Provenance Actions
rism-0.1.2.tar.gz 5.1 MB Without provenance Details for rism-0.1.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for rism 0.1.2
File Interpreter ABI Platform Actions
rism-0.1.2-py3-none-any.whl Python 3 none any Details for rism-0.1.2-py3-none-any.whl

Total release size: 10.0 MB

Release files / rism-0.1.2.tar.gz

Download URL rism-0.1.2.tar.gz
Size 5.1 MB
Tags Source
SHA-256 checksum
How to use checksums
d3baad6a304d35e5ee88c7d6c082f88e7f6427acc02b1bcc409ec648b31ff567
BLAKE2b-256 checksum
How to use checksums
9da30df4c6894f3aac5301b89fc0591c931ff9166df2a4dbd568c813927cd602
Upload date
Uploaded using Trusted Publishing?
What is 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}

Release files / rism-0.1.2-py3-none-any.whl

Download URL rism-0.1.2-py3-none-any.whl
Size 4.9 MB
Tags Python 3
SHA-256 checksum
How to use checksums
8b1031370a4ef3c0e7274e537d190c990db618578b0b44826d0592e6df86b5dd
BLAKE2b-256 checksum
How to use checksums
39769e0a1cc70fe0954574be0ed293b36354867876aa4a5093fe488af836df4d
Upload date
Uploaded using Trusted Publishing?
What is 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}

Security for rism 0.1.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page