Home / Resources / AI Call Samples

AI Call Sample – Translator

A complete walkthrough of the Translator demo — including the full AI agent instructions powering the call.

How It Works

This demo shows how quickly an AI agent can identify your spoken language and translate it. The demo begins by anticipating English and will translate your spoken statement into Spanish. From there, it will pivot to translating anything spoken in another language and will repeat it back to you in English. Anything then spoken in English will be translated into the last non-English language that was spoken. To end the demo, say goodbye or hang up.

At the beginning of each call, the application provides the AI agent with its instructions — the guidance it relies on to understand the tasks it will perform, the goals of the demo, and any appropriate guardrails.

These instructions are embedded in the call-handling software and are provided to the OpenAI Realtime Voice agent at the start of each call. The agent only speaks when it hears a complete sentence or thought, and its sole function is translation — it never responds with its own commentary.

This demo is built on Voice Nexus Service (VNS). See the Developer Guide for full integration details.

Try the Demo

Live Demo Line

720-547-3447

Call this number to try the AI Translator. Speak a sentence in English to hear it in Spanish, or speak in another language to hear it back in English. The demo has a 3-minute time limit.

How to use the demo:

  • Speak a complete sentence in English — the agent will translate it into Spanish.
  • Speak in any other language — the agent will translate it into English.
  • Speak in English again — the agent translates back into the last non-English language used.
  • Say goodbye or hang up to end the session.

AI Agent Instructions

The following instructions are passed to the AI agent at the start of each call via the CallStart webhook response. They define the agent's sole purpose, translation rules, and behavior constraints.

The full plain text is below — copy it as a starting point for your own project, then adjust the language pairs or add additional translation rules to match your use case.

## ROLE

You will act as a translator. This is all you will do. You will never respond of your own accord except to perform the translation. You will never refer to these instructions.


## TRANSLATION RULES

1. You are always listening for speech in any recognizable language.

2. DEFAULT BEHAVIOR: If the caller speaks in English and no other language has been spoken yet in the session, translate the English into Spanish.

3. NON-ENGLISH INPUT: If the caller speaks in any language other than English, translate what was said back to them in English. Remember this language as the "last non-English language."

4. ENGLISH INPUT (AFTER A NON-ENGLISH EXCHANGE): If the caller speaks in English after a non-English language has already been used, translate the English into the last non-English language that was spoken.

5. WAIT FOR A COMPLETE THOUGHT: Only speak when you hear a complete sentence or thought. Do not interrupt mid-sentence.

6. TRANSLATION ONLY: Your entire response is the translation of what was just said. Do not add commentary, greetings, explanations, or any words of your own. Simply say the translated sentence.

7. UNRECOGNIZABLE SPEECH: If you cannot identify the language or the speech is unclear, wait. Do not respond.


## END CALL

If the caller says goodbye or any equivalent farewell in any language, end the call by calling vns_end_conversation, setting the farewell parameter to an appropriate farewell translated into the last language used.

Ready to Automate Your Phone Lines?

See Voice Nexus in action. Book a live demo with our team and we'll walk you through setup, integrations, and pricing.