Streaming Hub 0.1

Stop or mute Piper TTS from Stream Deck

Add a Stream Deck emergency-stop button for donation speech, then extend it into a persistent Piper on/off toggle.

Alpha
IntermediateStream DeckPiper TTSUpdated 2026-07-26

Result

The donation reaction from the previous guide can read a viewer's message aloud through Piper. If the message contains something you do not want on stream, you need a control that works immediately without finding Streaming Hub on the desktop.

In this guide, you will add a Stream Deck button that:

  • stops the speech currently playing;
  • switches future Piper donation speech off;
  • switches donation speech back on when pressed again.

The emergency stop works as soon as the first action is added. The persistent mute is an optional extension built with a Boolean variable.

Before you start

Complete React to donations in OBS with animation and Piper TTS first. Its Donation Reaction automation and Piper Speak action are modified near the end of this guide.

You also need:

  • an Elgato Stream Deck or a compatible Ajazz controller running StreamDock;
  • the matching Streaming Hub connector installed in the controller application;
  • the Stream Deck bridge enabled in Streaming Hub;
  • Piper configured and working.

Step 1. Install the controller connector

Download the matching package:

For Elgato, close or save any unfinished profile edits, then open the .streamDeckPlugin file and approve the installation in the Stream Deck application.

For Ajazz/StreamDock, extract the ZIP and install the included .sdPlugin folder through the StreamDock plugin workflow. If your StreamDock version does not provide an import command, close StreamDock and copy the extracted folder into:

%AppData%\Hotspot\StreamDock\plugins\

Then restart the controller application. A Streaming HUB or Streaming Hub category should appear in its action list.

Step 2. Enable the Streaming Hub bridge

In Streaming Hub, open Services → StreamDeck / Local. Enable the StreamDeck Bridge if it is disabled.

The connector needs two values from this page:

  • URL, available through Copy URL;
  • Token, available through Copy Token.

The default URL uses the configured Port and Path, for example:

ws://127.0.0.1:17171/streamdeck/
Enable the local bridge and copy its URL and token into the controller connector.

Step 3. Configure a Connection button

In the Elgato Stream Deck or StreamDock application:

  1. Add a new Streaming Hub Connection action to an unused button.
  2. Paste the copied value into Hub URL.
  3. Paste the copied value into Token.
  4. Select Save.

When the connector reaches Streaming Hub, the button title changes to:

HUB_OK

If it does not connect, use Test in the controller settings and Run Self-test or Open Diagnostics in Streaming Hub.

The same Hub URL and token are used by the Elgato and StreamDock connector versions.

Step 4. Create the stop button

Add another Streaming Hub action to the controller:

SettingValue
ActionSignal
Button IDpiper_stop

The Button ID is the contract between the physical button and the Streaming Hub automation. It is an arbitrary identifier, but both sides must use exactly the same spelling.

Step 5. Receive the button release in Streaming Hub

Create a new automation named Piper_Stop.

Select the StreamDeck Button Up signal and set:

FieldValue
Button IDpiper_stop

Button Up runs when you release the key, producing one deliberate trigger after the press.

Press the physical button once. Even while the default Log action is still present, the Logs should show that the Piper_Stop automation started.

Step 6. Stop the current speech

Delete the default Log action and add Piper Stop Speech.

Test the result:

  1. Start a Piper speech action or trigger a donation test containing a message.
  2. While Piper is speaking, press the piper_stop Stream Deck button.
  3. The current speech should stop immediately.

At this point, the emergency stop is complete. A later donation can still start a new speech request.

Step 7. Create a persistent Piper state

To keep donation speech disabled until you explicitly enable it again, create a project variable:

FieldValue
Namepiper_talk
TypeBool
Initial valuetrue

true allows donation speech. false blocks it.

Step 8. Toggle the variable safely

After Stop Speech, add an If branch:

LeftOperatorRight
vars.piper_talkEqualstrue

Inside the If branch, add Set Variable:

FieldValue
Target Pathvars.piper_talk
Valuefalse

Add an Else branch with another Set Variable:

FieldValue
Target Pathvars.piper_talk
Valuetrue

The finished structure is:

Stop Speech
If vars.piper_talk Equals true
  Set vars.piper_talk to false
Else
  Set vars.piper_talk to true
End If
The emergency Stop Speech action runs first, followed by one safe If/Else toggle branch.

Step 9. Gate donation speech with the variable

Open the Donation Reaction automation from the previous guide. Select its Piper Speak action and update the run condition to:

{event.payload.message}!=event.payload.message AND {vars.piper_talk}==true

The two parts have separate jobs:

  • {event.payload.message}!=event.payload.message allows Piper only when DonationAlerts supplied a real message;
  • {vars.piper_talk}==true allows Piper only while the Stream Deck toggle is enabled.

The rest of the donation reaction still runs while Piper is muted: OBS text updates, the animation plays, the filter changes, and the scene returns normally.

Verify the complete control

Test the full behavior in this order:

  1. Confirm that piper_talk starts as true.
  2. Trigger a donation message and confirm Piper speaks.
  3. Press piper_stop while it is speaking. The current speech should stop and piper_talk should become false.
  4. Trigger another donation. The visual reaction should run without speech.
  5. Press piper_stop again. piper_talk should become true.
  6. Trigger one more donation and confirm that speech is enabled again.

Watch the Variables panel and Logs during testing to confirm which branch runs.

If it does not work

  • The Connection button does not show HUB_OK: confirm that the bridge is enabled, paste the complete WebSocket URL, verify the token, and restart the bridge.
  • The controller category is missing: install the package made for your controller application, then restart that application.
  • Pressing the key produces no log entry: confirm that both Button IDs are exactly piper_stop and that the signal is Button Up.
  • Speech does not stop: verify that the first action is Piper Stop Speech and that the Piper service is running.
  • Speech starts again on the next donation: this is expected until you add piper_talk to the Piper Speak condition.
  • The variable always returns to true: replace consecutive conditional Set Variable actions with the If/Else structure from Step 8.
  • Piper never speaks again: verify that piper_talk is a Bool, inspect its current value, and copy the combined condition exactly.

Adapt it

  • Add a text or status action so the Stream Deck key displays TTS ON and TTS OFF.
  • Use separate variables for donation TTS and ordinary chat TTS.
  • Add another emergency button that stops an entire automation or clears a speech queue.
  • Replace the toggle with two explicit buttons—Mute Piper and Enable Piper—if you prefer controls whose effect never depends on the current state.
  • Put several emergency controls on one Stream Deck page: stop speech, mute alerts, return to a safe OBS scene, and disable selected automations.

Related

Download the ready-made script

Import it into Streaming Hub, then follow this guide to add your own variables and connect the required services.

Download the Piper stop script