Spell a gate number
curl https://aisenseapi.com/services/v1/spell/Gate%20B%2042 --output gate.wavThe answer is a mono 16-bit PCM WAV at 22050 Hz that says upper gee, lower ay, tee, ee, a pause, upper bee, a pause, four, two: the case is spoken because the text mixes it. The text is percent-encoded in the path; add a voice as a second segment, such as /spell/Gate%20B%2042/cori, the case mode as a third, such as /spell/Gate%20B%2042/cori/off, the space mode as a fourth, pause or word, and the speed as a fifth, such as /spell/Gate%20B%2042/cori/auto/pause/0.7. With Accept: application/json the same call answers the fields instead, with the WAV in audio_base64:
curl -H "Accept: application/json" https://aisenseapi.com/services/v1/spell/Gate%20B%2042
{"audio_base64":"UklGRkj+BABXQVZFZm10IBAAAAABAAEAIlYAAESsAAACABAAZGF0YST+BAA...","mime_type":"audio/wav","voice":"kristin","characters":7,"case":"marked","space":"pause","speed":1,"skipped":[],"duration_seconds":7.42,"sample_rate":22050,"voices":["kristin","cori"]}The same as JSON, where the voice is a field:
curl -X POST https://aisenseapi.com/services/v1/spell \
-H "Content-Type: application/json" -H "Accept: application/json" \
-d '{"data": "Gate B 42", "voice": "cori"}'Try it
Hear text spelled out here, letter by letter, in the voice and at the speed you choose. Your browser posts the text in a JSON field named data, with case, space and speed beside it, and plays the WAV that comes back; up to 256 characters. Leave secrets and personal data out.
What is spoken, paused and skipped
Letters a to z are spoken by their English names, digits 0 to 9 by theirs, a dash as the word dash and an underscore as the word underscore. A run of spaces, tabs or line breaks is one pause of 0.4 seconds, or, with space set to word, the spoken word space, counted as a character; between two characters there are 0.16 seconds. Every other character is skipped and listed once in skipped: punctuation, letters outside a to z such as æ ø å, and emoji. characters counts what was spoken. Text with nothing to spell answers HTTP 400.
Letter case is spoken when it matters. When the text mixes upper and lower case, the word upper or lower comes before a letter each time the case changes, the first letter included: X7-kQ_9 is read upper ex, seven, dash, lower kay, upper cue, underscore, nine. Text in one case alone is read plainly, so GATE B 42 and x7kq9 carry no marks. The case field forces it: on marks the first letter and every change whatever the text, off never marks, auto is the default. The answer says which happened in its case field.
Speed runs from 0.5, half speed, to 2.0, double, in steps of 0.1, with 1.0 the default: speed in the JSON body or the fifth path segment. Each letter is stretched in time with its pitch kept, and the pauses between letters change by the same factor, so 0.7 gives a listener more time to write each one down. A sound may last at most eight minutes, the longest a text can make at normal speed, so a long text at a slow speed can be refused.
This is spelling, not reading: I love you comes back as eye, ell, oh, vee, ee, why, oh, you, with the pauses where the spaces were. It is made for codes, names, call signs and anything else a listener needs letter by letter.
Two voices, made once
| Voice | Sound | Origin |
|---|---|---|
| kristin | US English, female. The default. | LibriVox recordings, public domain |
| cori | UK English, female; says zed | LibriVox recordings, public domain |
The 41 clips of each voice were generated once with Piper, an open-source speech synthesizer, from voices trained from scratch on public-domain speech, then trimmed, levelled and stored as a sound bank. A call joins clips; no synthesis runs per request, so the answer is the same every time and comes in milliseconds.
What the free spell API endpoint returns
| Field | Type | Description |
|---|---|---|
| audio_base64 | string | The WAV as base64, in the JSON form. With Accept: audio/wav, or no Accept header, the WAV bytes are the whole answer instead. |
| mime_type | string | audio/wav. |
| voice | string | The voice used. |
| characters | integer | How many letters, digits, dashes and underscores were spoken; the case words are not counted. |
| case | string | marked when upper and lower were spoken, unmarked when not. |
| space | string | pause or word: how a run of whitespace was rendered. |
| speed | number | The speed the sound was made at, 0.5 to 2.0; 1 is normal. |
| skipped | array | The characters that were not spoken, each once, in order of first appearance; combining marks are left out. |
| duration_seconds | number | The length of the sound. |
| sample_rate | integer | 22050. |
| voices | array | The voices available, the default first. |
A second of sound is about 44 KB of WAV; 256 characters make roughly two minutes and five megabytes, so keep the JSON form for short texts and take the WAV bytes for long ones.
HTTP 400 when there is nothing to spell
curl -X POST https://aisenseapi.com/services/v1/spell -H "Content-Type: application/json" -d '{"data": "!!!"}'
{"error":"Nothing to spell: the text has no letter a to z, no digit, no dash and no underscore.","fix":"Send 1 to 256 characters with at least one letter a to z, digit, dash or underscore; voice is kristin (default) or cori; case is auto, on or off; space is pause or word; speed is 0.5 to 2.0 in steps of 0.1."}Also HTTP 400: more than 256 characters, an unknown voice, an unknown case or space mode, a speed outside 0.5 to 2.0 or between its steps, a sound that would last more than eight minutes, a missing text. An Accept header that allows neither audio/wav nor application/json is HTTP 406.
Where spelling out loud earns its keep
Codes read aloud
A one-time code, a gate number or a booking reference, spoken so it can be typed without reading.
Names and call signs
Spell a surname or an aircraft registration the way a desk clerk or a controller would.
Agents that speak
An agent with a speaker and no speech model gives a short code a voice with one call.
Accessibility
A code shown on screen, also heard, in the voice a user chose.
Privacy and limits
The text travels in the path or the body and is not stored; the sound is made from the banks in the same call and nothing stays behind. A one-time code is a secret while it is valid: send it in a POST body, which stays out of browser history, and spell it where only the right ears hear it.
The service-wide limit is 5000 requests per IP per day, with no key and no account behind it. Every endpoint on the service is listed in the free public REST APIs reference; the data-over-sound pair, audio encode and audio decode, carries bytes between devices as tones and is a different thing.