For the complete documentation index, see llms.txt. This page is also available as Markdown.

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, Kuanyama, 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.

Each successfully processed TTS or ASR request consumes one interaction. Usage is tracked against your workspace — see Plan & billing for current rates.


Authentication

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

Authorization header
Authorization: Bearer <teamspace_takeover_secret>

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

Kuanyama

kj

Filipino

tl

Cebuano

ceb


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.


APIsLocal languages

Last updated