Calliphon API
Calliphon analyses spoken English one sound at a time. You send a recording, optionally with the text the learner meant to say, and get back every sound that was expected, every sound that was heard, the mistakes between them, and a tip for each.
The base URL for all requests is https://api.calliphon.com/v1. Requests and responses use JSON, except audio uploads, which use multipart/form-data.
Quickstart
Create a key in API keys, export it, and send your first recording.
export CALLIPHON_KEY="cph_live_..." curl https://api.calliphon.com/v1/check \ -H "Authorization: Bearer $CALLIPHON_KEY" \ -F audio=@sample.wav \ -F text="This is my house"
Authentication
Send your key in the Authorization header as a bearer token. Keys starting with cph_live_ are billed; keys starting with cph_test_ return real analysis for recordings up to 10 seconds and are never billed, so you can build against them freely.
Check pronunciation
POST/v1/check
Analyses one recording. Send it as multipart/form-data.
| Field | Type | Description |
|---|---|---|
audio required | file | WAV, MP3, M4A, OGG or WebM. Up to 60 seconds and 10 MB. |
text | string | What the learner meant to say. Leave it out for free speech; Calliphon transcribes the recording first. |
accent | string | Target accent: us (default) or uk. |
mouth | boolean | Include the tongue, lip and jaw track. Default true. Turn it off for smaller responses. |
tips | boolean | Include a plain-language tip for each mistake. Default true. |
Response
{
"id": "chk_01JDX4ZQ8V",
"text": "This is my house",
"score": 88,
"words": [
{ "word": "This", "expected": ["ð","ɪ","s"], "heard": ["z","ɪ","s"], "start": 0.12, "end": 0.41 }
],
"mistakes": [
{
"word": "This", "word_index": 0, "type": "wrong",
"expected": ["ð"], "heard": ["z"],
"start": 0.12, "end": 0.20,
"tip": "Put your tongue tip lightly between your teeth and use your voice."
}
],
"natural": [],
"usage": { "audio_seconds": 1.4, "cost": 0.0002, "balance": 42.5998 }
}
| Field | Description |
|---|---|
score | Share of expected sounds said correctly, 0 to 100. Natural connected speech counts as correct. |
words[] | Each word with its expected sounds, heard sounds and time span in seconds. |
mistakes[].type | wrong (a different sound), missing (a sound left out) or extra (a sound added). |
mistakes[].tip | One instruction about the tongue, lips, jaw or voice. |
natural[] | Weak forms and connected speech the learner used, for example juː n miː for “you and me”. |
mouth | When requested: 50 frames per second of tongue, lip and jaw positions, plus native targets per sound. Values are in typical spreads, with 0 as a neutral position. |
usage | Billed audio seconds, the cost of this request and your remaining balance. |
Sound symbols
Sounds use the International Phonetic Alphabet. A few you will see often:
| Symbol | As in | Common learner swap |
|---|---|---|
| θ | think | s, t, f |
| ð | this | z, d |
| ɹ | red | l, rolled r |
| ɪ | ship | iː (sheep) |
| æ | cat | e, ɑ |
| w | west | v |
Balance
GET/v1/balance
Returns your remaining balance in US dollars and this month's usage.
{ "balance": 42.60, "month": { "requests": 18240, "audio_minutes": 1642.5, "cost": 13.14 } }Errors
Errors return a JSON body with a code and a message that says how to fix the problem.
| Status | Code | What to do |
|---|---|---|
| 400 | invalid_audio | The file could not be decoded. Send one of the supported formats. |
| 400 | no_speech | No speech was found. Check the microphone and record again. |
| 401 | invalid_key | The key is missing, wrong or revoked. Create a new key in the dashboard. |
| 402 | insufficient_balance | Top up your balance or turn on automatic top up. |
| 413 | audio_too_long | Split recordings longer than 60 seconds. |
| 429 | rate_limited | Wait for the number of seconds in the Retry-After header. |
Limits
Each account can run 20 checks at the same time and 600 per minute. Contact us to raise these limits.
Billing
Usage is charged from a prepaid balance at $0.008 per audio minute, measured to the tenth of a second. Top up from Billing with a card. New accounts get $5 of free credit.