ipa.raymati.com

Reference

Generated from components.schemas and components.headers. Descriptions are the schema text.

Operations

Examples

NameTargetIPAproximityreal_edits
exactLogosλόγοςl o g o s1.00
stressShiftλόγοςl o g ˈo s0.90
thetaAsSθεόςs e o s0.751
acceptableThetaθεόςtʰ e o s0.9881870
verseArcheἐν ἀρχῇe n a r x i1.00

Full responses are the matching examples on POST /v1/tutor in openapi.json.

TutorRequest

FieldTypeRequiredDescription
targetstringyesGreek word or short verse.
ipastring / array of stringLearner phones. A string is tokenized. Explicit ipa wins over audio_base64 and audio_url.
audio_base64stringWAV bytes, base64. At most 256 KiB decoded. Larger clips use create_upload and audio_url. Resampled to 16 kHz mono. Under 0.12 s is unscored.
audio_urlstringaudio_url from the MCP tool create_upload, or an https URL. An upload id is read from this process. Other URLs must be https. The worker rejects userinfo, IP literals that are private, loopback, link-local, or otherwise non-public, and names such as localhost. It follows at most 3 redirects and checks each hop the same way. The body is read until 256 KiB, the same cap as audio_base64, then aborted. Content-Type must be audio/wav, audio/x-wav, audio/wave, or audio/vnd.wave. Failures are problem+json with a stable code (audio-url-not-https, audio-url-host, audio-url-redirects, audio-url-too-large, audio-url-type, audio-url-timeout).
schemestring
different_wordboolean
calibrateboolean
thresholdsobjectMap of name to minimum, or a list of minimums.
posteriorsarray of array of numberCTC frame log-probabilities. With vocab, each target phone gets a confidence.
vocabarray of string
blank_idinteger
recognizerstring

TutorResponse

FieldTypeRequiredDescription
apienumyes
schemestringyes
target_textstring
target_wordsarray of object
observed_phonesarray of string
proximitynumberyesCalibrated score after the stress penalty. Unchanged by coaching and heard_as.
lenient_similaritynumber
strict_similaritynumber
real_editsintegeryesCount of phones whose scoring status is incorrect, missing, or extra.
phonesarray of ScoredPhoneyes
different_wordDifferentWord
stressobjectyesScoring stress object. The penalty is already inside proximity.
gopobjectPresent when the request carried posteriors.
thresholdsarray of object
coachingCoachingyes
heard_asHeardAsyes
input_qualityobjectPresent when the request carried audio. Measured before resampling. Does not change proximity. Absent on IPA examples.

ScoredPhone

FieldTypeRequiredDescription
targetstring or null
observedstring or null
statusenumyesScoring label. This is what real_edits counts. It is not the learner label.
costnumberyes
confidencenumber or nullCalibrated GOP confidence. Null when the request has no posteriors.
uncertainbooleanTrue when confidence is below 0.75 or alignment failed.

Coaching

FieldTypeRequiredDescription
summaryCoachingSummaryyes
soundsarray of CoachingSoundyes
stressCoachingStressyes

CoachingSummary

FieldTypeRequiredDescription
proximitynumberyesSame rounded value as the response proximity.
fixesarray of CoachingFixyesRepairs with score_gain above 0, at most three. Ranked by score_gain descending, then a sound fix before a stress fix, then sound_index.

CoachingFix

FieldTypeRequiredDescription
rankintegeryes
kindenumyes
sound_indexintegerPresent when kind is sound. Index into coaching.sounds and phones.
wordstring or null
lettersstring or null
targetstring or null
heardstring or null
statusLearnerStatus
target_syllableinteger or nullPresent when kind is stress.
detected_syllableinteger or null
target_lettersstring or nullGreek letters of the target syllable. Present when kind is stress.
detected_lettersstring or null
error_codestringyesSame code as the sound, or stress_shift.
score_gainnumberyesProximity restored by fixing this one sound, or by clearing the stress penalty.

CoachingSound

FieldTypeRequiredDescription
indexintegeryes
wordstring or null
lettersstring or nullGreek letters that produced the target phone. Accents stay. Null on an extra.
syllableinteger or nullSyllable index inside the word. The stress object uses the verse-level index.
targetstring or nullLexicon phone, IPA.
heardstring or nullAligned attempt phone, IPA. Null when the target phone is missing.
statusLearnerStatusyes
closenessnumberyesArticulatory closeness. Exact is 1. Missing and extra are 0. Vowels: 1 - min(1, height/6 + 0.5·backness/2 + 0.5·rounding). Consonants: 1 - min(1, place/8 + 0.5·manner/7 + 0.5·voice). A vowel against a consonant is 0. Length alone is 0.9. Aspiration alone is 0.85. Rounded to 6 decimal places. Low confidence does not change this number.
low_confidencebooleanyesTrue when the aligned phone row has uncertain true, or confidence is a number below 0.75. An IPA-only phone with null confidence is false. When this is true and the feature label would be far, status is close. The error code and the feature diff stay on the phones. An exact phone stays exact.
error_codestring or nullyesStable code for this phone difference. Null when status is exact. A consonant substitution names place and manner. Fricatives s, z, ʃ, and ʒ use sibilant in the code, so θ→s is dental_fricative_to_alveolar_sibilant. Voice, aspiration, and length words appear only when that feature differs. A vowel substitution names height, backness, and rounding on both sides. Missing and extra prefix the same token. Low confidence does not change the code.
feature_diffarray of FeatureDiffyesFeatures that differ, in order: kind, place, manner, voicing, aspiration, rounding, height, backness, length. Empty when status is exact.

FeatureDiff

