Native review-before-send dictation for Oh My Pi. Start recording inside the harness, stop, and get the transcript in your composer. Never auto-send. No separate proxy terminal.
This is the dictation product; codex-transcribe remains the independent authentication/transcription backend. The extension automatically installs a version-pinned backend and manages one shared local process across harness sessions.
Supported: Linux x86-64/ARM64, interactive Oh My Pi. Upstream Pi, macOS, RPC, and noninteractive modes are not advertised as supported.
You need:
- Your own Codex ChatGPT login: run
codex login. API-key-only login is not sufficient. - Node.js 22 or newer, FFmpeg with PulseAudio input support,
pactl,flock, andtaron PATH. No Go compiler or local recognition model. - PulseAudio or PipeWire-Pulse running, with a recording input.
- Network access to GitHub on first use to install the backend, and to OpenAI for transcription.
On Arch, recording/runtime packages can be installed with sudo pacman -S nodejs ffmpeg libpulse util-linux tar. On Debian/Ubuntu, use sudo apt install ffmpeg pulseaudio-utils util-linux tar and install Node.js 22+ using your preferred version manager.
Install directly from this repository:
omp install github:DaDecky/omp-dictationRestart omp, then use /dictate. First use downloads and verifies codex-transcribe v0.1.1, checks local credential presence, and starts the private backend automatically. The footer reports setup progress. Nothing records until prerequisites and backend readiness succeed.
For local development:
git clone https://github.com/DaDecky/omp-dictation.git
cd omp-dictation
omp install .A local install links the checkout: keep that directory. Alternatively, try one session with omp --extension /absolute/path/to/omp-dictation.
omp plugin uninstall codex-transcribe-dictation
omp install github:DaDecky/omp-dictationRestart omp to remove the old registrations and load the new product. You no longer need to start codex-transcribe manually. Existing independent proxies, Voxtype, and built-in Oh My Pi STT settings are not changed. If an independent foreground proxy is still running, it can be stopped manually in its own terminal; the extension never stops it.
/dictateor Ctrl+Alt+D starts recording; repeat to stop and transcribe./dictate cancelcancels setup, discards recording, or cancels a pending transcription.- Recording stops and transcribes at the 60-second audio limit; a 65-second wall-clock guard stops stalled capture.
- Transcript text is appended to the current draft, preserving text you type during transcription. Review/edit, then press Enter yourself.
- Switching sessions, branching, navigating the session tree, or shutting down cancels dictation and prevents a late response entering another session.
The shortcut is a toggle, not hold-to-talk: terminal key-release events are not reliable. Use the command if your terminal intercepts Ctrl+Alt+D.
The default is an extension-owned shared backend, not a listener assumed to exist on port 8378. It uses a dynamically allocated loopback port and a generated local bearer key. A lifetime lock prevents simultaneous clients starting separate backend processes. Only the extension's own worker/process state is managed; arbitrary listeners and stale PIDs are never killed. Cancelling one client does not terminate the shared backend for other clients.
The extension verifies the downloaded archive's SHA-256 before extraction and caches only the backend executable. It does not require systemd, run a shell profile, configure a service, replace binaries on PATH, or refresh your Codex credentials. Offline credential checks establish readable token presence—not account eligibility or token validity. Authentication is ultimately checked by OpenAI during transcription.
Set environment variables before launching omp:
| Variable | Default | Purpose |
|---|---|---|
CODEX_DICTATION_ENDPOINT |
Unset: automatic managed backend | Explicit external proxy origin; disables automatic backend startup |
CODEX_DICTATION_API_KEY |
Unset | Bearer key for an explicitly configured external proxy |
CODEX_DICTATION_INPUT |
default |
PulseAudio input name; list with pactl list short sources |
CODEX_DICTATION_LANGUAGE |
Unset | Optional language hint, e.g. en or pl |
Example using your own external backend:
CODEX_DICTATION_ENDPOINT=http://127.0.0.1:8377 CODEX_DICTATION_LANGUAGE=en ompExternal mode checks connectivity before recording but does not install/start/stop the external backend or inspect its local credentials. Use HTTPS for remote endpoints. Do not put a Codex OAuth token in CODEX_DICTATION_API_KEY: it is only the proxy's local bearer key. Redirects during transcription are refused.
The managed worker exits after 15 minutes without a successful preparation request, checked every 30 seconds. Closing a harness session does not stop the shared process immediately; another session can reuse it. The next /dictate restarts it automatically after idle shutdown.
The executable cache is $XDG_CACHE_HOME/omp-dictation (otherwise ~/.cache/omp-dictation). Private runtime state is $XDG_RUNTIME_DIR/omp-dictation when available, otherwise a private runtime directory in the cache. OMP_DICTATION_CACHE_DIR overrides both cache and runtime location, useful for isolated verification. Runtime state includes a local bearer key; do not publish it. Simultaneous clients using different credential-file paths fail rather than silently sharing another client's credential selection.
Recording starts only after an explicit command or shortcut and successful prerequisite checks. WAV audio is mono 16 kHz PCM, held in a private temporary directory, and removed after normal completion, failure, or cancellation. A crash or forced process kill can leave codex-dictation-* directories in your system temporary directory.
Audio is uploaded through the backend to OpenAI's unofficial private ChatGPT transcription endpoint. Access, subscription coverage, and pricing are not guaranteed; the endpoint can change without notice. Use your own account and comply with the service's terms. Cancelling cannot retract audio already uploaded. OpenAI controls remote retention. The extension does not log audio, transcripts, or OAuth credentials. Transcripts enter conversation history only when you submit the draft.
- Missing recording tools/server/input: install the named dependency, start PulseAudio/PipeWire-Pulse, or choose a source shown by
pactl list short sources. A monitor source captures system playback instead of your microphone. No recording starts on a failed preflight. - Missing login: run
codex login, then try again. The backend uses its standardCODEX_HOME/CODEX_TRANSCRIBE_AUTH_FILEcredential selection. Never attach auth-file contents to an issue. - Download/install failure: check GitHub connectivity, cache permissions, Node.js version,
flock, andtar. A checksum mismatch is rejected, not bypassed. - External backend unavailable: start your explicitly selected proxy or unset
CODEX_DICTATION_ENDPOINTto use automatic management. - HTTP 401/502: check the local external-proxy key or refresh the Codex login using Codex. Report sanitized status/error code, not tokens or recordings.
- No speech: the existing draft remains unchanged; check input selection.
- Busy: wait or use
/dictate cancelbefore starting a new recording.
Uninstall with omp plugin uninstall omp-dictation and restart omp. Uninstalling the extension does not modify other proxies, login files, or recording clients.
npm test
npm packNo npm runtime dependencies or compilation step. CI tests behavior and packages the same files users install; version tags publish a tarball and checksum to GitHub Releases.
Verified on Linux x86-64 with omp 18.8.6 and automatically downloaded codex-transcribe v0.1.1:
- Four independent simultaneous Node clients using an empty isolated cache downloaded the pinned release and shared one authenticated backend.
- In the actual omp TUI with another empty cache,
/dictateinstalled/started its own backend, captured the public JFK sample through a dedicated virtual PulseAudio input, and inserted the real ChatGPT transcript below an existing draft. No manual backend terminal or automatic message submission. - Real prerequisite checks accepted the virtual source and rejected a nonexistent source; missing local credentials failed with a login instruction.
- 29 behavioral tests cover shared startup, cancellation while another client installs, ownership boundaries, backend exit/restart, orphan recovery, idle expiry, download/integrity failures, external readiness/authentication, and recording/subprocess cleanup.
The smoke checks did not use a real microphone or change default audio devices, existing proxy listeners, Voxtype, or built-in STT settings. ARM64 and other harness versions have not received a native authenticated smoke run.
MIT; see LICENSE.