

本文属于机器翻译版本。若本译文内容与英语原文存在差异，则一律以英文原文为准。

# 启动和停止 Amazon Chime SDK 实时转录
<a name="initiate-transcription"></a>

您可以使用 Amazon Chime SDK [https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_StartMeetingTranscription.html](https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_StartMeetingTranscription.html) API 通过将 `TranscriptionConfiguration` 应用至会议来启动会议转录。Amazon Chime SDK 控制器将配置异步转发给会议。启动会议转录成功或失败通过亚马逊简单通知服务 (Amazon SNS) Simple Notification Service 和亚马逊发送的消息来表示。 EventBridge

**开始转录**  
此示例显示如何使用 Amazon Transcribe 开始实时转录。

```
POST /meetings/meetingId/transcription?operation=start HTTP/1.1 
Content-type: application/json
{
    "TranscriptionConfiguration": {
        "EngineTranscribeSettings": {
            "[https://docs.aws.amazon.com/transcribe/latest/dg/API_streaming_StartStreamTranscription.html#API_streaming_StartStreamTranscription_ResponseSyntax](https://docs.aws.amazon.com/transcribe/latest/dg/API_streaming_StartStreamTranscription.html#API_streaming_StartStreamTranscription_ResponseSyntax)": "en-US",  
            "[https://docs.aws.amazon.com/transcribe/latest/dg/API_streaming_StartStreamTranscription.html#API_streaming_StartStreamTranscription_ResponseSyntax](https://docs.aws.amazon.com/transcribe/latest/dg/API_streaming_StartStreamTranscription.html#API_streaming_StartStreamTranscription_ResponseSyntax)": "tag",
            "[https://docs.aws.amazon.com/transcribe/latest/dg/API_streaming_StartStreamTranscription.html#API_streaming_StartStreamTranscription_RequestSyntax](https://docs.aws.amazon.com/transcribe/latest/dg/API_streaming_StartStreamTranscription.html#API_streaming_StartStreamTranscription_RequestSyntax)": "profanity",
            "[https://docs.aws.amazon.com/transcribe/latest/dg/API_streaming_StartStreamTranscription.html#API_streaming_StartStreamTranscription_RequestSyntax](https://docs.aws.amazon.com/transcribe/latest/dg/API_streaming_StartStreamTranscription.html#API_streaming_StartStreamTranscription_RequestSyntax)": "lingo",
            "Region": "us-east-1"
            "[https://docs.aws.amazon.com/transcribe/latest/dg/API_streaming_StartStreamTranscription.html#API_streaming_StartStreamTranscription_RequestSyntax](https://docs.aws.amazon.com/transcribe/latest/dg/API_streaming_StartStreamTranscription.html#API_streaming_StartStreamTranscription_RequestSyntax)": true,  
            "[https://docs.aws.amazon.com/transcribe/latest/dg/API_streaming_StartStreamTranscription.html#API_streaming_StartStreamTranscription_RequestSyntax](https://docs.aws.amazon.com/transcribe/latest/dg/API_streaming_StartStreamTranscription.html#API_streaming_StartStreamTranscription_RequestSyntax)": "high",  
            "[https://docs.aws.amazon.com/transcribe/latest/dg/API_streaming_StartStreamTranscription.html#API_streaming_StartStreamTranscription_RequestSyntax](https://docs.aws.amazon.com/transcribe/latest/dg/API_streaming_StartStreamTranscription.html#API_streaming_StartStreamTranscription_RequestSyntax)": "PII",  
            "[https://docs.aws.amazon.com/transcribe/latest/dg/API_streaming_StartStreamTranscription.html#API_streaming_StartStreamTranscription_RequestSyntax](https://docs.aws.amazon.com/transcribe/latest/dg/API_streaming_StartStreamTranscription.html#API_streaming_StartStreamTranscription_RequestSyntax)": "PII",  
            "[https://docs.aws.amazon.com/transcribe/latest/dg/API_streaming_StartStreamTranscription.html#API_streaming_StartStreamTranscription_RequestSyntax](https://docs.aws.amazon.com/transcribe/latest/dg/API_streaming_StartStreamTranscription.html#API_streaming_StartStreamTranscription_RequestSyntax)": "ALL",  
            "[https://docs.aws.amazon.com/transcribe/latest/dg/API_streaming_StartStreamTranscription.html#API_streaming_StartStreamTranscription_RequestSyntax](https://docs.aws.amazon.com/transcribe/latest/dg/API_streaming_StartStreamTranscription.html#API_streaming_StartStreamTranscription_RequestSyntax)": "language-model"
        }
    }
}
```

此示例显示如何使用 Amazon Transcribe Medical 开始实时转录。

