# Set up Voice Agent with OpenAI Realtime or xAI Grok

> Connect your own OpenAI or xAI API key to direct Standard and terminal panes by voice, dictate instructions translated to technical English, and control session access and action confirmations.

- **Category:** Setup and safety
- **Updated:** 2026-12-01
- **Reading time:** 8 min
- **Canonical page:** https://cmdbrief.com/guides/voice-agent-setup

## Quick verdict

- Bring your own **OpenAI** (Realtime or GPT-Live) or **xAI (Grok)** API key — provider usage is billed separately by the vendor, and language availability and accuracy vary by provider.
- Voice Agent directs both **Standard panes and terminal panes**, while composer dictation can live-translate any spoken language into technical English (`gpt-realtime-translate` or OpenRouter models) without saving dictated audio or text to Voice History.
- Voice starts in **Look only**. Switch to **Ask before acting** to require local confirmation before actions run, or **Look and act** for hands-free control; **opening a remote website always requires confirmation** either way.

## What you get

- **Your microphone & CmdBrief:** Directs Standard panes and terminal panes across workspaces; Dictates in your language or live-translated technical English; Session-scoped read grant + local Voice History action log
- **OpenAI or xAI (your API key):** OpenAI Realtime, OpenAI GPT-Live (`store: false`), or xAI Grok; Optional OpenRouter models for upload dictation & translation; Billed directly on your provider account (not CmdBrief)
- **Your microphone & CmdBrief → OpenAI or xAI (your API key):** live audio and session-scoped tool results
- **OpenAI or xAI (your API key) → Your microphone & CmdBrief:** spoken replies, transcripts, and proposed actions
- **Connection:** Direct to the provider whose key you configure; no CmdBrief voice proxy

