forced-alignment

Create Forced Alignment

Changed on

Force align an audio file to text. Use this endpoint to get the timing information for each character and word in an audio file based on a provided text transcript.

post/v1/forced-alignment

Request

  • Base URL
    https://api.elevenlabs.io (the document declares no server; this is the origin it was published from)
  • URL
    https://api.elevenlabs.io/v1/forced-alignment
  • Auth
    none declared

Headers

xi-api-keystring nullable

Your API key. This is required by most endpoints to access our API programmatically. You can view your xi-api-key using the 'Profile' tab on the website.

Request body multipart/form-data

filestring binary required

The file to align. All major audio formats are supported. The file size must be less than 1GB.

textstring required

The text to align with the audio. The input text can be in any format, however diarization is not supported at this time.

Response

Successful Response

lossnumber required

The average alignment loss/confidence score for the entire transcript, calculated from all characters.

Example response

{
  "characters": [
    {
      "end": 0.02,
      "start": 0,
      "text": "H"
    }
  ],
  "words": [
    {
      "end": 1.02,
      "loss": 0.12,
      "start": 0,
      "text": "Hello"
    }
  ]
}

Changes

    • warning

      removed the request property

    • info

      api operation id Create_forced_alignment_v1_forced_alignment_post removed and replaced with forced_alignment

    • info

      added the required property to the response with the status

    • info

      added the required property // to the response with the status