> This is a page from the ElevenLabs documentation. For a complete page index, fetch https://elevenlabs.io/docs/llms.txt. For the full documentation in a single file, fetch https://elevenlabs.io/docs/llms-full.txt.

# Obter transcrição por ID

GET https://api.elevenlabs.io/v1/speech-to-text/transcripts/{transcription_id}

Recupere uma transcrição gerada anteriormente pelo ID.

Reference: https://elevenlabs.io/docs/api-reference/speech-to-text/get

## Servers

- `https://api.elevenlabs.io` (Production, default)
- `https://api.us.elevenlabs.io` (Production US)
- `https://api.eu.residency.elevenlabs.io` (Production EU)
- `https://api.in.residency.elevenlabs.io` (Production India)
- `https://api.sg.residency.elevenlabs.io` (Production Singapore)

## Request

### Path parameters

- `transcription_id` (string, required) — O ID exclusivo da transcrição a recuperar

## Response

### 200

Os dados da transcrição

- `speech_to_text_transcripts_get_Response_200`

## Errors

### 422 Unprocessable Entity Error

Erro de validação

- `detail` (list of ValidationError, optional)

## Types

### SpeechToTextChunkResponseModel

Detalhes da transcrição por trecho, com informações de tempo.

- `language_code` (string, required) — O código do idioma detectado (por exemplo, 'eng' para inglês).
- `language_probability` (double, required) — A pontuação de confiança da detecção de idioma (de 0 a 1).
- `text` (string, required) — O texto bruto da transcrição.
- `words` (list of SpeechToTextWordResponseModel, required) — Lista de palavras com suas informações de tempo.
- `channel_index` (integer, optional, nullable) — O índice do canal ao qual esta transcrição pertence (para áudio multicanal).
- `additional_formats` (list of AdditionalFormatResponseModel, optional, nullable) — Formatos adicionais solicitados para a transcrição.
- `transcription_id` (string, optional, nullable) — O ID da transcrição da resposta.
- `entities` (list of DetectedEntity, optional, nullable) — Lista de entidades detectadas com seu texto, tipo e posições de caracteres na transcrição.
- `audio_duration_secs` (double, optional, nullable) — A duração do áudio transcrito em segundos.
- `edited_transcript` (SpeechToTextChunkResponseModelEditedTranscript, optional, nullable) — Resultado da edição opcional da transcrição: o texto editado ou um erro, caso não tenha sido possível produzi-lo. Ausente quando nenhuma edição foi solicitada. Em caso de sucesso, tanto `text` quanto `edited_text` contêm a transcrição editada; compare-os com o `text` de nível superior para ver o que mudou.

### MultichannelSpeechToTextResponseModel

Modelo de resposta para transcrição de voz para texto multicanal.

- `transcripts` (list of SpeechToTextChunkResponseModel, required) — Lista de transcrições, uma para cada canal de áudio. Cada transcrição contém o texto e detalhes em nível de palavra do respectivo canal.
- `transcription_id` (string, optional, nullable) — O ID da transcrição da resposta.
- `audio_duration_secs` (double, optional, nullable) — A duração do áudio transcrito em todos os canais, em segundos.

### ValidationError

- `loc` (list of ValidationErrorLocItems, required)
- `msg` (string, required)
- `type` (string, required)

### SpeechToTextWordResponseModel

Detalhes da transcrição por palavra, com informações de tempo.

- `text` (string, required) — A palavra ou o som que foi transcrito.
- `type` (enum, required) — O tipo da palavra ou do som. 'audio_event' é usado para sons que não são palavras, como risadas ou passos.
  - Allowed values: `word`, `spacing`, `audio_event`
- `logprob` (double, required) — O logaritmo da probabilidade com que esta palavra foi prevista. Os logprobs ficam no intervalo [-infinity, 0]; logprobs mais altos indicam maior confiança do modelo em suas previsões.
- `start` (double, optional, nullable) — O horário de início da palavra ou do som em segundos.
- `end` (double, optional, nullable) — O tempo final da palavra ou do som em segundos.
- `speaker_id` (string, optional, nullable) — Identificador exclusivo do locutor desta palavra.
- `characters` (list of SpeechToTextCharacterResponseModel, optional, nullable) — Os caracteres que compõem a palavra e suas informações de tempo.
- `channel_index` (integer, optional, nullable) — O canal em que esta palavra foi falada (para áudio multicanal). Nulo para transcrições de canal único.

### AdditionalFormatResponseModel