```
POST /meetings/meetingId/transcription?operation=start HTTP/1.1 
Content-type: application/json
{  
    "TranscriptionConfiguration": {
        "EngineTranscribeMedicalSettings": {
            "[https://docs.aws.amazon.com/transcribe/latest/dg/API_streaming_StartMedicalStreamTranscription.html](https://docs.aws.amazon.com/transcribe/latest/dg/API_streaming_StartMedicalStreamTranscription.html)": "en-US",
            "[https://docs.aws.amazon.com/transcribe/latest/dg/API_streaming_StartMedicalStreamTranscription.html](https://docs.aws.amazon.com/transcribe/latest/dg/API_streaming_StartMedicalStreamTranscription.html)": "PRIMARYCARE",
            "[https://docs.aws.amazon.com/transcribe/latest/dg/API_streaming_StartMedicalStreamTranscription.html](https://docs.aws.amazon.com/transcribe/latest/dg/API_streaming_StartMedicalStreamTranscription.html)": "CONVERSATION",
            "[https://docs.aws.amazon.com/transcribe/latest/dg/API_streaming_StartMedicalStreamTranscription.html](https://docs.aws.amazon.com/transcribe/latest/dg/API_streaming_StartMedicalStreamTranscription.html)": "lingo",
            "Region": "us-east-1",
           "[https://docs.aws.amazon.com/transcribe/latest/dg/API_streaming_StartMedicalStreamTranscription.html](https://docs.aws.amazon.com/transcribe/latest/dg/API_streaming_StartMedicalStreamTranscription.html)": "PHI", 
        }
   }
}
```

`StartMeetingTranscription` — 开始会议转录。  
`meetingId` — 由 [CreateMeeting API](https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_CreateMeeting.html#API_CreateMeeting_ResponseSyntax) 返回的会议 ID。  
`TranscriptionConfiguration` — 封装实时转录的参数。您必须精确指定一个配置，`EngineTranscribeSettings` 或 `EngineTranscribeMedicalSettings`。

`EngineTranscribeSettings` — 指定 Amazon Transcribe 的使用并将其设置传递给 [https://docs.aws.amazon.com/transcribe/latest/dg/API_streaming_StartStreamTranscription.html#API_streaming_StartStreamTranscription_RequestParameters](https://docs.aws.amazon.com/transcribe/latest/dg/API_streaming_StartStreamTranscription.html#API_streaming_StartStreamTranscription_RequestParameters)。  
`LanguageCode` – 必需。  
`VocabularyFilterMethod`：可选。  
`VocabularyFilterName`：可选。  
`VocabularyName`：可选。  
`Region`：可选。  
`EnablePartialResultsStabilization`：可选。  
`PartialResultsStability`：可选。  
` ContentIdentificationType`：可选。  
`ContentRedactionType`：可选。  
`PiiEntityTypes `：可选。  
`LanguageModelName`：可选。

`EngineTranscribeMedicalSettings` — 指定 Amazon Transcribe Medical 的使用并将其设置传递给 [https://docs.aws.amazon.com/transcribe/latest/dg/API_streaming_StartMedicalStreamTranscription.html#API_streaming_StartMedicalStreamTranscription_RequestParameters](https://docs.aws.amazon.com/transcribe/latest/dg/API_streaming_StartMedicalStreamTranscription.html#API_streaming_StartMedicalStreamTranscription_RequestParameters)。  
`LanguageCode` – 必需。  
`Speciality` – 必需。  
`Type` – 必需。  
`VocabularyName`：可选。  
`Region`：可选。  
` ContentIdentificationType`：可选。

**响应**  
Amazon Transcribe 和 Amazon Transcribe Medical 会作出以下响应：
+ 带空主体的 `OK` (200)，如果将 `TranscriptionConfiguration` 成功应用于会议。

**错误消息**  
Amazon Transcribe 和 Amazon Transcribe Medical 会显示以下错误消息：
+ **BadRequestException (400)：**输入参数与服务的限制不符。
+ **ForbiddenException (403)：**永久禁止客户端提出请求。
+ **NotFoundException (404)：**`meetingId`不存在。
+ **ResourceLimitExceededException (400)：**请求超过资源限制。例如，启用实时转录功能的会议太多。
+ **ServiceFailureException (500)：**服务遇到了意外错误。
+ **ServiceUnavailableException (503)：**该服务当前不可用。
+ **ThrottledClientException (429)：**客户端超出了其请求速率限制。
+ **UnauthorizedClientException (401)：**客户目前无权提出请求。

第二次呼叫 `StartMeetingTranscription` 会更新应用于会议的 `TranscriptionConfiguration`。

**停止转录**  
您可以使用 [https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_meeting-chime_StopMeetingTranscription.html](https://docs.aws.amazon.com/chime-sdk/latest/APIReference/API_meeting-chime_StopMeetingTranscription.html) API 删除用于给定 `meetingID` 和结束会议转录的 `TranscriptionConfiguration`。结束会议会自动停止转录。

此示例显示调用的 `StopMeetingTranscription` 请求语法。

```
POST/meetings/meetingId/transcription?operation=stop HTTP/1.1
```

**响应**  
Amazon Transcribe 和 Amazon Transcribe Medical 会作出以下响应：
+ 带空主体的 `OK` (200)，如果将 `TranscriptionConfiguration` 成功从会议中删除。

**错误消息**  
Amazon Transcribe 和 Amazon Transcribe Medical 会显示以下错误消息：
+ **BadRequestException (400)：**输入参数与服务的限制不符。
+ **ForbiddenException (403)：**永久禁止客户端提出请求。
+ **NotFoundException (404)：**`meetingId`不存在。
+ **ServiceFailureException (500)：**服务遇到了意外错误。
+ **ServiceUnavailableException (503)：**该服务当前不可用。
+ **ThrottledClientException (429)：**客户端超出了其请求速率限制。
+ **UnauthorizedClientException (401)：**客户目前无权提出请求。