Skip to navigation

Create alignment

Aligns a transcript to its recording: answers with the start and end of every word and of every sound in it, and how well each word fits the audio. Fillers, vocal sounds and cut-off words are aligned too when the transcript marks them. English only. The forced alignment guide covers the transcript conventions and every field of the response.

Authentication

AuthorizationBearer

Your API key, e.g. Authorization: Bearer nl_live_....

Request

This endpoint expects a multipart form containing a file.
filefileRequired

The recording to align, up to 25 MB and one hour. Same formats as transcription: wav, mp3, m4a, flac, ogg and webm. Send an hour as compressed audio (MP3 or Opus).

languageenumOptional

The language of the recording. Only en is supported; it is the default.

Allowed values:
modelenumRequired

The model to align with. Required; nyra-forced-aligner-en is the only one.

Allowed values:
textstringRequired1-200000 characters

What is said in the recording, word for word. Write fillers as [UH] and [UM], vocal sounds as [laughter], [cough], [breath] and the like, and cut-off words with a trailing hyphen (th-). Casing and punctuation are ignored. CrisperWhisper’s verbatim transcript is in exactly this form.

Response headers

x-nyra-audio-duration-msstring
x-nyra-cost-usdstring
x-nyra-test-modeenumOptional
Allowed values:
x-request-idstring

Response

The alignment. A key that starts with nl_test_ gets the transcript’s words spread evenly over the recording: no alignment runs and nothing is charged.

durationdouble
Duration of the decoded audio, in seconds.
languageenum
Allowed values:
skippedlist of strings

Transcript tokens that could not be aligned: unknown tags such as [music] and tokens without a pronunciation. Every other token is in words, in order.

usageobject
wordslist of objects

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
413
Content Too Large Error
429
Too Many Requests Error
503
Service Unavailable Error