- `requested_format` (string, required) — O formato solicitado.
- `file_extension` (string, required) — A extensão de arquivo do formato adicional.
- `content_type` (string, required) — O tipo de conteúdo do formato adicional.
- `is_base64_encoded` (boolean, required) — Se o conteúdo é codificado em base64.
- `content` (string, required) — O conteúdo do formato adicional.

### DetectedEntity

An entity detected within transcribed text.

- `text` (string, required) — The text that was identified as an entity.
- `entity_type` (string, required) — The type of entity detected (e.g., 'credit_card', 'email_address', 'person_name').
- `start_char` (integer, required) — Start character position in the transcript text.
- `end_char` (integer, required) — End character position in the transcript text.

### SpeechToTextChunkResponseModelEditedTranscript

Resultado da edição opcional da transcrição: o texto editado ou um erro, caso não tenha sido possível produzi-lo. Ausente quando nenhuma edição foi solicitada. Em caso de sucesso, tanto `text` quanto `edited_text` contêm a transcrição editada; compare-os com o `text` de nível superior para ver o que mudou.

- `kind`: `error` (TranscriptEditError)
  - `error_type` ("edit_failed", required) — edit_failed: não foi possível produzir a edição.
  - `message` (string, required) — Uma explicação curta da falha para o usuário.
- `kind`: `transcript` (EditedTranscript)
  - `edited_text` (string, required) — The edited transcript text. If no edits were made it will be identical to the `text` field.
  - `text` (string, required) — The committed transcript text the edit instruction was applied to.
  - `message_type` (string, optional, default: edited_transcript)

### ValidationErrorLocItems

### SpeechToTextCharacterResponseModel

- `text` (string, required) — O caractere que foi transcrito.
- `start` (double, optional, nullable) — O horário de início do caractere em segundos.
- `end` (double, optional, nullable) — O tempo final do caractere em segundos.

## Examples

**Response**

```json
{
  "language_code": "en",
  "language_probability": 0.98,
  "text": "Hello world!",
  "words": [
    {
      "end": 0.5,
      "logprob": -0.124,
      "speaker_id": "speaker_1",
      "start": 0,
      "text": "Hello",
      "type": "word"
    },
    {
      "end": 0.5,
      "logprob": 0,
      "speaker_id": "speaker_1",
      "start": 0.5,
      "text": " ",
      "type": "spacing"
    },
    {
      "end": 1.2,
      "logprob": -0.089,
      "speaker_id": "speaker_1",
      "start": 0.5,
      "text": "world!",
      "type": "word"
    }
  ]
}
```

**SDK Code**

```python
import requests

url = "https://api.elevenlabs.io/v1/speech-to-text/transcripts/transcription_id"

response = requests.get(url)

print(response.json())
```

```javascript
const url = 'https://api.elevenlabs.io/v1/speech-to-text/transcripts/transcription_id';
const options = {method: 'GET'};

try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```go
package main

import (
	"fmt"
	"net/http"
	"io"
)

func main() {

	url := "https://api.elevenlabs.io/v1/speech-to-text/transcripts/transcription_id"

	req, _ := http.NewRequest("GET", url, nil)

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```ruby
require 'uri'
require 'net/http'

url = URI("https://api.elevenlabs.io/v1/speech-to-text/transcripts/transcription_id")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Get.new(url)

response = http.request(request)
puts response.read_body
```

```java
import com.mashape.unirest.http.HttpResponse;
import com.mashape.unirest.http.Unirest;

HttpResponse<String> response = Unirest.get("https://api.elevenlabs.io/v1/speech-to-text/transcripts/transcription_id")
  .asString();
```

```php
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('GET', 'https://api.elevenlabs.io/v1/speech-to-text/transcripts/transcription_id');

echo $response->getBody();
```

```csharp
using RestSharp;

var client = new RestClient("https://api.elevenlabs.io/v1/speech-to-text/transcripts/transcription_id");
var request = new RestRequest(Method.GET);
IRestResponse response = client.Execute(request);
```

```swift
import Foundation

let request = NSMutableURLRequest(url: NSURL(string: "https://api.elevenlabs.io/v1/speech-to-text/transcripts/transcription_id")! as URL,
                                        cachePolicy: .useProtocolCachePolicy,
                                    timeoutInterval: 10.0)
request.httpMethod = "GET"

let session = URLSession.shared
let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in
  if (error != nil) {
    print(error as Any)
  } else {
    let httpResponse = response as? HTTPURLResponse
    print(httpResponse)
  }
})

dataTask.resume()
```