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

# 导出项目转录

> 以 JSON、SRT 或 VTT 格式检索原始或已翻译的项目转录

# 导出项目转录

在不使用内部 Web 应用端点的情况下，从现有的 VoiceCheap 项目中检索转录。该端点支持源转录和所有可用的目标语言转录。
成功的请求将返回 HTTP `200`。

## 请求

**x-api-key** `string` *required*

您的 VoiceCheap API 密钥。

**projectId** `string` *required*

由 [创建项目](https://api-docs.voicecheap.ai/docs/zh/api-reference/create-project.md) 或 [开始翻译](https://api-docs.voicecheap.ai/docs/zh/api-reference/translate.md) 返回的项目标识符。

**source** `string` *required*

`original` 或 `translated`。

**targetLanguage** `string`

当 `source` 为 `translated` 时必需。请使用存储在项目上的目标语言名称，例如 `french`。

**outputFormat** `string` (default: json)

`json`、`srt` 或 `vtt`。

**includeSpeakerLabels** `boolean` (default: false)

在 SRT 或 VTT 中包含可见的发言者标签。JSON 始终包含发言者编号。

## 示例

```bash cURL — Original JSON theme={null}
curl -X POST "https://api.voicecheap.ai/v1/projects/project_123/transcript" \
  -H "x-api-key: vc_your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "source": "original",
    "outputFormat": "json"
  }'
```

```bash cURL — Translated SRT theme={null}
curl -X POST "https://api.voicecheap.ai/v1/projects/project_123/transcript" \
  -H "x-api-key: vc_your-api-key" \
  -H "Content-Type: application/json" \
  -d '{
    "source": "translated",
    "targetLanguage": "french",
    "outputFormat": "srt",
    "includeSpeakerLabels": true
  }' \
  --output project_123-fr.srt
```

JSON 响应使用 [转录媒体](https://api-docs.voicecheap.ai/docs/zh/api-reference/transcribe.md) 中记录的相同标准化转录结构。存储的项目转录包括片段时间戳、发言者、语言、可用时的置信度数据，以及用于已翻译输出的 `workId`。

## 翻译片段的语速

**segments\[].finalSpeedFactor** `number`

仅在已为片段生成语音后的翻译转录中出现。它是生成语音时长与片段窗口的比值，在最终节奏调整之前测量，并四舍五入到三位小数。`1` 表示语音自然贴合；大约高于 `1.3` 表示音频必须明显加速，低于 `0.9` 表示被放慢。

用它来调整[仅配音运行](https://api-docs.voicecheap.ai/docs/zh/api-reference/translate.md#dub-only-mode-bring-your-own-translation)：把翻译转录导出为 JSON，缩短 `finalSpeedFactor` 过高的字幕条，再把修订后的 SRT 发给[项目配音](https://api-docs.voicecheap.ai/docs/zh/api-reference/dub-project.md)。该值反映该片段最近一次生成的语音，因此每次运行都会更新。

## 错误

| 状态 | 代码 | 描述 |
| - | - | - |
| 400 | `TARGET_LANGUAGE_REQUIRED` | 请求了已翻译输出但未指定语言 |
| 401 | `INVALID_API_KEY` | API 密钥缺失或无效 |
| 403 | `FORBIDDEN` | API 密钥无法访问此项目 |
| 404 | `PROJECT_NOT_FOUND` | 项目不存在 |
| 404 | `TRANSCRIPT_NOT_FOUND` | 请求的源转录或翻译转录不存在 |
| 409 | `TRANSCRIPT_NOT_READY` | 请求的转录仍在处理中 |


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.