

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

# Amazon Connect Voice ID 事件結構描述
<a name="voiceid-event-schema"></a>

**注意**  
支援結束通知：2026 年 5 月 20 日， AWS 將結束對 Amazon Connect Voice ID 的支援。2026 年 5 月 20 日之後，您將無法再存取 Amazon Connect 主控台上的語音 ID、管理員網站或聯絡控制面板上的語音 ID Amazon Connect 功能，或存取語音 ID 資源。如需詳細資訊，請造訪 [Amazon Connect Voice ID 終止支援](https://docs.aws.amazon.com/connect/latest/adminguide/amazonconnect-voiceid-end-of-support.html)。

語音 ID 會為每筆交易產生事件：註冊、驗證或偵測監視清單中的詐騙者。事件會以 JSON 格式傳送至預設 EventBridge 事件匯流排。

您可以使用 EventBridge 監控語音 ID 事件，建立語音 ID 驗證結果和偵測監視清單中詐騙者的分析管道。使用本主題中提供的結構描述，您可以設定 EventBridge 規則來接聽和篩選相關的語音 ID 事件，然後透過 Amazon Data Firehose 處理這些事件，以存放在您選擇的資料倉儲中。

 例如，您可能想要近即時的語音 ID 分析追蹤功能。要做到這一點，您可以提取所有的 `Evaluate-Session` 事件，並得到 `authenticationResult` 和 `fraudDetectionResult`。

[盡可能](https://docs.aws.amazon.com/eventbridge/latest/userguide/eb-service-event.html)發出事件。

## 事件中常見的欄位
<a name="voiceid-event-common-fields"></a>
+ `version` - 事件資料的版本。
+ `id` - EventBridge 所產生之事件的唯一識別碼
+ `detail-type` - 事件詳細資訊的識別碼。
+ `source` - 事件的來源。一律為 `aws.voiceid`。
+ `account` AWS - 帳戶 ID。
+ `timestamp` - 事件發布的日期和時間 (UTC)。
+ `region` - 進行 API 呼叫 AWS 的區域。
+ `resources` - API 呼叫使用的資源。
+ `detail` - 有關活動的詳細資訊：
  + `detail.sourceId` - 由語音 ID 產生的唯一 ID，可用於刪除重複資料。
  + `detail.action` - 類似於正在調用的 API。
  + `detail.status` - 指定動作的狀態：成功或失敗。
  + `detail.errorInfo` - 在語音 ID 中出現指定的操作錯誤時填入。

以下是所發出的結構描述事件。

## 啟動工作階段動作
<a name="start-session"></a>

在串流開始 (設定後)，串流結束和故障時發出事件。

```
{...commonfields
    "detail-type": "VoiceId Start Session Action",
    "detail": {
        "sourceId": String,
        "action": "START_SESSION",
        "status": String,
        "domainId": String,
        "session": {
            "sessionId": String,
            "sessionName": String,
            "authenticationConfiguration": {
                "acceptanceThreshold":Integer
            },
            "fraudDetectionConfiguration": {
                "riskThreshold":Integer,
                "watchlistId": String
            },
            "streamingConfiguration": {
                "authenticationMinimumSpeechInSeconds": Integer
            },
            "enrollmentAudioProgress": {
                "audioAggregationStatus": String,
                "audioAggregationStartedAt": "Timestamp",
                "audioAggregationEndedAt": "Timestamp"
            },
            "authenticationAudioProgress": {
                "audioAggregationStartedAt": "Timestamp",
                "audioAggregationEndedAt": "Timestamp"
            },
            "fraudDetectionAudioProgress": {
                "audioAggregationStartedAt": "Timestamp",
                "audioAggregationEndedAt": "Timestamp"
            },
            "generatedSpeakerId": String
        },
        "errorInfo": {
            "errorMessage": String,
            "errorType": String,
            "errorCode": Integer
       }
    }
}
```

## 更新工作階段動作
<a name="update-session"></a>

 內部工作階段更新成功或失敗時發出事件。

```
{...commonfields
"detail-type": "VoiceId Update Session Action",
"detail": {
    "sourceId": String,
    "action": "UPDATE_SESSION",
    "status": String,
    "domainId": String,
    "session": {
        "sessionId": String,
        "sessionName": String,
        "authenticationConfiguration": {
            "acceptanceThreshold": Integer
        },
        "fraudDetectionConfiguration": {
            "riskThreshold": Integer,
            "watchlistId": String
        },
        "streamingConfiguration": {
            "authenticationMinimumSpeechInSeconds": Integer
        },
        "generatedSpeakerId": String
    },
    "errorInfo": {
        "errorMessage": String,
        "errorType": String,
        "errorCode": Integer
    }
}
}
```

## 評估工作階段動作
<a name="evaluate-session"></a>

工作階段評估成功或失敗時發出事件。原因可以是 KNOWN\$1FRAUDSTER 或 VOICE\$1SPOOFING。

```
{...commonfields
"detail-type": "VoiceId Evaluate Session Action",
"detail": {
    "sourceId": String,
    "action": "EVALUATE_SESSION",
    "status": String,
    "domainId": String,
    "session": {
        "sessionId": String,
        "sessionName": String,
        "generatedSpeakerId": String,
        "streamingStatus": String,
        "authenticationResult": {
            "authenticationResultId": String,
            "decision": String,
            "score": Integer,
            "audioAggregationStartedAt": "Timestamp",
            "audioAggregationEndedAt": "Timestamp",
            "configuration": {
                "acceptanceThreshold": Integer
            }
        },
        "fraudDetectionResult": {
            "fraudDetectionResultId": String,
            "decision": String,
            "reasons": [String],
            "audioAggregationStartedAt": "Timestamp",
            "audioAggregationEndedAt": "Timestamp",
            "configuration": {
                   "riskThreshold": Integer
            },
            "riskDetails": {
                 "knownFraudsterRisk": {
                         "generatedFraudsterId": String,
                         "riskScore": Integer,
                         "watchlistId": String
                  },
                  "voiceSpoofingRisk": {
                        "riskScore": Integer
                  } 
            }
         }
     },
     "errorInfo": {
        "errorMessage": String,
        "errorType": String,
        "errorCode": Integer
    }
}
}
```

## 發言者動作
<a name="speaker"></a>

發表有關成功或失敗選擇退出發言者，刪除發言者或註冊發言者的事件。

```
{...commonfields
"detail-type": "VoiceId Speaker Action",
"detail": {
    "sourceId": String,
    "domainID": String,
    "action": String,
    "status": String,
    "generatedSpeakerId": String,
    "data": {
        "enrollmentSource": String,
        "enrollmentSourceId": String,
        "enrollmentStatus": String
        },
    "errorInfo": {
        "errorMessage": String,
        "errorType": String,
        "errorCode": Integer
     }
}
}
```

## 詐騙者行動
<a name="fraudster"></a>

成功註冊或刪除詐騙者時發出事件。

當詐騙者與監視清單關聯或取消關聯時，不會傳送事件。

```
{...commonfields
"detail-type": "VoiceId Fraudster Action",
"detail": {
    "sourceId": String,
    "domainID": String,
    "action": String,
    "status": String,
    "generatedFraudsterId": String,
    "watchlistIds": [String],
    "data": {
        "registrationSource": String,
        "registrationSourceId": String,
        "registrationStatus": String
    },
    "errorInfo": {
        "errorMessage": String,
        "errorType": String,
        "errorCode": Integer
    }
}
}
```

## EnrollBySession
<a name="enrollbysession"></a>

提交註冊請求時發出此事件。當實際註冊成功或失敗時，會發出 `Speaker` 事件。

```
{...commonfields
"detail-type": "VoiceId Session Speaker Enrollment Action",
"detail": {
    "sourceId": String,
    "domainId": String,
    "action": "SESSION_ENROLLMENT_REQUEST",
    "status": String,
    "sessionId": String,
    "sessionName": String,
    "errorInfo": {
        "errorMessage": String,
        "errorType": String,
        "errorCode": Integer
    }
}
}
```

## StartSpeakerEnrollmentJob
<a name="startspeakerenrollmentjob"></a>

當批次註冊請求提交、成功或失敗時發出此事件。會針對每個個別發言者發出 `Speaker` 事件，以指出對應的註冊成功或失敗。

```
{...commonfields
"detail-type": "VoiceID Batch Speaker Enrollment Action",
"detail": {
    "sourceId": String,
    "domainId": String,
    "action": "BATCH_ENROLLMENT_REQUEST",
    "status": String,
    "batchJobId": String,
    "data": {
        "dataAccessRoleArn": String,
        "enrollmentConfig": {
            "existingEnrollmentAction": String,
            "fraudDetectionConfig": {
            "fraudDetectionAction": String,
            "riskThreshold": Integer,
            "watchlistIds": [String],
            }
        },
        "inputDataConfig": {
            "s3Uri": String
         },
        "outputDataConfig": {
            "s3Uri": String,
            "kmsKeyId": String
        }
    },
    "errorInfo": {
        "errorMessage": String,
        "errorType": String,
        "errorCode": Integer
    }
}
}
```

## StartFraudsterRegistrationJob
<a name="startfraudsterregistrationjob"></a>

當批次註冊請求提交、成功或失敗時發出此事件。每個詐騙者都會發出 `Fraudster` 事件，以指示對應的註冊成功還是失敗。

```
{...commonfields
"detail-type": "VoiceId Batch Fraudster Registration Action",
"detail": {
    "sourceId": String,
    "domainId": String,
    "action": "BATCH_REGISTRATION_REQUEST",
    "status": String,
    "batchJobId": String,
    "data": {
        "dataAccessRoleArn": String,
        "registrationConfig": {
            "duplicateRegistrationAction": String,
            "fraudsterSimilarityThreshold": Integer,
            "watchlistIds": [String],
        }
        "inputDataConfig": {
            "s3Uri": String
        },
        "outputDataConfig": {
            "s3Uri": String,
            "kmsKeyId": String
        }
    },                                                      
    "errorInfo": {
        "errorMessage": String,
        "errorType": String,
        "errorCode": Integer
    }
}
}
```