Skip to content

Expose dictation control and state through Pi's extension event bus #6

Description

@tkoenig

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions