> Every Taji docs page as Markdown: https://docs.taji.is/llms.txt

# Gemini

Voice conversations with your desk's agent over Gemini Live (`gemini-4-live`), streaming 16 kHz PCM audio in and 24 kHz out from the kernel. While voice is on, everything the microphone hears goes to Gemini as audio, and the replies it speaks come back from it, billed to your key. Your agent's replies, order cards, approval notices and recaps that Taji reads aloud go to Gemini as text, so what they say of your accounts, positions and orders reaches it. The voice never places or approves an order and has no tool that reads an account.

## Before you link

A Gemini API key with billing, from Google AI Studio's [API keys](https://aistudio.google.com/apikey) page. Google's subscription credits name the Gemini API and not Live, so whether they pay for voice is unmeasured.

## Link

Link `gemini` in Connections › Voice, or run `taji-link gemini`; headless, `POST /verb/voice/link` (`provider: "gemini"`, field `key`). Taji verifies the key with one models read and seals it in your vault.

## Use

1. Press the composer's Voice button, or `⌘⇧V` from anywhere in the window (except an open dialog such as the order ticket), and speak. Gemini decides when you have finished and answers in audio; the button moves with your voice and with its own. Press it again to turn voice off; after a minute with nothing heard, nothing played and no agent working on the desk, voice turns itself off.
2. Speak over an answer to stop it; what Gemini still sends of that answer is dropped. A request that needs market data or desk work goes to your desk's agent through the six dispatch tools (`send`, `read`, `stop`, `open_desk`, `set_progress_updates`, `hang_up`), and its reply is spoken when the agent answers.

Measured 2026-11-22 and 2026-11-23 on `gemini-3.8-live` by `plugins/gemini/tests/live.rs` and `voice_walk.py --provider gemini`; on 2026-12-02 the live tests passed again on `gemini-4-live`, and the walk is not yet rerun:

- Google's own activity detection ends each utterance (after about 800 ms of silence, its default) and interrupts Gemini when you speak over it.
- Taji declares its six tools `BLOCKING`, so Gemini waits for a call's result before it goes on. What speech during that wait does is unmeasured; under Google's default, `NON_BLOCKING`, it interrupted nothing and Gemini answered it in the same turn ("Never mind" while a `send` ran brought a `stop`).
- While Taji's message to Gemini (an agent's reply) has no answer yet, whatever Gemini answers is that message's turn: a request spoken in that instant is not handed to the agent, since only your own speech can hand one over, and you say it again.
- A connection lasts about ten minutes. Before Google closes one it sends `goAway`, and Taji reconnects at the first quiet moment, or 5 s before the connection ends. The conversation keeps its context only once Google has sent a resumable handle; before that the new connection starts fresh. A turn still running at the reconnect ends unanswered.
- Context window compression (a sliding window) lifts the 15-minute audio session limit.
- Two coughs begin no turn. A remark to someone else ("Hey Sam, are you coming to lunch with us later?") got no reply 2 runs of 3 on 3.8 Live and 3 runs of 3 on 4 Live (`a_cough_and_a_remark_to_someone_else_are_not_answered`). Proactive audio, which lets Gemini decline speech that is not meant for it, is permanently on and cannot be turned off. A turn Gemini keeps silent still carries a transcript, such as `<!-- no speech output -->`.
- A models read proves only that the key exists, not its billing: a key without credit links and is refused at the first session.
- A reply sent as text while the microphone streams silence is answered. How Google orders one sent while you are speaking is unmeasured.

## Unlink

Unlink Gemini from its row under Connections › Voice (or `POST /verb/voice/unlink` with `{"provider": "gemini"}`) while your vault is open. Taji deletes the sealed API key from the vault and removes the link from its state.

Taji does not revoke the key at Google. Delete it on Google AI Studio's [API keys](https://aistudio.google.com/apikey) page if you no longer need it.

## If it fails

| Symptom | Cause | Fix |
|---|---|---|
| Link or session refuses with `invalid_key` | Google answered `API_KEY_INVALID` ("API key not valid") | Check or create a key in Google AI Studio and link again |
| Link or session refuses with `no_credit` | Google answered 402: the prepay credit balance is depleted | Add credit to your Google AI Studio billing |
| Link refuses with 403 `PERMISSION_DENIED` | The key is blocked, leaked or lacks access, or the project needs billing | Create a new key or fix the project's billing |

## References

- [Live API WebSocket reference](https://aistudio.google.com/api-reference/live) (fetched 2026-11-23)
- [Get started with the WebSocket API](https://aistudio.google.com/docs/live-api/get-started-websocket) (fetched 2026-11-22)
- [Live API capabilities](https://aistudio.google.com/docs/live-api/capabilities) (fetched 2026-11-23)
- [Session management](https://aistudio.google.com/docs/live-api/session-management) (fetched 2026-11-22)
- [Tool use](https://aistudio.google.com/docs/live-api/tools) (fetched 2026-12-02)
- [Best practices](https://aistudio.google.com/docs/live-api/best-practices.md) (fetched 2026-11-22)
- [Gemini 4 Live](https://aistudio.google.com/docs/models/gemini-4-live) and [Live thinking](https://aistudio.google.com/docs/live-api/thinking.md) (fetched 2026-12-02)
- [List models](https://aistudio.google.com/api-reference/models/list-models) (fetched 2026-11-22)
- [API keys](https://aistudio.google.com/docs/api-key.md) (fetched 2026-11-22)
- [API errors](https://aistudio.google.com/docs/api-errors.md?generate-content=true) and [troubleshooting](https://aistudio.google.com/docs/troubleshooting.md) (fetched 2026-11-22)
- [Google Developer Program benefits](https://developers.google.com/profile/help/benefits) (fetched 2026-11-22)
- `plugins/gemini/taji-plugin.toml`, `plugins/gemini/src/lib.rs`
- [How the Gemini plugin works](https://docs.taji.is/catalog/gemini/architecture.md)
