omp packages

pi-codex-voice0.2.0

Native Codex realtime voice bridge for an existing Pi coding session.

fufudev Published 17 days ago MIT ~187 downloads/mo

Untested on omp

This is a pi package. No one has reported whether it works on omp yet. If you try it, add your result below.

Did it work for you?

Result

One report per person. A new report replaces your old one.

Reports 0

No reports yet.

Readme

pi-codex-voice

Native realtime voice for an existing Pi coding session.

This Pi package adds /voice, a terminal-native voice conversation that uses the signed-in Codex/ChatGPT realtime voice transport for listening and speaking, while routing actual coding work into the current Pi session.

What it does

  • Starts/stops voice with /voice inside Pi's TUI.
  • Captures microphone audio and plays model audio through PipeWire (pw-cat).
  • Reuses codex login authentication; it does not require OPENAI_API_KEY.
  • Sends delegated coding/project/reasoning requests to the current Pi session with pi.sendUserMessage(...).
  • Keeps Pi responsible for model choice, working directory, tools, context, and approvals.
  • Speaks concise progress/final results back through the realtime voice session.

How it works

Architecture, simplified:

You speak
  -> Codex/ChatGPT realtime voice session hears and decides whether to delegate
  -> this package intercepts client delegations before stock Codex can execute them
  -> the request is delivered to the current Pi session
  -> Pi runs normally using its configured model/tools/context
  -> Pi's progress/final visible answer is sent back to voice
  -> voice speaks the result

This is a bridge, not a single fused model. The voice layer handles audio and turn-taking. Pi handles coding work. If Pi is currently using another model, delegated coding work uses that Pi model; the voice layer remains the realtime voice model.

The delegation interception is version-pinned to Codex CLI 0.160.0. Unknown protocol shapes fail closed rather than silently letting Codex's own coding backend run the task.

Requirements

  • Pi 1.0.0.
  • Codex CLI 0.160.0, signed in with codex login to a ChatGPT account.
  • Linux with PipeWire and pw-cat.
  • Node 24+.
  • Python with venv support for the package-local WebRTC audio worker.

Install

pi install npm:pi-codex-voice

Then run the package's audio setup from the installed package directory:

pi list              # find the resolved package directory
cd <pi-codex-voice package directory>
npm run setup:audio

For a local checkout:

npm ci --ignore-scripts --legacy-peer-deps
npm run setup:audio
pi install /absolute/path/to/pi-codex-voice

Then restart Pi or run /reload in an existing Pi session.

Commands

Command / shortcut Behavior
/voice Start voice; if already running, stop it
/voice stop Stop microphone, speaker, realtime transport, and child processes
/voice mute / /voice unmute Stop/restart microphone capture while keeping the session connected
/voice status Refresh status and request audio diagnostics
/voice steer While Pi is busy, deliver spoken corrections as steering messages
/voice followup While Pi is busy, queue spoken requests as follow-ups
Ctrl+Alt+V Toggle microphone mute

Privacy and security notes

  • Starting /voice explicitly opens the microphone.
  • Muting stops local capture and sends silence.
  • No microphone/audio/transcript recordings are written by this package.
  • Codex manages account credentials; this package does not read credential files or log auth headers.
  • Spoken text, delegated task text, concise session context, and Pi results are sent to the voice service.
  • This is experimental and account/service entitlement, quota, and billing behavior are not guaranteed.

Validation

Current checkout validation:

  • npm test: 7 passing tests for RPC handling, sideband delegation filtering, Pi command routing, mute/stop cleanup, and result correlation.
  • scripts/smoke-native.py: real native round-trip test using Pi in a pseudoterminal, authenticated WebRTC voice, and prerecorded public audio fixture. See evidence/native-result.json.

More detail

See IMPLEMENTATION.md for implementation details, lifecycle/security notes, and validation results. The original research handoff is preserved in RESEARCH.md.