

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

# 監控 Amazon Transcribe
<a name="monitoring-transcribe"></a>

監控是維護 Amazon Transcribe 和其他 AWS 解決方案的可靠性、可用性和效能的重要部分。 AWS 提供下列監控工具，讓您監看 Amazon Transcribe、回報錯誤，並適時採取自動動作：
+ **Amazon CloudWatch** AWS 會即時監控您的 AWS 資源和您在 上執行的應用程式。您可以收集和追蹤指標、建立自訂儀板表，以及設定警示，在特定指標達到您指定的閾值時通知您或採取動作。例如，您可以在 Amazon EC2 執行個體上 CloudWatch 追蹤 CPU 用量或其他指標，並在需要時自動啟動新的執行個體。
+ **Amazon CloudWatch Logs** 可以從 Amazon EC2 執行個體和其他來源監控 CloudTrail、存放和存取您的日誌檔案。 CloudWatch Logs 可以監控日誌檔案中的資訊，並在達到特定閾值時通知您。您也可以將日誌資料存檔在高耐用性的儲存空間。
+ **AWS CloudTrail** 會擷取由 發出或代表發出的 API 呼叫和相關事件， AWS 帳戶 並將日誌檔案交付至您指定的 儲存 Amazon S3 貯體。您可以識別呼叫的使用者和帳戶 AWS、進行呼叫的來源 IP 地址，以及呼叫的時間。

如需詳細資訊，請參閱*「[Amazon CloudWatch 使用者指南」](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html)*。

**Amazon EventBridge** 是一種無伺服器服務，使用事件將應用程式元件連接在一起，讓您更輕鬆地建置可擴展的事件驅動型應用程式。 可從您自己的應用程式、軟體即服務 (SaaS) 應用程式 AWS 和服務 EventBridge 提供即時資料串流，並將該資料路由到 等目標 Lambda。您可以監控在服務中發生的事件，並建置事件驅動架構。如需詳細資訊，請參閱*「[Amazon EventBridge 使用者指南」](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-what-is.html)*。

**Topics**
+ [Amazon Transcribe 使用 監控 Amazon CloudWatch](monitoring-cloudwatch.md)
+ [Amazon Transcribe 使用 監控 AWS CloudTrail](monitoring-transcribe-cloud-trail.md)
+ [Amazon EventBridge 搭配 使用 Amazon Transcribe](monitoring-events.md)

# Amazon Transcribe 使用 監控 Amazon CloudWatch
<a name="monitoring-cloudwatch"></a>

您可以使用 監控 Amazon Transcribe CloudWatch，這會收集原始資料並將其處理為可讀且近乎即時的指標。這些統計資料會保留 15 個月，以便您存取歷史資訊，並更清楚 Web 應用程式或服務的執行效能。您也可以設定留意特定閾值的警示，當滿足這些閾值時傳送通知或採取動作。如需詳細資訊，請參閱[「*CloudWatch 使用者指南」*](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/WhatIsCloudWatch.html)。

## 搭配 使用 Amazon CloudWatch 指標和維度 Amazon Transcribe
<a name="monitoring-cwmetrics"></a>

Amazon Transcribe 支援 CloudWatch 指標和維度，這些資料可協助您監控效能。支援的指標類別包括與轉錄作業相關聯的流量、錯誤、資料傳輸和延遲。支援的指標透過 位於 **AWS/Transcribe** 命名空間 CloudWatch 中。

**注意**  
CloudWatch 監控指標是免費的，且不計入 CloudWatch 服務配額。

