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.

Keep keys on your server. If a key is ever exposed in a browser or app bundle, revoke it in the dashboard and create a new one.

Check pronunciation

POST/v1/check

Analyses one recording. Send it as multipart/form-data.

FieldTypeDescription
audio requiredfileWAV, MP3, M4A, OGG or WebM. Up to 60 seconds and 10 MB.
textstringWhat the learner meant to say. Leave it out for free speech; Calliphon transcribes the recording first.
accentstringTarget accent: us (default) or uk.
mouthbooleanInclude the tongue, lip and jaw track. Default true. Turn it off for smaller responses.
tipsbooleanInclude 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 }
}
FieldDescription
scoreShare 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[].typewrong (a different sound), missing (a sound left out) or extra (a sound added).
mistakes[].tipOne 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”.
mouthWhen 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.
usageBilled 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:

SymbolAs inCommon learner swap
θthinks, t, f
ðthisz, d
ɹredl, rolled r
ɪshipiː (sheep)
æcate, ɑ
wwestv

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.

StatusCodeWhat to do
400invalid_audioThe file could not be decoded. Send one of the supported formats.
400no_speechNo speech was found. Check the microphone and record again.
401invalid_keyThe key is missing, wrong or revoked. Create a new key in the dashboard.
402insufficient_balanceTop up your balance or turn on automatic top up.
413audio_too_longSplit recordings longer than 60 seconds.
429rate_limitedWait 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.