

本文為英文版的機器翻譯版本，如內容有任何歧義或不一致之處，概以英文版為準。

# 啟動和停止 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 Simple Notification Service (Amazon SNS) 和 Amazon 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)：**用戶端目前未獲授權發出請求。