如需 CloudWatch 指標的詳細資訊，請參閱[使用 Amazon CloudWatch 指標](https://docs.aws.amazon.com/AmazonCloudWatch/latest/monitoring/working_with_metrics.html)。


**CloudWatch 的 指標 Amazon Transcribe**  

| 指標 | 服務類型 | Description | 
| --- | --- | --- | 
| TotalRequestCount | 批次，串流 |  顯示交易的數量。代表對 Transcribe 提出所有成功和失敗的請求。 **單位**：計數 **相關統計資料**：總和、平均數 **有效維度**：`Domain`、`ServiceType`、`Operation`、`LanguageCode`  | 
| SuccessfulRequestCount | 批次 |  顯示成功請求的數量。成功請求的回應碼範圍是 200-299。 **單位**：計數 **相關統計資料**：總和、平均數 **有效維度**：`Domain`、`ServiceType`、`Operation`  | 
| SyncServerErrorCount | 批次 |  顯示伺服器錯誤的次數。伺服器錯誤的回應碼範圍是 500-599。 **單位**：計數 **相關統計資料**：總和、平均數 **有效維度**：`Domain`、`ServiceType`、`Operation`  | 
| SyncUserErrorCount | 批次 |  顯示使用者錯誤的數量，例如無效的參數、檔案和權限，以及限流錯誤。使用者錯誤的回應碼範圍是 400-499。 **單位**：計數 **相關統計資料**：總和、平均數 **有效維度**：`Domain`、`ServiceType`、`Operation`  | 
| ThrottledCount | 批次，串流 |  顯示因超過交易速率配額而傳回 **LimitExceededException** 的請求數目。 Amazon Transcribe 限制客戶每秒可以提出的請求數目。如果 AWS 帳戶 經常超過為 設定的配額限制，您可以請求增加配額。若要請求增加配額，請參閱 [AWS 服務 配額](https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html)。 **單位**：計數 **相關統計資料**：總和、平均數 **有效維度**：`Domain`、`ServiceType`、`Operation`  | 
| LimitExceededCount | 批次，串流 |  顯示因超過非速率配額而傳回 **LimitExceededException** 的請求數目。 Amazon Transcribe 限制並行任務數目、轉錄總數、音訊檔案大小上限等。如果 AWS 帳戶 經常超過 的限制，您可以請求提高配額。若要請求增加配額，請參閱 [AWS 服務 配額](https://docs.aws.amazon.com/general/latest/gr/aws_service_limits.html)。 **單位**：計數 **相關統計資料**：總和、平均數 **有效維度**：`Domain`、`ServiceType`、`Operation`  | 
| AsyncUserErrorCount | 批次 |  非同步 （後端） 使用者錯誤的數量，例如：指定的音訊格式不符合偵測到的格式、無效的取樣率、客戶 Amazon S3 存取錯誤。 **單位**：計數 **相關統計資料**：總和、平均數 **有效維度**：`Domain`、`ServiceType`、`Operation` **操作**：`StartCallAnalyticsJob`、`StartMedicalTranscriptionJob`、`StartTranscriptionJob`、`CreateMedicalVocabulary`、`CreateVocabulary`、`UpdateMedicalVocabulary`、`UpdateVocabulary`  | 
| AsyncServerErrorCount | 批次 |  非同步 (後端) 伺服器錯誤或更具體而言，自動語音辨識 (ASR) 處理錯誤的數量。 **單位**：計數 **相關統計資料**：總和、平均數 **有效維度**：`Domain`、`ServiceType`、`Operation` **操作**：`StartCallAnalyticsJob`、`StartMedicalTranscriptionJob`、`StartTranscriptionJob`、`CreateMedicalVocabulary`、`CreateVocabulary`、`UpdateMedicalVocabulary`、`UpdateVocabulary`  | 
| AudioDurationTime | 批次 |  音訊或影片檔案的長度 (以秒為單位)。 **單位：**秒 **相關統計資訊**：平均數、最小值、最大值 **有效維度**：`Domain`、`ServiceType`、`LanguageCode`  | 
| ConcurrentStreamsCount | 串流 |  顯示目前正在處理的並行串流數量。 **單位**：計數 **相關統計資料**：平均值、最大值 **有效維度**：`Domain`、 `ServiceType`  | 
| ConcurrentPostStreamJobsCount | 串流 |  顯示目前正在處理的並行 AWS HealthScribe 串流後分析數目。 **單位**：計數 **相關統計資料**：平均值、最大值 **有效維度**：`Domain`、`ServiceType`、`Operation`  | 
| PostStreamJobLimitExceededCount | 串流 |  顯示因並行後串流任務限制超過配額`LimitExceededException`而傳回 的請求數量。 **單位**：計數 **相關統計資料**：總和、平均數 **有效維度**：`Domain`、`ServiceType`、`Operation`  | 


**CloudWatch 的 維度 Amazon Transcribe**  

| 維度 | 描述 | 
| --- | --- | 
| Domain |  僅顯示具有指定 Transcribe 類型的指標。 **有效選項**：Transcribe、Transcribe Medical、Transcribe 呼叫分析  | 
| ServiceType |  僅顯示具有指定服務類型的指標。 **有效選項**：批次  | 
| Operation |  僅顯示具有指定操作的指標。 **有效選項**：任何 Amazon Transcribe API  | 
| LanguageCode |  僅顯示具有指定語言的指標。 **有效選項**：任何有效的語言代碼，在表格 `en-US`  | 

# Amazon Transcribe 使用 監控 AWS CloudTrail
<a name="monitoring-transcribe-cloud-trail"></a>

Amazon Transcribe 已與 服務整合 AWS CloudTrail，此服務提供 Amazon Transcribe 由 AWS Identity and Access Management (IAM) 使用者或角色，或由 AWS 服務在 中所採取動作的記錄。 CloudTrail 擷取 的所有 API 呼叫 Amazon Transcribe。這包括來自 的呼叫， AWS 管理主控台 以及對 Amazon Transcribe APIs程式碼呼叫，即事件。透過建立線索，您可以將 CloudTrail 事件持續交付至 Amazon S3 儲存貯體 Amazon Transcribe，包括 的事件。如果您不建立追蹤，仍然可以在 **Event history**(事件歷史記錄)，檢視 CloudTrail AWS 管理主控台 中的最新事件。使用 所收集的資訊 CloudTrail，您可以查看所提出的每個請求 Amazon Transcribe、提出請求的 IP 地址、提出請求的人員、提出請求的時間，以及其他詳細資訊。

若要進一步了解 CloudTrail，請參閱 [https://docs.aws.amazon.com/awscloudtrail/latest/userguide/](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/)。

## Amazon Transcribe 而且 CloudTrail
<a name="transcribe-info-in-cloudtrail"></a>

CloudTrail 當您建立帳戶 AWS 帳戶 時， 會在 上啟用 。當活動在 中發生時 Amazon Transcribe，該活動會與 CloudTrail 事件 CloudTrail **歷史記錄**中的其他 AWS 服務 事件一起記錄在事件中。您可以在 中檢視、搜尋和下載最近的事件 AWS 帳戶。如需詳細資訊，請參閱[使用 CloudTrail 事件歷程記錄檢視事件](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/view-cloudtrail-events.html)。

若要取得 中事件的持續記錄 AWS 帳戶，包括 的事件 Amazon Transcribe，請建立追蹤。*線索*是一種組態，可讓 CloudTrail 將事件做為日誌檔案交付至指定的 Amazon S3 bucket. CloudTrail log 檔案，其中包含一或多個日誌項目。*事件*代表來自任何來源的單一請求。它包含有關請求的動作、動作的日期和時間、請求參數等資訊。 CloudTrail log 檔案不是公有 API 呼叫的排序堆疊追蹤，因此不會以任何特定順序顯示。

根據預設，當您在 中建立線索時 AWS 管理主控台，線索會套用至所有 AWS 區域。線索會記錄 AWS 分割區 AWS 區域 中所有 的事件，並將日誌檔案傳送到您指定的儲存 Amazon S3 貯體。此外，您可以設定其他 AWS 服務 來進一步分析和處理 CloudTrail 日誌中收集的事件資料。如需詳細資訊，請參閱：
+ [建立追蹤的概觀](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-create-and-update-a-trail.html)
+ [CloudTrail 支援的服務和整合](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-aws-service-specific-topics.html#cloudtrail-aws-service-specific-topics-integrations)
+ [設定 的 Amazon SNS 通知 CloudTrail](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/getting_notifications_top_level.html)
+ [接收多個區域的 CloudTrail 日誌檔案](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html)及[接收多個帳戶的 CloudTrail 日誌檔案](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-receive-logs-from-multiple-accounts.html)

CloudTrail 會記錄 API [參考](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_Reference.html)中記錄的所有 Amazon Transcribe 動作。例如，[https://docs.aws.amazon.com/transcribe/latest/APIReference/API_CreateVocabulary.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_CreateVocabulary.html)、 [https://docs.aws.amazon.com/transcribe/latest/APIReference/API_GetTranscriptionJob.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_GetTranscriptionJob.html)和 [https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartTranscriptionJob.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartTranscriptionJob.html)操作會在 CloudTrail 日誌檔案中產生項目。當 CloudTrail 記錄 Amazon Transcribe API 操作時，CloudTrail 日誌項目會對請求和回應參數中的敏感資訊使用空字串，例如 Amazon S3 URI 值。

每一筆事件或日誌專案都會包含產生請求者的資訊。此資訊可協助您判斷下列事項：
+ 是否使用根登入資料或 IAM 使用者登入資料提出請求
+ 提出該請求時，是否使用特定 IAM 角色或聯合身分使用者的暫時安全登入資料
+ 請求是否由另一個 提出 AWS 服務

如需詳細資訊，請參閱 [CloudTrail 使用者身分元素](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-event-reference-user-identity.html)。

您也可以將多個 AWS 區域 和多個 的 Amazon Transcribe 日誌檔案彙總 AWS 帳戶 到單一儲存 Amazon S3 貯體。如需詳細資訊，請參閱[從多個區域接收 CloudTrail 日誌檔案](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/receive-cloudtrail-log-files-from-multiple-regions.html)和[從多個帳戶接收 CloudTrail 日誌檔案](https://docs.aws.amazon.com/awscloudtrail/latest/userguide/cloudtrail-receive-logs-from-multiple-accounts.html)。

### 範例： Amazon Transcribe 日誌檔案項目
<a name="cloud-trail-log-entry"></a>

*線索*是一種組態，可讓您將事件做為日誌檔案交付至指定的 Amazon S3 bucket. CloudTrail log 檔案，其中包含一或多個日誌項目。*事件*代表來自任何來源的單一請求。它包含請求動作做為動作日期和時間的這類資訊，而 request parameters. CloudTrail log 檔案不是公有 API 呼叫的排序堆疊追蹤，因此不會以任何特定順序顯示。

[https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartTranscriptionJob.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartTranscriptionJob.html) 和 [https://docs.aws.amazon.com/transcribe/latest/APIReference/API_GetTranscriptionJob.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_GetTranscriptionJob.html) 操作的呼叫會建立以下項目。

**注意**  
當 CloudTrail 記錄 Amazon Transcribe API 操作時，CloudTrail 日誌項目會對請求和回應參數中的敏感資訊使用空字串，例如 Amazon S3 URI 值。

```
{
    "Records": [
        {
            "eventVersion": "1.05",
            "userIdentity": {
                "type": "IAMUser",
                "principalId": "111122223333",
                "arn": "arn:aws:iam:us-west-2:111122223333:user/my-user-name",
                "accountId": "111122223333",
                "accessKeyId": "AKIAIOSFODNN7EXAMPLE",
                "userName": "my-user-name"
            },
            "eventTime": "2022-03-07T15:03:45Z",
            "eventSource": "transcribe.amazonaws.com",
            "eventName": "StartTranscriptionJob",
            "awsRegion": "us-west-2",
            "sourceIPAddress": "127.0.0.1",
            "userAgent": "[]",
            "requestParameters": {
                "mediaFormat": "flac",
                "languageCode": "en-US",
                "transcriptionJobName": "my-first-transcription-job",
                "media": {
                    "mediaFileUri": ""
                }
            },
            "responseElements": {
                "transcriptionJob": {
                    "transcriptionJobStatus": "IN_PROGRESS",
                    "mediaFormat": "flac",
                    "creationTime": "2022-03-07T15:03:44.229000-08:00",
                    "transcriptionJobName": "my-first-transcription-job",
                    "languageCode": "en-US",
                    "media": {
                        "mediaFileUri": ""
                    }
                }
            },
            "requestID": "47B8E8D397DCE7A6",
            "eventID": "cdc4b7ed-e171-4cef-975a-ad829d4123e8",
            "eventType": "AwsApiCall",
            "recipientAccountId": "111122223333"
        },
        {
            "eventVersion": "1.05",
            "userIdentity": {
                "type": "IAMUser",
                "principalId": "111122223333",
                "arn": "arn:aws:iam:us-west-2:111122223333:user/my-user-name",
                "accountId": "111122223333",
                "accessKeyId": "AKIAIOSFODNN7EXAMPLE",
                "userName": "my-user-name"
            },
            "eventTime": "2022-03-07T15:07:11Z",
            "eventSource": "transcribe.amazonaws.com",
            "eventName": "GetTranscriptionJob",
            "awsRegion": "us-west-2",
            "sourceIPAddress": "127.0.0.1",
            "userAgent": "[]",
            "requestParameters": {
                "transcriptionJobName": "my-first-transcription-job"
            },
            "responseElements": {
                "transcriptionJob": {
                    "settings": {
                        
                    },
                    "transcriptionJobStatus": "COMPLETED",
                    "mediaFormat": "flac",
                    "creationTime": "2022-03-07T15:03:44.229000-08:00",
                    "transcriptionJobName": "my-first-transcription-job",
                    "languageCode": "en-US",
                    "media": {
                        "mediaFileUri": ""
                    },
                    "transcript": {
                        "transcriptFileUri": ""
                    }
                }
            },
            "requestID": "BD8798EACDD16751",
            "eventID": "607b9532-1423-41c7-b048-ec2641693c47",
            "eventType": "AwsApiCall",
            "recipientAccountId": "111122223333"
        }        
    ]
}
```

# Amazon EventBridge 搭配 使用 Amazon Transcribe
<a name="monitoring-events"></a>

使用 Amazon EventBridge，您可以透過在其他 中啟動事件來回應任務 Amazon Transcribe 中的狀態變更 AWS 服務。當轉錄任務變更狀態時， EventBridge 會自動將事件傳送至事件串流。您會建立規則以定義要在事件串流中監控的事件，以及發生這些事件時 EventBridge 應該採取的動作。例如，將事件路由到另一個服務 (或目標)，此服務可接著採取動作。例如，您可以設定規則，在轉錄任務成功完成時將事件路由至 AWS Lambda 函數。若要定義[EventBridge 規則](#defining-rules)，請參閱下列各節。

您可以透過多個管道接收事件的通知，包括電子郵件、[聊天應用程式中的 Amazon Q Developer](https://docs.aws.amazon.com/chatbot/latest/adminguide/what-is.html) 聊天通知或[AWS Console Mobile Application](https://docs.aws.amazon.com/consolemobileapp/latest/userguide/what-is-consolemobileapp.html)推播通知。您也可以在[主控台通知中心](https://console.aws.amazon.com/notifications/)查看通知。如果您想要設定通知，您可以使用 [AWS 使用者通知](https://docs.aws.amazon.com/notifications/latest/userguide/what-is.html). AWS 使用者通知 supports 彙總，這可以減少您在特定事件期間收到的通知數量。

## 定義 EventBridge 規則
<a name="defining-rules"></a>

若要定義 EventBridge 規則，請使用 [AWS 管理主控台](https://console.aws.amazon.com/events)。定義規則時，請使用 Amazon Transcribe 做為服務名稱。如需如何建立 EventBridge 規則的範例，請參閱 [Amazon EventBridge 規則](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-rules.html)。

使用前 EventBridge，請注意下列定義：
+ **事件**–事件表示您其中一個轉錄作業的狀態變更。例如，工作的 `TranscriptionJobStatus` 從 `IN_PROGRESS` 變更為 `COMPLETED`。
+ **目標**-目標是處理事件的另一個 AWS 服務 。例如， AWS Lambda 或 Amazon Simple Notification Service (Amazon SNS)。目標會收到 JSON 格式的事件。
+ **規則** – 規則符合您要 EventBridge 監看的傳入事件，並將其路由至目標或目標進行處理。如果規則將事件路由到多個目標，所有的目標都會平行處理事件。規則可自訂傳送到目標的 JSON。

Amazon EventBridge 事件會盡最大努力發出。如需在 中建立和管理事件的詳細資訊 EventBridge，請參閱*Amazon EventBridge 《 使用者指南*》中的[Amazon EventBridge 事件](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-events.html)。

以下是轉錄任務的狀態變更為 `COMPLETED`或 時 Amazon Transcribe 啟動的 EventBridge 規則範例`FAILED`。

```
{
    "source": [
        "aws.transcribe"
    ],
    "detail-type": [
        "Transcribe Job State Change"
    ],
    "detail": {
        "TranscriptionJobStatus": [
            "COMPLETED",
            "FAILED"
        ]
    }
}
```

該規則包含下列欄位：
+ `source`–事件的來源。對於 Amazon Transcribe，這一律是 `aws.transcribe`。
+ `detail-type`–事件詳細資訊的識別子。對於 Amazon Transcribe，這一律為 `Transcribe Job State Change`。
+ `detail`–轉錄作業的新作業狀態。在這個範例中，規則會在工作狀態變更為 `COMPLETED` 或 `FAILED` 時啟動事件。

## Amazon Transcribe 事件
<a name="events"></a>

Amazon EventBridge 會記錄數個 Amazon Transcribe 事件：
+ [轉錄作業事件](#job-event)
+ [語言識別事件](#lang-id-event)
+ [呼叫分析事件](#analytics-event)
+ [通話分析通話後事件](#analytics-stream-event)
+ [詞彙事件](#vocab-event)

這些事件都包含下列共用欄位：
+ `version`：事件資料的版本。這個值一律為 `0`。
+ `id`： EventBridge 為事件產生的唯一識別符。
+ `detail-type`：事件詳細資訊的識別子。例如 `Transcribe Job State Change`。
+ `source`：事件的來源。因此一律 Amazon Transcribe 為 `aws.transcribe`。
+ `account`：產生 API 呼叫的帳戶 AWS 帳戶 ID。
+ `time`：事件傳送的日期和時間。
+ `region`：發出請求 AWS 區域 的 。
+ `resources`：API 呼叫使用的資源。對於 Amazon Transcribe，此欄位一律為空白。
+ `detail`：有關事件的其他詳細資訊。
  + `FailureReason`：如果狀況或狀態變更為 `FAILED`，則會顯示此欄位，並描述 `FAILED` 狀況或狀態的原因。
  + 每個事件類型都有其他唯一欄位，顯示在 `detail` 下方。這些唯一欄位會在每個事件範例後的下列各節定義。

### 轉錄作業事件
<a name="job-event"></a>

當任務的狀態從 變更為 `IN_PROGRESS``COMPLETED`或 時`FAILED`， Amazon Transcribe 會產生事件。若要識別變更狀態且在目標中啟動事件的工作，請使用該事件的 `TranscriptionJobName` 欄位。 Amazon Transcribe 事件包含下列資訊。如果您的轉錄作業狀態為 `FAILED`，則會在 `detail` 下方新增 `FailureReason` 欄位。

請注意，此事件僅適用於 [https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartTranscriptionJob.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartTranscriptionJob.html) API 操作。

```
{
    "version": "0",
    "id": "event ID",
    "detail-type":"Transcribe Job State Change",
    "source": "aws.transcribe",
    "account": "111122223333",
    "time": "timestamp",
    "region": "us-west-2",
    "resources": [],
    "detail": {
          "TranscriptionJobName": "my-first-transcription-job",
          "TranscriptionJobStatus": "COMPLETED" (or "FAILED")
    }   
}
```
+ `TranscriptionJobName`：您為轉錄作業選擇的唯一名稱。
+ `TranscriptionJobStatus `：轉錄作業的狀態。此值可以為 `COMPLETED` 或 `FAILED`。

### 語言識別事件
<a name="lang-id-event"></a>

您啟用[自動語言識別](lang-id.md)時， Amazon Transcribe 會在語言識別狀態為 `COMPLETED` 或 `FAILED` 時產生事件。若要識別變更狀態且在目標中啟動事件的工作，請使用該事件的 `JobName` 欄位。 Amazon Transcribe 事件包含下列資訊。如果您的語言識別狀態為 `FAILED`，則會在 `detail` 下方新增 `FailureReason` 欄位。

請注意，此事件僅適用於包含 [https://docs.aws.amazon.com/transcribe/latest/APIReference/API_LanguageIdSettings.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_LanguageIdSettings.html) 參數時的 [https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartTranscriptionJob.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartTranscriptionJob.html) API 操作。

```
{
    "version": "0",
    "id": "event ID",
    "detail-type": "Language Identification State Change",
    "source": "aws.transcribe",
    "account": "111122223333",
    "time": "timestamp",
    "region": "us-west-2",
    "resources": [],
    "detail": {
        "JobType": "TranscriptionJob",
        "JobName": "my-first-lang-id-job",
        "LanguageIdentificationStatus": "COMPLETED" (or "FAILED")
    }
}
```
+ `JobType`: 對於轉錄作業，此值必須是 `TranscriptionJob`。
+ `JobName`：轉錄作業的唯一名稱。
+ `LanguageIdentificationStatus`：轉錄作業中語言識別的狀態。此值可以為 `COMPLETED` 或 `FAILED`。

### 呼叫分析事件
<a name="analytics-event"></a>

[通話分析](call-analytics.md)工作狀態從 `IN_PROGRESS` 變更為 `COMPLETED` 或 `FAILED` 時， Amazon Transcribe 就會產生事件。若要識別變更狀態且在目標中啟動事件的通話分析工作，請使用該事件的 `JobName` 欄位。 Amazon Transcribe 事件包含下列資訊。如果您的通話分析工作狀態為 `FAILED`，則會在 `detail` 下方新增 `FailureReason` 欄位。

請注意，此事件僅適用於 [https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartCallAnalyticsJob.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_StartCallAnalyticsJob.html) API 操作。

```
{
    "version": "0",
    "id": "event ID",
    "detail-type": "Call Analytics Job State Change",
    "source": "aws.transcribe",
    "account": "111122223333",
    "time": "timestamp",
    "region": "us-west-2",
    "resources": [],
    "detail": {
        "JobName": "my-first-analytics-job",
        "JobStatus": "COMPLETED" (or "FAILED"),
        "FailureReason": "failure reason", // only present when JobStatus is FAILED
        "AnalyticsJobDetails": { // only when you enable optional features such as Generative Call Summarization
            "Skipped": []
        }
    }
}
```
+ `JobName`：通話分析轉錄作業的唯一名稱。
+ `JobStatus`：您的通話分析轉錄作業的狀態。可以是 `COMPLETED` 或 `FAILED`。
+ `FailureReason`：只有在 `JobStatus`為 時，才會出現此欄位`FAILED`，並說明失敗的原因。
+ `AnalyticsJobDetails`：通話分析轉錄任務的詳細資訊，包括略過的分析功能的相關資訊。

### 通話分析通話後事件
<a name="analytics-stream-event"></a>

[通話後分析](tca-post-call.md)轉錄狀態從 `IN_PROGRESS` 變更為 `COMPLETED` 或 `FAILED` 時， Amazon Transcribe 會產生事件。若要識別變更狀態且在目標中啟動事件的通話分析通話後工作，請使用該事件的 `StreamingSessionId` 欄位。

請注意，此事件僅適用於包含 [https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_PostCallAnalyticsSettings.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_PostCallAnalyticsSettings.html) 參數時的 [https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_StartCallAnalyticsStreamTranscription.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_StartCallAnalyticsStreamTranscription.html)API 操作。

`COMPLETED` 事件包含下列資訊：

```
{
    "version": "0",
    "id": "event ID",
    "detail-type": "Call Analytics Post Call Job State Change",
    "source": "aws.transcribe",
    "account": "111122223333",
    "time": "timestamp",
    "region": "us-west-2",
    "resources": [],
    "detail": {
        "StreamingSessionId": "session-id",
        "PostCallStatus": "COMPLETED",
        "Transcript": {
            "RedactedTranscriptFileUri": "s3://amzn-s3-demo-bucket/my-output-files/my-redacted-file.JSON",
            "TranscriptFileUri": "s3://amzn-s3-demo-bucket/my-output-files/my-file.JSON"
        },
        "Media": {
            "MediaFileUri": "s3://amzn-s3-demo-bucket/my-output-files/my-redacted-file.WAV",
            "RedactedMediaFileUri": "s3://amzn-s3-demo-bucket/my-output-files/my-redacted-file.WAV"
        }
    }
}
```

`FAILED` 事件包含下列資訊：

```
{
    "version": "0",
    "id": "event ID",
    "detail-type": "Call Analytics Post Call Job State Change",
    "source": "aws.transcribe",
    "account": "111122223333",
    "time": "timestamp",
    "region": "us-west-2",
    "resources": [],
    "detail": {
        "StreamingSessionId": "session-id",
        "PostCallStatus": "FAILED"
    }
}
```
+ `StreamingSessionId`：指定給您即時通話分析轉錄請求的識別號碼。
+ `PostCallStatus`：通話後通話分析轉錄的狀態。可以是 `COMPLETED` 或 `FAILED`。
+ `Transcript`：您修訂和未修訂的文字記錄的 URI。
+ `Media`：您修訂和未修訂的音訊檔案的 URI。

### AWS HealthScribe 串流後分析事件
<a name="health-scribe-analytics-stream-event"></a>

當 a AWS HealthScribe 串流後分析操作的狀態變更時，例如從 變更為 `IN_PROGRESS` 的 [ClinicalNoteGenerationResult](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_ClinicalNoteGenerationResult.html)`COMPLETED`， AWS HealthScribe 會產生包含下列資訊的事件：

```
{
   "version":"0",
   "id":"event ID",
   "detail-type":"MedicalScribe Post Stream Analytics Update",
   "source":"aws.transcribe",
   "account":"111122223333",
   "time":"timestamp",
   "region":"us-east-1",
   "resources":[],
   "detail":{
      "SessionId": <SessionID>,
      "UpdateType": "ClinicalNoteGenerationResult",
      "ClinicalNoteGenerationResult": {
          "ClinicalNoteOutputLocation": s3://amzn-s3-demo-bucket/clinical-note-output-files/clinical-notes.JSON,
          "TranscriptOutputLocation": s3://amzn-s3-demo-bucket/my-output-files/my-file.JSON,
          "Status": <IN_PROGRESS | COMPLETED | FAILED>,
          "FailureReason": <failure_reason>
    }
   }
}
```
+ `UpdateType`：產生事件的串流後分析操作類型。結果物件的內容會根據 而有所不同`UpdateType`。
+ `SessionId`： AWS HealthScribe 串流的識別號碼。使用此 ID 來識別原始串流工作階段，然後尋找產生事件的串流後分析。
+ `Status`：串流後分析操作的狀態。此值可以為 `IN_PROGRESS`、`COMPLETED` 或 `FAILED`。
+ `ClinicalNoteOutputLocation`： 輸出 Amazon S3 儲存貯體的 URI`ClinicalNoteGenerationResult`。
+ `TranscriptOutputLocation`：文字記錄的 URI。

### 詞彙事件
<a name="vocab-event"></a>

當[自訂詞彙](custom-vocabulary.md)的狀態從 變更為 `PENDING``READY`或 時`FAILED`， Amazon Transcribe 會產生事件。若要識別變更狀態且在目標中啟動事件的自訂詞彙工作，請使用該事件的 `VocabularyName` 欄位。 Amazon Transcribe 事件包含下列資訊。如果您的自訂詞彙狀態為 `FAILED`，則會在 `detail` 下方新增 `FailureReason` 欄位。

**注意**  
此事件僅適用於 [https://docs.aws.amazon.com/transcribe/latest/APIReference/API_CreateVocabulary.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_CreateVocabulary.html) API 操作。

```
{
    "version": "0",
    "id": "event ID",
    "detail-type": "Vocabulary State Change",
    "source": "aws.transcribe",
    "account": "111122223333",
    "time": "timestamp",
    "region": "us-west-2",
    "resources": [],
    "detail": {
        "VocabularyName": "unique-vocabulary-name",
        "VocabularyState": "READY" (or "FAILED")
    }
}
```
+ `VocabularyName`：您自訂詞彙的唯一名稱。
+ `VocabularyState`：自訂詞彙的處理狀態。此值可以為 `READY` 或 `FAILED`。