> 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.

# IDで文字起こしを取得

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

以前に生成された文字起こしを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) — 取得する文字起こしの一意のID

## Response

### 200

文字起こしデータ

- `speech_to_text_transcripts_get_Response_200`

## Errors

### 422 Unprocessable Entity Error

検証エラー

- `detail` (list of ValidationError, optional)

## Types

### SpeechToTextChunkResponseModel

タイミング情報を含む、文字起こしのチャンクレベルの詳細。

- `language_code` (string, required) — 検出された言語コードです（例：英語の場合は'eng'）。
- `language_probability` (double, required) — 言語検出の信頼度スコア（0～1）。
- `text` (string, required) — 文字起こしの生テキスト。
- `words` (list of SpeechToTextWordResponseModel, required) — タイミング情報を含む単語のリスト。
- `channel_index` (integer, optional, nullable) — この文字起こしが属するチャンネルのインデックス（マルチチャンネルオーディオ用）。
- `additional_formats` (list of AdditionalFormatResponseModel, optional, nullable) — リクエストされた文字起こしの追加形式。
- `transcription_id` (string, optional, nullable) — レスポンスの文字起こしIDです。
- `entities` (list of DetectedEntity, optional, nullable) — 検出されたエンティティと、そのテキスト、タイプ、トランスクリプト内の文字位置のリスト。
- `audio_duration_secs` (double, optional, nullable) — 文字起こしされたオーディオの長さ（秒）。
- `edited_transcript` (SpeechToTextChunkResponseModelEditedTranscript, optional, nullable) — 任意の文字起こし編集の結果です。編集済みテキスト、または生成できなかった場合はエラーが含まれます。編集がリクエストされていない場合は含まれません。成功時は `text` と `edited_text` の両方に編集済みの文字起こしが格納されます。変更内容を確認するには、トップレベルの `text` と比較してください。

### MultichannelSpeechToTextResponseModel

マルチチャンネルのスピーチtoテキスト文字起こしのレスポンスモデル。

- `transcripts` (list of SpeechToTextChunkResponseModel, required) — オーディオチャンネルごとのトランスクリプトのリスト。各トランスクリプトには、対応するチャンネルのテキストと単語レベルの詳細が含まれます。
- `transcription_id` (string, optional, nullable) — レスポンスの文字起こしIDです。
- `audio_duration_secs` (double, optional, nullable) — 全チャンネルで文字起こしされたオーディオの長さ（秒）。

### ValidationError

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

### SpeechToTextWordResponseModel

タイミング情報を含む、文字起こしの単語レベルの詳細。

- `text` (string, required) — 文字起こしされた単語または音です。
- `type` (enum, required) — 単語または音のタイプです。'audio_event'は、笑い声や足音など、単語以外の音に使用します。
  - Allowed values: `word`, `spacing`, `audio_event`
- `logprob` (double, required) — この単語が予測された確率の対数。Logprobsの範囲は[-infinity, 0]で、値が高いほどモデルの予測に対する信頼度が高いことを示します。
- `start` (double, optional, nullable) — 単語または音の開始時刻（秒）。
- `end` (double, optional, nullable) — 単語またはサウンドの終了時刻（秒）。
- `speaker_id` (string, optional, nullable) — この単語の話者の一意の識別子。
- `characters` (list of SpeechToTextCharacterResponseModel, optional, nullable) — 単語を構成する文字とそのタイミング情報。
- `channel_index` (integer, optional, nullable) — この単語が発話されたチャンネル（マルチチャンネルオーディオ用）。単一チャンネルの文字起こしではNullです。

### AdditionalFormatResponseModel

- `requested_format` (string, required) — リクエストされた形式。
- `file_extension` (string, required) — 追加形式のファイル拡張子。
- `content_type` (string, required) — 追加形式のコンテンツタイプ。
- `is_base64_encoded` (boolean, required) — コンテンツがbase64エンコードされているかどうか。
- `content` (string, required) — 追加形式のコンテンツ。

### 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

任意の文字起こし編集の結果です。編集済みテキスト、または生成できなかった場合はエラーが含まれます。編集がリクエストされていない場合は含まれません。成功時は `text` と `edited_text` の両方に編集済みの文字起こしが格納されます。変更内容を確認するには、トップレベルの `text` と比較してください。

- `kind`: `error` (TranscriptEditError)
  - `error_type` ("edit_failed", required) — edit_failed：編集を生成できませんでした。
  - `message` (string, required) — 失敗に関する、ユーザー向けの簡潔な説明です。
- `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) — 文字起こしされた文字。
- `start` (double, optional, nullable) — 文字の開始時刻（秒）。
- `end` (double, optional, nullable) — 文字の終了時刻（秒）。

## 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()
```