---
name: voxego-voice
description: Add Voxego Voice, text read aloud in one of five voices, to an app or site through the Voxego connector: learn what it reads, pick a voice and a setup, make a key with a cap, and write the code. Use when someone asks for a narrator, read-aloud or spoken audio with Voxego Voice.
---

# Add Voxego Voice to an app

Voxego Voice reads text aloud in one of five voices: Clara, Sofia, Rui, Tomás and Duarte. Use it for a narrator in a web app or PWA, spoken lessons, audio versions of articles, or fixed prompts made once. You set it up through the Voxego connector and write the app's code. Stop at the points marked **Ask**, and never confirm a preview on your own.

## 0. Check the connection

Call `org_whoami`, then `voice_status`: whether the plan has Voice, its limits, this month's use and the keys there already. If this connection can't use Voice or make keys, tell the person what `org_whoami` says about allowing it.

## 1. Learn what it reads

**Ask** in one short message:

- What gets read aloud: fixed text known in advance (lessons, onboarding, prompts), or text that changes (each article, a user's own notes, replies).
- The language, and for Portuguese whether it is Portugal's (`pt-PT`).
- Where it plays: a web page or PWA, a mobile app, or files the app ships with.
- Roughly how much a month, to set a cap.

## 2. Pick the voice

`voice_voices` describes each voice and the languages. Read a short sample with `voice_speak` in two or three voices (the person gets a player; you get the length and price) and **ask** which they like.

## 3. Pick the setup

`voice_guide` (with the app's site, voice and language) has three setups and ready code for each. Recommend in this order:

| Setup | When | Key |
|---|---|---|
| Made when the app is built | fixed text known in advance | a server key in the build environment, audio files shipped with the app |
| The app's own server | text that changes, and the app has a server | a server key on that server |
| Straight from the page | a web app or PWA with no server | a browser key for the app's sites, with a monthly cap on the key |

Prices, dates, times and phone numbers are said the way a person would when `natural` is true; tell a developer to send it, since the API's default is false.

## 4. Keys and caps

**Ask once:** gather `voice_keys_create` (with `sites` for a browser key, and `monthly_eur`, its own cap in euros) and, if the person wants a ceiling for all of Voice, `voice_set_monthly_limit`. Show the previews together and only after their yes pass the tokens to `confirm`. A browser key can be seen by anyone who opens the app, so its monthly cap is what caps its cost. The secret is shown once: give it to the person, and don't repeat it.

## 5. Write the code

Put the code from `voice_guide` into the app. A server key lives in an environment variable such as `VOXEGO_VOICE_KEY`, never in code that reaches a browser. Cache audio that's read more than once rather than making it again. Handle 429 (the key's cap or the monthly limit reached) by hiding the play button, not by retrying.

## 6. Check and hand over

Play one sentence through the app itself. Then tell the person: the voice, the setup, the key's name and cap, the price (from `voice_voices`), and where they see this month's use (`voice_status`, or the Voice tab).

## Always

- A key's secret is shown once: give it to the person and don't repeat it.
- Never confirm a preview without the person's yes.
- Voice has only its five voices; it can't make or copy a voice.
- Don't tell the person what a law requires, and don't plan their time for them.
