> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jiekou.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# ElevenLabs Speech-to-Text V2

Transcribe audio or video files. When use\_multi\_channel is true and the uploaded audio has multiple channels, a 'transcripts' object is returned, with one transcription per channel. Otherwise, a single transcription result is returned.

## Request Headers

<ParamField header="Content-Type" type="string" required={true}>
  Enum value: `application/json`
</ParamField>

<ParamField header="Authorization" type="string" required={true}>
  Bearer authentication format: Bearer \{\{API Key}}.
</ParamField>

## Request Body

<ParamField body="seed" type="integer" nullable={true}>
  If specified, the system will do its best to sample deterministically. Requests with the same seed and parameters should return the same result, but absolute determinism is not guaranteed. Must be an integer between 0 and 2147483647.

  Range: \[0, 2147483647]
</ParamField>

<ParamField body="diarize" type="boolean" default={false}>
  Whether to label the current speaker in the uploaded file.
</ParamField>

<ParamField body="file_format" type="string" default="other">
  Input audio format. Options are 'pcm\_s16le\_16' or 'other'. pcm\_s16le\_16 requires the audio to be 16 kHz sample rate, 16-bit integer, mono, little-endian format, and has lower latency than encoded waveforms.

  Allowed values: `pcm_s16le_16`, `other`
</ParamField>

<ParamField body="temperature" type="number" nullable={true}>
  Controls the randomness of the transcription output. The range is 0.0 to 2.0; higher values produce more diverse and less deterministic results. If omitted, the default temperature of the selected model will be used (usually 0).

  Range: \[0, 2]
</ParamField>

<ParamField body="num_speakers" type="integer" nullable={true}>
  The maximum number of speakers in the uploaded file. This can be used to help distinguish speakers, with support for up to 32 speakers.

  Range: \[1, 32]
</ParamField>

<ParamField body="language_code" type="string" nullable={true}>
  Specify the ISO-639-1 or ISO-639-3 language code of the audio file. Providing it in advance can sometimes improve transcription performance. The default is null, which automatically detects the language.
</ParamField>

<ParamField body="tag_audio_events" type="boolean" default={true}>
  Whether to mark audio events such as (laughter) and (footsteps) in the transcription.
</ParamField>

<ParamField body="cloud_storage_url" type="string" required={true} nullable={true}>
  HTTPS link to the file to be transcribed. Exactly one of file and cloud\_storage\_url must be provided. The file must be accessible via HTTPS and smaller than 2 GB. Any valid HTTPS address is supported, including cloud storage (AWS S3, GCS, Cloudflare R2, etc.), CDNs, or other HTTPS sources. Presigned links with tokens or URL query parameter authentication are supported.
</ParamField>

<ParamField body="use_multi_channel" type="boolean" default={false}>
  Whether the audio file is multi-channel and each channel contains only a single speaker. When enabled, each channel will be transcribed independently and the results will be merged. Each word in the output contains a channel\_index field. Up to 5 channels are supported.
</ParamField>

<ParamField body="diarization_threshold" type="number" nullable={true}>
  Diarization threshold. With a higher value, one person is less likely to be split into multiple speakers, but different people are more likely to be merged into one speaker (fewer identified speakers). With a lower value, one person is more likely to be split into multiple speakers, but different people are less likely to be merged into one speaker (more speakers). Can only be set when diarize=True and num\_speakers=None. The default is None, which selects a threshold based on the model id (usually 0.22).

  Range: \[0.1, 0.4]
</ParamField>

<ParamField body="timestamps_granularity" type="string" default="word">
  The granularity of timestamps in the transcription. 'word' provides word-level timestamps, while 'character' provides timestamps for each character.

  Allowed values: `none`, `word`, `character`
</ParamField>

## Response Information

<Note>
  The response may be one of the following response types:
</Note>