FieldTypeRequiredDescription
featureenumyes
targetstring or nullyesLabel on the lexicon phone. Null on an extra, or when that side has no such feature.
heardstring or nullyesLabel on the attempt phone. Null when the target phone is missing.

CoachingStress

FieldTypeRequiredDescription
target_syllableinteger or nullyesAccented syllable, same index as stress.target_syllable.
detected_syllableinteger or nullyesAttempt syllable, same index as stress.attempt_syllable.
matchboolean or nullyesNull when stress abstains or the attempt has no accent mark.
target_lettersstring or nullyesGreek letters of the target syllable, accents kept. Null when the index is null.
detected_lettersstring or nullyesGreek letters of the detected syllable. Null when the index is null.
error_codestring or nullyesstress_shift when match is false. Null when match is true or null.

LearnerStatus

exact matches scoring status correct. acceptable_variant matches scoring status "acceptable variant" (the 0.02 taught-versus-historical pairs). close is scoring status acceptable, or an incorrect substitution whose closeness is at least 0.5, or a far substitution whose low_confidence flag is true. far is an incorrect substitution whose closeness is below 0.5 and whose confidence is not low. missing and extra match those scoring statuses.

Enum: exact, acceptable_variant, close, far, missing, extra

HeardAs

FieldTypeRequiredDescription
schemestringyesThe request scheme. Koine is the product path. The letter table also covers attic-greek, classical-latin, ecclesiastical-latin, living-koine, and lucian. The worker scores koine-greek.
scriptenumyes
methodenumyesposterior when at least one candidate received a CTC forward score from the request posteriors. distance-softmax otherwise. Both paths order candidates with the same softmax. Published confidence is the Platt map, not that mass.
temperaturenumberyesSoftmax temperature used to order candidates. The shipped value is 0.1. Published confidence is a separate Platt map of the top-1 gap, the normalized tutor cost, and a non-word indicator.
other_scorenumberyesRank score of the other bin before the softmax. The shipped value is 0.5.
truncatedbooleanyesTrue when the one-edit neighborhood was capped at 1500 lexicon rows.
candidatesarray of HeardAsCandidateyesWhole-string ranking. For one word this is that word's list. For a verse it is the spelling of the whole clause; read words for a lexicon hit on each target word.
wordsarray of HeardAsWordyesOne ranking per target word, sliced by the tutor alignment.

HeardAsWord

FieldTypeRequiredDescription
wordstringyes
lemmastringyes
target_phonesarray of stringyes
observed_phonesarray of stringyesHeard phones aligned to this target word.
truncatedbooleanyes
candidatesarray of HeardAsCandidateyes

HeardAsCandidate

FieldTypeRequiredDescription
rankintegeryes
kindenumyes
is_wordbooleanyesTrue only for a lexicon row.
wordstring or nullLexicon orthography, or the generated spelling. Null for other.
lemmastring or null
greekstring or nullGreek spelling. The lexicon form for a word, the generated letters for a non-word. Null for Latin schemes and for other.
latinstring or nullASCII transliteration of the candidate phones. Null for other.
ipastring or null
phonesarray or null
similaritynumber or nullGuesser similarity of the candidate phones to the heard phones. A transliteration is one cheap edit below a perfect match (1 - 0.25/n - 0.01), not 1. Null for other.
scorenumberValue that entered the softmax, before truncation of the confidence.
ctc_log_probnumber or nullCTC forward log-probability when method is posterior and this candidate was scored. Null otherwise.
confidencenumberyesPlatt confidence of the top row, truncated to 6 decimals. Later rows keep softmax proportions scaled to stay below it. The list sums to at most 1.

Problem

RFC 9457 problem details. type is a section of the errors guide. detail is the same sentence earlier plain-text errors used.

FieldTypeRequiredDescription
typestringyesProblem type. A section of /docs/errors.
titlestringyesShort HTTP reason.
statusintegeryesHTTP status code.
detailstringyesOne sentence. No pronunciation advice.
instancestringRequest path.
codestringStable token on rate-limit, body-size, upload-slot, and audio_url failures. Examples include rate-limit-exceeded, body-too-large, upload-slots-full, audio-url-host.

UnscoredResponse

HTTP 200 when the trimmed audio is under 0.12 s. proximity is null. This is not a problem document.

FieldTypeRequiredDescription
apitutor-v1yes
schemestringyes
target_textstringyes
proximitynullyes
unscoredtoo_shortyes
duration_snumberyesTrimmed duration in seconds, 6 decimal places.
input_qualityobjectPresent on audio responses. Does not change proximity. Absent on IPA responses.

DifferentWord

Closest one-edit lexicon neighbor. detected does not change proximity. different_word: false on the request returns checked false and skips the search. A verse returns reason single-word targets only.

FieldTypeRequiredDescription
checkedbooleanyes
detectedbooleanyes
reasonstringPresent when a verse skips the check.
wordstring
lemmastring
similaritynumber

JsonRpcRequest

FieldTypeRequiredDescription
jsonrpc2.0yes
idstring / integer / nullString or number. Omit for a notification.
methodstringyes
paramsobject

JsonRpcResponse

FieldTypeRequiredDescription
jsonrpc2.0yes
idstring / integer / null
resultobject
errorobject

Headers

RateLimitPolicy

draft-ietf-httpapi-ratelimit-headers. Anonymous is "tutor";q=10;w=60. A key is "tutor";q=120;w=60. The Workers bindings TUTOR and TUTOR_KEY are authoritative when present. The in-memory window is the fallback.

RateLimit

Remaining requests r and whole seconds t until the oldest counted request leaves the window.

RetryAfter

Seconds to wait. Same value as RateLimit t, sent on 429.