Taktik Voice API docs
Getting started
Score English pronunciation at utterance, word and phoneme level with one HTTPS request. Send a WAV recording and the text that was read; get back a score for the whole sentence, each word and each phoneme, with timings.
Access
Requests need a token that we issue to you. Self-serve sign-up isn’t open yet: tell us what you’re building or email contact@taktikware.com and we’ll send one.
The basics
- Base URL:
https://api.taktikvoice.com - JSON over HTTPS. Requests are processed in the EU (AWS Ireland).
- Authentication:
Authorization: Bearer <token>(details). - Endpoint documented here:
POST /service/pronunciation(guide, reference).
Quickstart
1. Get a token
Request a free API key. Store it in an environment variable on your server, e.g. TAKTIK_TOKEN.
2. Prepare the audio
The API takes a WAV file; 16-bit PCM, 16 kHz, mono is recommended (other sample rates and stereo are converted for you). Keep it to one sentence. If your recording is in another format, convert it first, for example with ffmpeg:
# Any input format → plain WAV: PCM 16-bit, 16 kHz, mono, no metadata chunks
ffmpeg -i input.m4a -ac 1 -ar 16000 -c:a pcm_s16le -map_metadata -1 -fflags +bitexact sample.wav3. Send the request
Base64-encode the WAV file and send it with the text the speaker read:
# The JSON body is written to a file: long recordings don't fit in a shell argument.
printf '{"transcript":"Could you send the proposal by Thursday?","language":"us","audio_base64":"%s"}' \
"$(base64 < sample.wav | tr -d '\n')" > body.json
curl -sS -X POST https://api.taktikvoice.com/service/pronunciation \
-H "Authorization: Bearer $TAKTIK_TOKEN" \
-H "Content-Type: application/json" \
--data @body.json// Node.js 18+ (server-side only: never ship your token to a browser)
import { readFile } from 'node:fs/promises'
const audio = await readFile('sample.wav')
const response = await fetch('https://api.taktikvoice.com/service/pronunciation', {
method: 'POST',
headers: {
Authorization: `Bearer ${process.env.TAKTIK_TOKEN}`,
'Content-Type': 'application/json',
},
body: JSON.stringify({
audio_base64: audio.toString('base64'),
transcript: 'Could you send the proposal by Thursday?',
language: 'us',
}),
})
if (!response.ok) throw new Error(`${response.status}: ${await response.text()}`)
const result = await response.json()
console.log(`Overall: ${Math.round(result.accuracy * 100)}%`)
for (const word of result.words) {
const missed = word.phonemes.filter(phoneme => !phoneme.correct).map(phoneme => phoneme.text)
console.log(word.text, Math.round(word.accuracy * 100), missed.length ? `check: /${missed.join(' ')}/` : '')
}# Python 3 with requests (pip install requests)
import base64
import os
import requests
with open("sample.wav", "rb") as f:
audio_base64 = base64.b64encode(f.read()).decode("ascii")
response = requests.post(
"https://api.taktikvoice.com/service/pronunciation",
headers={"Authorization": f"Bearer {os.environ['TAKTIK_TOKEN']}"},
json={
"audio_base64": audio_base64,
"transcript": "Could you send the proposal by Thursday?",
"language": "us",
},
timeout=60,
)
response.raise_for_status()
result = response.json()
print(f"Overall: {round(result['accuracy'] * 100)}%")
for word in result["words"]:
missed = [p["text"] for p in word["phonemes"] if not p["correct"]]
print(word["text"], round(word["accuracy"] * 100), f"check: /{' '.join(missed)}/" if missed else "")4. Read the result
Every score is a number from 0 to 1. The response has an overall accuracy and a words list; each word has its own accuracy and a phonemes list where correct tells you whether each sound was pronounced as expected. See the response explained.
Want to see it working first? Try the live demo: it uses this same endpoint.
Next steps
- AuthenticationAuthenticate Taktik Voice API requests with a bearer token, and keep the token on your server.
- Pronunciation assessmentScore English pronunciation at utterance, word and phoneme level: request fields, WAV audio format, code samples in curl, JavaScript and Python, and the response.
- ErrorsHTTP status codes returned by the Taktik Voice API, what each one means and when to retry.
- Rate limitsRequest rate limits of the Taktik Voice API and how to handle 429 responses.
- API referenceReference for the Taktik Voice API pronunciation endpoint: request body, response schema and error responses, generated from our OpenAPI document.
What these docs cover
These docs describe the pronunciation assessment endpoint. Forced alignment, text-to-speech and the real-time voice tutor aren’t documented here yet; contact us if you need them.