I'm currently writing a Stream Deck plugin for Pi and would like to use pi-transcribe for dictation. Its accompanying Pi extension needs a small way to start or stop dictation and reflect the current state without simulating keyboard input or adding a separate transport.
Pi already provides pi.events for communication between extensions in the same process, so this can remain a small, generic integration rather than something specific to the Stream Deck plugin.
Proposed contract
-
Listen for pi-transcribe:toggle and run the same toggle path as the configured shortcut.
-
Emit pi-transcribe:state with a plain payload:
{ state: "starting" | "recording" | "transcribing" | "idle" }
-
Emit the initial idle state when a session starts and return to idle after cancellation, errors, and shutdown.
-
Bind event handling to the active ExtensionContext and remove the listener during session shutdown.
The contract would stay intentionally small and generic. Existing shortcut behavior would remain unchanged.
I'll follow up with a focused PR implementing this contract, which I'm already using with my Stream Deck extension.
I'm currently writing a Stream Deck plugin for Pi and would like to use pi-transcribe for dictation. Its accompanying Pi extension needs a small way to start or stop dictation and reflect the current state without simulating keyboard input or adding a separate transport.
Pi already provides
pi.eventsfor communication between extensions in the same process, so this can remain a small, generic integration rather than something specific to the Stream Deck plugin.Proposed contract
Listen for
pi-transcribe:toggleand run the same toggle path as the configured shortcut.Emit
pi-transcribe:statewith a plain payload:Emit the initial
idlestate when a session starts and return toidleafter cancellation, errors, and shutdown.Bind event handling to the active
ExtensionContextand remove the listener during session shutdown.The contract would stay intentionally small and generic. Existing shortcut behavior would remain unchanged.
I'll follow up with a focused PR implementing this contract, which I'm already using with my Stream Deck extension.