Skip to main content

An event-based desktop automation tool for Windows, Linux, and macOS.

Project description

Stagehand

Stagehand is a collection of tools that help automate and streamline your OBS experience.

Installation

Stagehand is developed primarily on Windows 10, and has been lightly tested on Ubuntu 20.04. In theory, there's no reason it won't also work on MacOS, but I don't currently have plans to support Macs.

Latest development build:

Stagehand is also perfectly happy to execute from source. This requires git, Python 3, and GNU Make to be installed(Ubuntu systems also need the python3-venv package, for some reason). Simply clone the repo and run it as follows:

git clone git@github.com:DaelonSuzuka/Stagehand.git
cd Stagehand
make run

Ubuntu 20.04 (and presumably other distros) don't have portaudio installed by default. The python audio library I use(sounddevice) includes a copy of portaudio on Windows, but on Linux (and Mac), you'll have to install portaudio using your package manager.

Action System

The core idea of Stagehand is actions. An action has 3 parts: trigger, filter, and output. A trigger is some external event that causes an action to activate. Filters can prevent an action from activating based on some condition. Output is what the action actually does.

Stagehand itself only has one trigger, one filter, and one output. All additional functionality is provided by a robust plugin system.

Sandbox Plugins

Plugins can register one or more triggers, filters, or outputs, which are made available for use both in Stagehand's UI and in the Sandbox's execution environment.

Stagehand comes standard with a number of plugins:

  • OBS remote control
  • Microphone Voter
  • Web Actions
  • Joystick
  • Keyboard
  • Physical Input Device Support, including
    • Stomp4 pedals
    • Stomp5 pedals
    • Click4 switches

OBS Websocket Connection

Stagehand connects to OBS Studio using Palakis' excellent obs-websocket plugin.

By default, Stagehand looks for an obs-websocket server at localhost:4444. It's no problem if OBS is running on a different computer or you defined a custom port for the obs-websocket server, just update the fields in the OBS Manager tab.

Stagehand also supports password authentication for obs-websocket.

Stagehand will attempt to connect to the websocket at startup. This behavior can be disabled by unchecking the 'Connect on Startup' box.

Microphone Voter

It's possible that I'm the only person with this problem, but my streaming/video call setup has 3 microphones. There's a desk mic on an arm for when I'm sitting at my pc, there's a second desk mic on an arm for when I'm at my electronics workbench, and there's a mic on my wireless headset. If I don't mute the 2 I'm not actively using, then my outbound audio gets a nasty echo from two/three mics picking up the same sounds. I try to keep the inactive mics muted, but I often forget to change the mute settings when moving back and forth between my computer and workbench.

Stagehand's Microphone Voter solves this by monitoring my microphone audio, calculating which mic is currently the loudest, and sending commands to OBS to mute/unmute the proper mics.

I can even use this in discord/zoom/whatever calls by using OBS to route my audio devices to the input of a VoiceMeeter Virtual Audio Cable, and using the output of that Virtual Audio Cable as my 'microphone' in discord.

Roadmap

  • Documentation
  • Examples and usage

Sandbox Action Examples

Don't let the limited number of built-in actions fool you, they're actually extremely powerful.

Pretty much the simplest action in any language is to print 'hello world', so let's start with that.

editing actions

Actions aren't limited to only one line, simply press the edit button to pop out the multiline editor.

editing actions

Actions can do a lot more than just print. The sandbox is a full python execution environment.

editing actions

The sandbox is an isolated environment, and code is checked for errors before being executed. Typos and syntax errors aren't going to crash Stagehand.

editing actions

Stagehand has more tools available than just running code snippets directly. Data persistence allows you to write complex actions that just aren't possible on other platforms.

editing actions

Plugin Examples

The keyboard plugin provides a trigger that listens for key presses and an output that can simulate keypresses in your system.

editing actions

OBS Manager

OBS Websocket Controls

Workflow

Copy/Paste

editing actions

Reset actions with one click

editing actions

Rename actions with a double click

editing actions

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

stagehand-0.1.0.tar.gz (1.5 MB view details)

Uploaded Source

Built Distribution

stagehand-0.1.0-py3-none-any.whl (483.0 kB view details)

Uploaded Python 3

File details

Details for the file stagehand-0.1.0.tar.gz.

File metadata

  • Download URL: stagehand-0.1.0.tar.gz
  • Upload date:
  • Size: 1.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.11

File hashes

Hashes for stagehand-0.1.0.tar.gz
Algorithm Hash digest
SHA256 6c0b7d292710545c28d78fd1e2c72c10469e2b8c14211fc831b3eff9c9f8ab0c
MD5 5a19af2190faf6ae404ea7c235aa21a8
BLAKE2b-256 ae68136c5ee8e20336ce72a7021ed3c0a7f729796c1988d051b91b6bd7c13855

See more details on using hashes here.

File details

Details for the file stagehand-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: stagehand-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 483.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.10.11

File hashes

Hashes for stagehand-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f8b2340eb1f145fb08585c3e5e219893ac07d597f9bd3b7c4535bda43d4b32fe
MD5 656521768d4b18191cc8e2fefb9fbcfd
BLAKE2b-256 72ed876f4b8a72eff9f5466bd6f1aa76190da58ee3cc3654111c6559b245956e

See more details on using hashes here.

Supported by

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