<Accordion title="Response Type 1">
  <ResponseField name="text" type="string" required={true}>
    The raw transcribed text.
  </ResponseField>

  <ResponseField name="words" type="object[]" required={true}>
    A list of words and their timing information.

    <Expandable title="properties" defaultOpen={true}>
      <ResponseField name="end" type="number" required={false}>
        The end time of the word or sound in the audio, in seconds.
      </ResponseField>

      <ResponseField name="text" type="string" required={true}>
        The transcribed word or sound content.
      </ResponseField>

      <ResponseField name="type" type="string" required={true}>
        The type of this word or sound. 'audio\_event' is used for non-word sounds, such as laughter or footsteps.

        Allowed values: `word`, `spacing`, `audio_event`
      </ResponseField>

      <ResponseField name="start" type="number" required={false}>
        The start time of the word or sound in the audio, in seconds.
      </ResponseField>

      <ResponseField name="logprob" type="number" required={true}>
        The log probability when predicting this word. The logprob range is \[-infinity, 0]; a higher value indicates the model is more confident in its prediction.
      </ResponseField>

      <ResponseField name="characters" type="object[]" required={false}>
        The characters that make up the word and their corresponding timing information.

        <Expandable title="properties" defaultOpen={true}>
          <ResponseField name="end" type="number" required={false}>
            The end time of the character in the audio, in seconds.
          </ResponseField>

          <ResponseField name="text" type="string" required={true}>
            The transcribed character content.
          </ResponseField>

          <ResponseField name="start" type="number" required={false}>
            The start time of the character in the audio, in seconds.
          </ResponseField>
        </Expandable>
      </ResponseField>

      <ResponseField name="speaker_id" type="string" required={false}>
        The unique identifier of the speaker corresponding to this word.
      </ResponseField>
    </Expandable>
  </ResponseField>

  <ResponseField name="channel_index" type="integer" required={false}>
    The channel index corresponding to this transcription (valid for multi-channel audio).
  </ResponseField>

  <ResponseField name="language_code" type="string" required={true}>
    The detected language code (for example, 'eng' for English).
  </ResponseField>

  <ResponseField name="transcription_id" type="string" required={false}>
    The unique transcription ID for this response.
  </ResponseField>

  <ResponseField name="language_probability" type="number" required={true}>
    The confidence of language detection (between 0 and 1).
  </ResponseField>
</Accordion>

<Accordion title="Response Type 2">
  <ResponseField name="transcripts" type="object[]" required={true}>
    A list of transcriptions corresponding to each audio channel. Each transcription contains the text for its channel and word-level details.

    <Expandable title="properties" defaultOpen={true}>
      <ResponseField name="text" type="string" required={true}>
        The raw transcribed text.
      </ResponseField>

      <ResponseField name="words" type="object[]" required={true}>
        A list of words and their timing information.

        <Expandable title="properties" defaultOpen={true}>
          <ResponseField name="end" type="number" required={false}>
            The end time of the word or sound in the audio, in seconds.
          </ResponseField>

          <ResponseField name="text" type="string" required={true}>
            The transcribed word or sound content.
          </ResponseField>

          <ResponseField name="type" type="string" required={true}>
            The type of this word or sound. 'audio\_event' is used for non-word sounds, such as laughter or footsteps.

            Allowed values: `word`, `spacing`, `audio_event`
          </ResponseField>

          <ResponseField name="start" type="number" required={false}>
            The start time of the word or sound in the audio, in seconds.
          </ResponseField>

          <ResponseField name="logprob" type="number" required={true}>
            The log probability when predicting this word. The logprob range is \[-infinity, 0]; a higher value indicates the model is more confident in its prediction.
          </ResponseField>

          <ResponseField name="characters" type="object[]" required={false}>
            The characters that make up the word and their corresponding timing information.

            <Expandable title="properties" defaultOpen={true}>
              <ResponseField name="end" type="number" required={false}>
                The end time of the character in the audio, in seconds.
              </ResponseField>

              <ResponseField name="text" type="string" required={true}>
                The transcribed character content.
              </ResponseField>

              <ResponseField name="start" type="number" required={false}>
                The start time of the character in the audio, in seconds.
              </ResponseField>
            </Expandable>
          </ResponseField>

          <ResponseField name="speaker_id" type="string" required={false}>
            The unique identifier of the speaker corresponding to this word.
          </ResponseField>
        </Expandable>
      </ResponseField>

      <ResponseField name="channel_index" type="integer" required={false}>
        The channel index corresponding to this transcription (valid for multi-channel audio).
      </ResponseField>

      <ResponseField name="language_code" type="string" required={true}>
        The detected language code (for example, 'eng' for English).
      </ResponseField>

      <ResponseField name="transcription_id" type="string" required={false}>
        The unique transcription ID for this response.
      </ResponseField>

      <ResponseField name="language_probability" type="number" required={true}>
        The confidence of language detection (between 0 and 1).
      </ResponseField>
    </Expandable>
  </ResponseField>

  <ResponseField name="transcription_id" type="string" required={false}>
    The unique transcription ID for this response.
  </ResponseField>
</Accordion>