CmdBrief’s Voice surface combines two tools under **Settings › Voice**: a live **Voice Assistant** that reads your workspaces and directs your agents, and **Dictation** right inside every Standard chat and terminal composer. Voice usage is **not** included in [CmdBrief Pro](https://cmdbrief.com/pricing) — you supply your own OpenAI, xAI, or OpenRouter API key, and provider usage is billed separately by that provider.

> **Warning:** OpenAI (Realtime & GPT-Live) or xAI (Grok) for the voice assistant; OpenAI or OpenRouter for dictation. Each provider requires your own API key and bills usage separately. Language availability and accuracy vary by provider.

## Voice assistant and dictation providers

| Mode / Provider | Models & behavior | Key required |
| --- | --- | --- |
| OpenAI Realtime | Single speech-to-speech model (`gpt-realtime-2.1-mini` or `gpt-realtime-2.1`) hears, thinks, and speaks. | OpenAI key (`OPENAI_API_KEY`) |
| OpenAI GPT-Live | Voice model handles speech and delegates reasoning/tool choices to a Responses thinking model (`GPT-5.6 Terra` default, `GPT-6 Sol`, `GPT-6 Luna`). Pins `store: false` so OpenAI does not retain a recording. | OpenAI key (`OPENAI_API_KEY`) |
| xAI Grok Realtime | Always runs Grok’s newest voice model for live conversation and tool calls. | xAI key (`XAI_API_KEY`) |
| OpenAI Dictation | **English** streams through `gpt-realtime-translate`; **My language** uses `gpt-live-transcribe` or `gpt-transcribe`. | OpenAI key (`OPENAI_API_KEY`) |
| OpenRouter Dictation | Uploads phrases after a ~0.7 s pause to `microsoft/mai-transcribe-2`, `elevenlabs/scribe-v2`, `meta/muse-voice-transcribe-1.0`, `google/gemini-3.5-transcribe`, or a custom id, with optional **Transcribe, then translate** to English. | OpenRouter key (`OPENROUTER_API_KEY`) |

*All API keys are stored in your local secret store (macOS Keychain or private 0600 files on Linux/Windows) or read from environment variables.*

## Add your API key and configure audio

**Step 1 of 4 · You do this** (Settings › Voice)

1. Click the **microphone button** beside Attach in any composer (or open **Settings › Voice**). When no key is configured yet, CmdBrief opens the 4-step **Set up voice** modal — or click **Set it up by hand instead** for the full page.
2. Choose what you want to use (Dictation, Assistant, or both), pick your language and provider (**OpenAI Realtime**, **OpenAI GPT-Live**, or **xAI Grok**), and paste your API key under **API keys**. Keys are saved straight to your OS secret store (see [Managed SSH and secrets](https://cmdbrief.com/guides/managed-ssh-and-secrets)) and never written into `settings.json`.
3. Use **Try dictation** inside the setup modal to test recognition without typing into a real agent pane, then click **Finish**.
4. Under **Mic button in chats**, choose whether the composer mic opens **Dictation** (default) or the **Assistant** (the sidebar card and floating bubble always open the Assistant).
5. Leave **Microphone** on **Automatic** unless you want a pinned input: when your system default is a Bluetooth headset, Automatic uses your Mac’s built-in mic so your headphones stay in full stereo instead of dropping to call quality.

On macOS, the assistant uses Apple’s `VoiceProcessingIO` audio unit for full-duplex echo cancellation so you can interrupt it mid-sentence (barge-in) even on speakers. Dictation also enables **Ignore sound from this Mac** by default (using a macOS Core Audio process tap + AEC3 echo canceller) so videos or streams playing on your speakers are stripped out before transcription.

**Check it worked**

| Where | Run or do | Pass |
| --- | --- | --- |
| Settings › Voice | Check the Dictation and Assistant status cards at the top | Each configured tool shows **Ready**, and API keys show Keychain or environment variable as their source. |

## Direct Standard and terminal panes by voice

**Step 2 of 4 · You do this** (Voice panel or floating voice bubble)

Voice Agent can inspect your active window focus, selected workspace, and every open agent pane — both **Standard panes** (`view: standard`) and **terminal panes** — across all supported CLIs (see [Connect your 7 coding agent CLIs](https://cmdbrief.com/guides/connect-agent-clis)). Roughly 30 local tools let it:

- **Read and message agents:** read conversation or terminal output (`read_pane`), send prompts (`send_prompt`, queued mid-turn or resuming an exited session first), ask a workspace’s lead (`ask_lead`), or send Enter/Escape to a Standard pane (`send_keys`).
- **Answer waiting items:** inspect and answer open questions, permission prompts, and cold-cache holds (`get_agent_question` / `answer_agent_question`). Multi-part questions are answered one part at a time, and any confirmation card fails closed if the underlying request changed.
- **Manage workspaces and runs:** start a project, create a workspace inside your configured **New project folder**, resume an agent session, control preconfigured run targets, check subscription usage limits, or add/update tasks and daily goals (no voice tool can delete a task).
- **Open pages:** open a localhost dev server or a URL in CmdBrief’s browser pane or your default browser (`open_url`).

On macOS, you can optionally turn on **Wake on this Mac** (local Standby recognition for “Hey CmdBrief”, “hey-hey”, “wake up”, or any speech — never streaming to the cloud until woken), **Speaks up about agents** (local macOS speech announcements in Standby), or push-to-talk on the floating voice bubble. On Windows, wake on this PC, speaking with no session open, and ignoring PC sound in dictation are still marked **Coming soon**.

## Dictate prompts and translate to technical English

**Step 3 of 4 · You do this** (Mic button beside Attach in any composer)

Click the composer mic once to start dictating and click again to stop (push-to-talk is on the voice bubble, not the composer). Words insert at your caret — even if you edit mid-sentence or switch to another workspace’s composer — and nothing is sent until you press Enter.

- **Technical English output:** under **Settings › Voice › Dictation › Text comes out in**, choose **English** to stream through `gpt-realtime-translate`, turning speech in any supported language directly into English at the caret.
- **OpenRouter transcribe-then-translate:** if you use an OpenRouter transcriber, enable **Recognition › Transcribe, then translate** to run a fast second-stage translation pass that preserves code identifiers, file paths, names, and numbers as spoken (falling back to the raw transcript with a warning if translation fails).
- **Privacy and timers:** dictation stops automatically after **Stop after silence** (5–120 s, default 20 s) or 10 minutes. Dictated audio and text are **never** saved to Voice History.

## Set content access, confirmations, and the action log

**Step 4 of 4 · You do this** (Settings › Voice › What it may do & History and privacy)

Voice Agent enforces three layered safety controls before any tool runs against your workspaces:

1. **Choose an action level under Settings › Voice › What it may do:** Voice starts in **Look only** (reads panes and files; never types into agents). Switch to **Ask before acting** — which turns on **Confirm actions before they run** (`confirm_actions`) — so every state-changing voice action waits for your local **Approve / Reject** card in CmdBrief. Choose **Look and act** if you want spoken actions to run right away without a card.
2. **Remote websites always wait for your click:** even under **Look and act** with action confirmation off, calling `open_url` for any remote website outside `localhost`, loopback, or local files **always** displays a local confirmation card before opening.
3. **Control session-scoped content access:** terminal and project-file reading grants last for one logical voice session across all open workspaces in the window; starting a new session revokes the grant. Turn on **Settings › Voice › Assistant › Advanced › Ask before reading at each start** if you want a manual scope-approval dialog at the start of every session instead of automatic session grants.
4. **Audit or disable local logs:** CmdBrief records voice transcripts and every state-changing action (whether it ran, failed, or was refused) locally in `voice-history.jsonl`, visible in the **Voice History** tab (**Sessions** and **Actions**). Turn off either in **Settings › Voice › History and privacy** (**Save session history** and **Keep the action log**).

Need to control [a lead and crew](https://cmdbrief.com/guides/lead-and-crew-workflow) from your phone when you are away from your desk? See [Connect Grok Bot and answer agents from your phone](https://cmdbrief.com/guides/grok-bot-remote-control), track provider windows with [Multiple CLI accounts and usage limits](https://cmdbrief.com/guides/multiple-accounts-and-usage-limits), or browse [Workspaces and views](https://cmdbrief.com/guides/workspaces-and-views), [Features](https://cmdbrief.com/features), and the [changelog](https://cmdbrief.com/changelog).

**Check it worked**

| Where | Run or do | Pass |
| --- | --- | --- |
| Voice panel | Ask the assistant to send a prompt while **Ask before acting** is selected | An Approve / Reject card appears locally in CmdBrief before anything is sent, and the outcome appears in **Voice History › Actions**. |
| Voice panel | Ask the assistant to open an external `https://` website even under **Look and act** | CmdBrief still pauses on a local confirmation card before opening the remote address. |

## If it fails

| What it says | Fix |
| --- | --- |
| Assistant says it cannot send prompts or run targets | **You:** Voice defaults to **Look only**. Switch **Settings › Voice › What it may do** to **Ask before acting** or **Look and act**. |
| Opening a website still asks for confirmation when Look and act is on | Expected by design: only `localhost`, loopback, and local file URLs open without confirmation under Look and act. Every remote website requires your click. |
| Bluetooth headphones drop to muffled call audio during dictation | **You:** Set **Settings › Voice › Microphone** back to **Automatic** so CmdBrief uses the built-in mic while a Bluetooth headset is the default output. |
| Dictation picks up a video or call playing on speakers | **You:** Turn on **Ignore sound from this Mac** under Settings › Voice › Dictation and grant macOS System Audio Recording permission when prompted. |
| GPT-Live disconnects after 30 seconds of silence | With **End idle sessions** on, GPT-Live disconnects after 30 s by default (configurable from 15–180 s in Settings › Voice; Realtime providers use a 3-minute idle policy). Enable **Wake on this Mac** to stay in local Standby. |
| Wake phrase or spoken announcements are dimmed on Windows | Wake on this PC, speaking with no session open, and ignoring PC sound in dictation are still marked **Coming soon** on Windows. |

## Questions

### Is Voice Agent usage included in CmdBrief Pro?

No. CmdBrief Pro includes the Voice Agent and dictation features in the app, while you bring your own OpenAI, xAI, or OpenRouter API key and pay that provider directly for audio and model usage.

### Does OpenAI keep recordings of my GPT-Live sessions?

CmdBrief pins `store: false` on every OpenAI GPT-Live session so OpenAI does not retain a session recording for forking or download. The selected provider still processes the live audio and tool results needed to answer.

### Can Voice Agent read my files permanently once granted?

No. Terminal and project-file content access is session-scoped: starting a new voice session revokes the grant. Enable **Ask before reading at each start** under Settings › Voice › Assistant › Advanced to approve read scopes manually every session.

### Are dictated prompts saved in Voice History?

No. Dictated audio and text are inserted directly into the active composer and are never written to `voice-history.jsonl`.

## Primary sources

Provider terms and product behavior can change. Confirm plan, pricing, model, and permission details in the current official documentation.

- [OpenAI: Realtime API guide](https://developers.openai.com/api/docs/guides/realtime)
- [OpenAI: Live conversations idle & resume guidance](https://developers.openai.com/api/docs/guides/live-conversations#close-idle-sessions-and-resume)
- [xAI API documentation](https://docs.x.ai/docs/overview)
- [OpenRouter API documentation](https://openrouter.ai/docs/quickstart)

## Keep reading

- Setup and safety: [Connect Grok Bot and answer agents from your phone](https://cmdbrief.com/guides/grok-bot-remote-control)
- Setup and safety: [Managed SSH (1Password), sending keys, and ${NAME} secrets](https://cmdbrief.com/guides/managed-ssh-and-secrets)
- Workflows: [Workspaces and views: Overview, Stage, Products, Advanced](https://cmdbrief.com/guides/workspaces-and-views)
- Setup and safety: [Connect your 7 coding agent CLIs in CmdBrief](https://cmdbrief.com/guides/connect-agent-clis)
- Workflows: [Team dashboard, Daily goals, and Connectors](https://cmdbrief.com/guides/team-dashboard-and-connectors)

---

Markdown mirror of https://cmdbrief.com/guides/voice-agent-setup, generated at build time from the same data the HTML page renders. Machine-readable index: https://cmdbrief.com/llms.txt
