For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to page URLs.
Skip to content

Voice API

APIs for text-to-speech (TTS) and automatic speech recognition (ASR).

The Voice API provides two services: Text-to-Speech (TTS), which converts text into spoken audio, and Automatic Speech Recognition (ASR), which transcribes audio into text.

Common languages are powered by a general large language model. Local languages — including Kinyarwanda, Oshiwambo, Filipino, and Cebuano — are powered by fine-tuned models trained on data collected from native speakers, by Proto and through its partners. These are tailored for citizen engagement, consumer protection, and anti-scam support.

Gender availability varies by language. See Local languages and All supported languages for the options per language.


Setting up your account

The Voice API is available to all Proto accounts. No additional setup is required beyond having a workspace.


Billing

Voice API usage is billed in voice credits, separately from interactions.

Cost per request

One credit per successfully processed TTS or ASR request

Starting balance

50 credits for a new workspace

Price

$0.05 per credit, bought in steps of 50 (minimum 100)

Auto top-up

Optionally buys 100 credits automatically when your balance falls below a threshold you set

When credits run out

TTS and ASR requests are rejected with a 403 until the balance is topped up. No credit is deducted for a rejected request — see Errors.

Some workspaces are set up for unlimited voice usage. Credit deduction is skipped entirely for these: every TTS and ASR request succeeds regardless of balance, and no request lowers the credit balance, triggers a low-balance notification, or schedules an automatic top-up. This is configured internally by Proto per workspace — it isn't a self-service setting.

Alerts are emailed to everyone who can view billing when the balance runs low, and a warning appears in the app. Buy credits, set auto top-up, and track usage from the Voice API settings page:

Voice API settingsPlan & billing

Authentication

Every request must include your teamspace takeover secret as a bearer token in the Authorization header.

To find your credentials:

1

Open teamspace settings

Go to Settings → Workspace → Teamspaces and select the teamspace you want to use.

2

Copy the values

Copy the Takeover secret for the bearer token, and the Teamspace ID (shown directly above it) for the {teamspace_id} path parameter.


Local languages

Supported by fine-tuned models trained on data collected from native speakers, optimised for citizen engagement, consumer protection, and anti-scam support.

Language
Code
ASR
TTS — Male
TTS — Female

Kinyarwanda

rw

✓

—

✓

Oshiwambo

kj

✓

—

✓

Filipino

tl

✓

✓

✓

Cebuano

ceb

✓

✓

✓

Urdu

ur

—

—

✓

Urdu text-to-speech is proxied to the same external OmniVoice relay used for Oshiwambo, rather than a model Proto trained specifically on native-speaker data. Speech recognition for Urdu isn't available through this local-language pipeline yet — see All supported languages below for the general-purpose model that currently handles Urdu ASR (and Urdu TTS outside this dedicated pipeline).


All supported languages

Common languages are powered by a general large language model. Every language below supports ASR, plus both male and female TTS voices.

View all 95 supported languages
Language
Code
ASR
TTS — Male
TTS — Female

Afrikaans

af

✓

✓

✓

Amharic

am

✓

✓

✓

Arabic

ar

✓

✓

✓

Assamese

as

✓

✓

✓

Azerbaijani

az

✓

✓

✓

Belarusian

be

✓

✓

✓

Bemba

bem

✓

✓

✓

Bulgarian

bg

✓

✓

✓

Bengali

bn

✓

✓

✓

Tibetan

bo

✓

✓

✓

Bosnian

bs

✓

✓

✓

Catalan

ca

✓

✓

✓

Czech

cs

✓

✓

✓

Welsh

cy

✓

✓

✓

Danish

da

✓

✓

✓

German

de

✓

✓

✓

Greek

el

✓

✓

✓

English

en

✓

✓

✓

Spanish

es

✓

✓

✓

Estonian

et

✓

✓

✓

Basque

eu

✓

✓

✓

Persian

fa

✓

✓

✓

Finnish

fi

✓

✓

✓

French

fr

✓

✓

✓

Galician

gl

✓

✓

✓

Gujarati

gu

✓

✓

✓

Hausa

ha

✓

✓

✓

Hawaiian

haw

✓

✓

✓

Hebrew

he

✓

✓

✓

Hindi

hi

✓

✓

✓

Croatian

hr

✓

✓

✓

Haitian Creole

ht

✓

✓

✓

Hungarian

hu

✓

✓

✓

Armenian

hy

✓

✓

✓

Indonesian

id

✓

✓

✓

Icelandic

is

✓

✓

✓

Italian

it

✓

✓

✓

