VOICE / write-speech-to-speech-system-prompt

Voice

Write a speech-to-speech system prompt

Write a speech-to-speech system prompt

Grok Realtime is speech-to-speech. The system prompt is the instructions string on session.update. It controls what the agent says (words, tools, flow, safety) — leave audio quality, phonetics, speaking rate, background sound, and how the voice “sounds” out of the prompt, or reframe them as rules about the words produced.

Sessions and tools: Start a speech-to-speech session, Add tools to a speech-to-speech agent.

Shape that works

Write in the second person (“You are…”) with these ## sections in this order:

## Role & Persona
## Objective
## Conversation Flow
## Guardrails & Escalation
## Voice & Communication Style

Optional: append ## CRITICAL INSTRUCTIONS after the five for hard per-turn or tool overrides (ALWAYS / NEVER / EVERY, tool names in backticks).

Rules that travel with this shape:

  • Only name tools that exist in the tool definition you pass.
  • Bake facts and full URLs into the prompt (hours, prices, policies, website).
  • Put the spoken greeting in its own session field — do not script the opening line inside Conversation Flow; start flow from the caller’s first response.
  • Prefer short bullets; iterate wording; capitalize key rules when needed.

Minimal skeleton

## Role & Persona
You are a [disposition] [role] for [Company]. [1-2 baked-in facts: what the company does, website URL verbatim.]

## Objective
[Outcome the agent drives toward], or transfer cleanly to a human when you cannot.

## Conversation Flow
[Prose flow for simple agents, or phased Goal / How / Exit steps for complex ones. Reference only attached tools by name.]

## Guardrails & Escalation
Stay strictly within [scope]. Give no medical, legal, or financial advice. For anything outside your scope, say you don't know and offer to transfer.
[Escalation triggers + the exact line to say while calling the transfer tool.]
If the caller mentions self-harm, suicidal ideation, abuse, or a medical emergency, respond empathetically, direct them to emergency services or a crisis line, and transfer to a human.

## Voice & Communication Style
Speak naturally in short sentences (1-2 per turn). [Tone.] Respond only in English.
Vary phrasing; do not repeat the same sentence twice in a row.
When reading numbers or codes, speak each character separately with hyphens and confirm.
If the input is unclear or incomplete, ask a short clarification instead of guessing.

## CRITICAL INSTRUCTIONS
[Only if needed: absolute per-turn requirements or tool overrides, ALWAYS/NEVER phrasing, tool names in backticks.]

Section checklist

Section Put here
Role & Persona Identity, brand, disposition
Objective What “done” looks like (1–2 sentences)
Conversation Flow Prose or phased Goal / How / Exit; only attached tools
Guardrails & Escalation Scope, refusals, transfer triggers, crisis path
Voice & Communication Style Sentence length, tone, language lock, variety, digit-by-digit codes, unclear-input policy
CRITICAL INSTRUCTIONS (optional) Non-negotiable per-turn / tool rules

Language lock example under Voice & Communication Style:

- Respond only in English.
- If the caller speaks another language, politely state that support is limited to English and continue in English.

Digit-by-digit codes:

- When reading phone numbers, account numbers, codes, or mixed alphanumeric strings, speak each character separately, separated by hyphens (e.g., 4-1-5-5-5-1-2-3-4).
- After reading it back, ask for confirmation.

Tools in the prompt

  • Mention only tools present in the schema (end_call, web_search, x_search, transfer_call, api_request, connectors, custom snake_case tools).
  • Optional system-wide preamble before every tool call: one short spoken line, then call immediately.
  • Confirm before tools that change state; call read-only tools without asking.

Pitfalls

  • Writing pronunciation or “sound warmer” audio rules into instructions — the field drives wording, not TTS timbre.
  • Naming tools in the prompt that are missing from the tools list.
  • Scripting the greeting inside Conversation Flow instead of the separate greeting field.
  • Leaving facts or URLs out of the prompt and expecting the agent to invent them.