Markdownkeyboard_arrow_down
content_copyCopy Markdown
open_in_newView Markdown
Voice Dictation (/voice)
Speak your prompt instead of typing it.
Overview
The /voice command (alias /record) records audio from your
microphone and streams real-time transcripts directly into the prompt
box as you speak. You can also start dictation at any time using the F5
key.
Voice dictation writes text into the prompt box; it does not automatically submit your prompt. When you stop recording, the transcript remains in the prompt box exactly as if you had typed it, allowing you to edit, expand, and submit the text when you are ready.
Dictating a prompt
To dictate a prompt into the terminal, follow these steps:
- Press F5, or type
/voicein the prompt box and press Enter. - Wait for the status line below the prompt to transition from Connecting… to Recording.
- Speak clearly into your microphone. Interim text appears in the prompt box and updates as the transcription service processes audio.
- Press Enter (or F5) to stop recording and retain the transcript in the prompt box.
While a recording session is active, the status line below the prompt displays the elapsed recording time and available shortcut actions:
● Recording 0:07 enter or f5 to insert · esc to discardDictation controls
The following keyboard shortcuts control active dictation sessions. All other keystrokes are ignored during recording to prevent accidental input:
| Key | Action |
|---|---|
| Enter (or F5) | Stop recording and insert the transcript into the prompt. |
| Esc | Discard the recording and restore previous prompt contents. |
| Ctrl+Z (after) | Revert the entire dictation as a single undo operation. |
If the prompt box already contained text before starting dictation, the transcript is appended to the existing text rather than replacing it.
Availability
Voice dictation is subject to the following operating constraints:
- Dictation requires an interactive TUI session and is disabled in
non-interactive print mode (
--print). - Dictation is not currently supported for business or enterprise accounts.
Voice over SSH
When the CLI runs on a remote machine over Secure Shell (SSH), the
remote environment lacks direct access to your local audio hardware. The
mic-serve subcommand resolves this by streaming audio from your local
microphone over a local loopback socket, which is forwarded to the
remote CLI through a reverse SSH tunnel.
The Antigravity CLI must be installed on both your local machine and the remote host.
1. Serve your local microphone
Start the microphone server on your local machine:
agy mic-serve
Keep this process running while dictating. By default, mic-serve
listens on 127.0.0.1:4713 and streams audio from your default input
device to connected clients. You can run it inside a background job, a
tmux pane, or a separate terminal window.
To bind to a custom port if port 4713 is already occupied, specify the
--addr flag:
agy mic-serve --addr 127.0.0.1:<UNUSED_PORT>2. Open a reverse tunnel
From your local machine, forward the local audio port to the remote machine by opening a reverse SSH tunnel:
ssh -R 24713:localhost:4713 <remote-machine>
The tunnel must remain active during dictation. To run the tunnel in the
background without maintaining an interactive shell session, use the
-f and -N flags with the ssh command. For example:
ssh -f -N -R 24713:localhost:4713 <remote-machine>3. Start the CLI with ANTIGRAVITY_MIC
In your remote SSH session, launch the CLI with the ANTIGRAVITY_MIC
environment variable set to the forwarded tunnel port. For example:
ANTIGRAVITY_MIC=localhost:24713 agy
If you are using a Windows remote host and use PowerShell, set the environment variable and start the CLI:
$env:ANTIGRAVITY_MIC = "localhost:24713"; agy
Alternatively, if you are using a Windows remote host, but use Windows
Command Prompt (cmd.exe):
set ANTIGRAVITY_MIC=localhost:24713 && agy
In the CLI, press F5 or use /voice, and speak into your microphone.
The local mic-serve process logs a confirmation when the CLI initiates
an audio connection. For example:
Recording for 127.0.0.1:54134.4. Verify the tunnel connection
If no connection log appears in the mic-serve output when dictating,
test whether the forwarded port is reachable by capturing a raw audio
sample on the remote host. For example:
timeout 5 nc localhost 24713 > /tmp/mic.raw
If /tmp/mic.raw accumulates data at approximately 32 kB/s, audio
streaming across the reverse tunnel is operating correctly.
Troubleshooting
- Transcription fails with a permissions message: Your stored
credentials predate voice dictation support. Execute
/logout, sign in again to refresh permissions, and retry. Note that voice dictation is not available for business or enterprise accounts. - Nothing is transcribed and the recording is silent: The active
terminal process lacks operating system microphone permissions (the
terminal running the CLI for local sessions, or the terminal running
agy mic-servefor SSH sessions):- macOS: Approve the system permission dialog, or grant access under System Settings → Privacy & Security → Microphone. Restart your terminal using CmdQ to apply the updated permission.
- Windows: Enable microphone access under Settings → Privacy & Security → Microphone, and ensure Let desktop apps access your microphone is enabled.
- Connecting fails immediately over SSH: No process is listening on
the forwarded port. Verify that both
agy mic-serveon your local machine and thessh -Rreverse tunnel are running. - Dictation reports that the microphone server closed the
connection: The server process terminated or the network tunnel
dropped. Inspect the output of
agy mic-serveon your local machine for detailed error diagnostics. - The wrong microphone is used:
mic-servecaptures audio from the system default input device. Verify your default input hardware under System Settings → Sound → Input (macOS) or Settings → System → Sound → Input (Windows). - The transcript is choppy or drops words: Audio is streamed uncompressed across the SSH tunnel; high latency or bandwidth saturation on the SSH connection can result in dropped audio packets.
Next steps
- CLI Reference: See all available slash commands and keybindings.
- Prompting & Interaction: Multiline editing, interrupts, and pasting media into the prompt.
- Installation & Auth: Sign-in flows, including the remote SSH OAuth loop.
Last updated Oct 08, 2026