Japanese

ja

✓

✓

✓

Georgian

ka

✓

✓

✓

Kazakh

kk

✓

✓

✓

Khmer

km

✓

✓

✓

Kannada

kn

✓

✓

✓

Korean

ko

✓

✓

✓

Latin

la

✓

✓

✓

Luxembourgish

lb

✓

✓

✓

Lao

lo

✓

✓

✓

Lithuanian

lt

✓

✓

✓

Latvian

lv

✓

✓

✓

Malagasy

mg

✓

✓

✓

Māori

mi

✓

✓

✓

Macedonian

mk

✓

✓

✓

Malayalam

ml

✓

✓

✓

Mongolian

mn

✓

✓

✓

Marathi

mr

✓

✓

✓

Malay

ms

✓

✓

✓

Maltese

mt

✓

✓

✓

Burmese

my

✓

✓

✓

Nepali

ne

✓

✓

✓

Dutch

nl

✓

✓

✓

Norwegian

no

✓

✓

✓

Chichewa

ny

✓

✓

✓

Punjabi

pa

✓

✓

✓

Polish

pl

✓

✓

✓

Pashto

ps

✓

✓

✓

Portuguese

pt

✓

✓

✓

Romanian

ro

✓

✓

✓

Russian

ru

✓

✓

✓

Sindhi

sd

✓

✓

✓

Sinhala

si

✓

✓

✓

Slovak

sk

✓

✓

✓

Slovenian

sl

✓

✓

✓

Shona

sn

✓

✓

✓

Somali

so

✓

✓

✓

Albanian

sq

✓

✓

✓

Serbian

sr

✓

✓

✓

Sundanese

su

✓

✓

✓

Swedish

sv

✓

✓

✓

Swahili

sw

✓

✓

✓

Tamil

ta

✓

✓

✓

Telugu

te

✓

✓

✓

Tajik

tg

✓

✓

✓

Thai

th

✓

✓

✓

Turkmen

tk

✓

✓

✓

Tongan

ton

✓

✓

✓

Turkish

tr

✓

✓

✓

Tatar

tt

✓

✓

✓

Twi

tw

✓

✓

✓

Ukrainian

uk

✓

✓

✓

Urdu

ur

✓

✓

✓

Uzbek

uz

✓

✓

✓

Vietnamese

vi

✓

✓

✓

Yiddish

yi

✓

✓

✓

Yoruba

yo

✓

✓

✓

Chinese (Simplified)

zh-Hans

✓

✓

✓

Chinese (Traditional)

zh-Hant

✓

✓

✓


Text-to-Speech (TTS)

Convert text into spoken audio.

Headers

Request body

Parameter
Required
Description

text

Yes

The text to convert to speech. Maximum 5,000 characters.

lang

No

Language code. Defaults to en. See the language tables above.

response_format

No

Output format: mp3 or wav. Defaults to mp3.

speed

No

Playback speed, 0.25–4.0. Defaults to 1.0.

gender

No

Voice gender: male or female. Availability varies by language.

Example request

Response

The API returns a Base64-encoded audio payload — not a downloadable file. Decode it client-side before playing or saving.

Decode the response to an audio file

Copy the Base64 response string into a file, e.g. input.txt.Run:$b64 = Get-Content input.txt -Raw$b64 = $b64 -replace '\s',''[IO.File]::WriteAllBytes("output.mp3", [Convert]::FromBase64String($b64))This generates output.mp3 in the same directory.With the Base64 response saved to input.txt:base64 --decode input.txt > output.mp3import base64with open("input.txt") as f: data = f.read()with open("output.mp3", "wb") as out: out.write(base64.b64decode(data))


Speech Recognition (ASR)

Convert spoken audio into text.

Headers

Request body

Parameter
Required
Description

file

Yes

The audio file to transcribe. mp3 or wav, max 15 MB.

lang

Yes

Language code

Example request

Response

The API returns the transcribed text extracted from the audio file.


Errors

Status
Meaning

403

The workspace has run out of voice credits. Top up your balance — see Voice API settings — before making further requests. No credit is deducted for a rejected request.

Workspaces set up for unlimited voice usage (see Billing above) never receive this error, since credit deduction is skipped for them entirely.

Kinyarwanda TTS, and voice-gender conversion for Kinyarwanda, Filipino, and Cebuano when a language's non-native gender is requested, run on a persistent local speech engine. If that engine becomes unresponsive mid-request, the request fails immediately rather than hanging, and the engine restarts automatically so the next request is unaffected.


Voice API settingsLocal languagesAPIs

Last updated