

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

# 修訂或識別個人身分識別資訊
<a name="pii-redaction"></a>

修訂可用來從您的文字記錄中遮蔽或移除敏感內容的個人身分識別資訊 (PII)。PII 的類型 Amazon Transcribe 會因批次和串流轉錄而異。若要檢視每種轉錄方法的 PII 清單，請參閱 [在批次工作中修訂 PII](pii-redaction-batch.md) 和 [在即時串流中修訂或識別 PII](pii-redaction-stream.md)。使用串流轉錄時，您也可以選擇標記 PII 而不修訂；如需輸出範例，請參閱 [PII 識別輸出範例](pii-redaction-output.md#pii-redaction-output-id)。

啟用修訂後，您可以選擇只產生修訂的文字記錄，或同時產生修訂後的文字記錄和未修訂的文字記錄。如果您選擇只產生修訂文字記錄，請注意，您的媒體是唯一儲存完整對話之處。如果您刪除原始媒體，則沒有未修訂 PII 的記錄。因此，除了修訂後的文字記錄之外，產生未修訂的文字記錄可能須謹慎以待。

若要了解使用批次轉錄的 PII 修訂的詳細資訊，請參閱：[在批次工作中修訂 PII](pii-redaction-batch.md)。

若要了解 PII 修訂或使用串流轉錄進行識別的詳細資訊，請參閱：[在即時串流中修訂或識別 PII](pii-redaction-stream.md)。

**重要**  
修訂功能旨在識別和移除敏感資料。不過，由於機器學習的預測性質， Amazon Transcribe 可能無法識別和移除文字記錄中敏感資料的所有執行個體。我們強烈建議您檢閱任何已修訂的輸出，以確保其符合您的需求。  
修訂功能不符合醫療隱私法 (例如 1996 美國醫療保險流通與責任法案 (HIPAA)) 規定，去除身分識別。

如需修訂和識別 PII 的影片逐步說明，請參閱：

[![AWS Videos](http://img.youtube.com/vi/https://www.youtube.com/embed/4H8dQoeLkyM/0.jpg)](http://www.youtube.com/watch?v=https://www.youtube.com/embed/4H8dQoeLkyM)


# 在批次工作中修訂 PII
<a name="pii-redaction-batch"></a>

在批次轉錄任務期間從文字記錄修訂個人身分識別資訊 (PII) 時， 會在文字記錄的主要文字內文`[PII]`中將 PII 的每個已識別執行個體 Amazon Transcribe 取代為 。您也可以在轉錄輸出的逐字部分中檢視修訂的 PII 類型。如需了解輸出範例，請參閱 [編輯輸出的範例 (批次處理)](pii-redaction-output.md#pii-redaction-output-batch)。

批次轉錄的修訂適用於美式英文 (`en-US`) 和美式西班牙文 ()`es-US`。修訂與[語言識別](lang-id-batch.md)不相容。

已修訂和未修訂的文字記錄都會存放在相同的輸出 Amazon S3 儲存貯體中。 會將它們 Amazon Transcribe 存放在您指定的儲存貯體中，或存放在服務管理的預設儲存 Amazon S3 貯體中。


**Amazon Transcribe 可以辨識批次轉錄的 PII 類型**  

| PII 類型 | 描述 | 
| --- | --- | 
| ADDRESS | 實體地址，例如 *100 Main Street, Anytown, USA* 或 *Suite \$112, Building 123*。地址可以包括街道、建築物、位置、城市、州、國家、縣、郵遞區號、分區、鄰里等。  | 
| ALL | 修訂或識別此表格中列出的所有 PII 類型。 | 
| BANK\$1ACCOUNT\$1NUMBER | 美國銀行帳戶號碼 這些通常介於 10-12 位數間，但是僅存在最後 4 位數字時， Amazon Transcribe 也可以識別銀行帳戶號碼。 | 
| BANK\$1ROUTING | 美國銀行帳戶的分行代碼。這些通常長 9 位數字，但是只有最後 4 位數字存在時， Amazon Transcribe 也可以識別路由號碼。 | 
| CREDIT\$1DEBIT\$1CVV | VISA、MasterCard 卡和 Discover 信用卡和簽帳卡上存在 3 位數卡驗證碼 (CVV)。在美國運通信用卡或簽帳卡，是一個 4 位數的數字代碼。 | 
| CREDIT\$1DEBIT\$1EXPIRY | 信用卡或簽帳卡到期日 該數字通常為 4 位數，格式為月/年或 MM/YY。例如， Amazon Transcribe 可以辨識過期日期，例如 *01/21*、*01/2021* 和 *2021 年 1 月*。 | 
| CREDIT\$1DEBIT\$1NUMBER | 信用卡或簽帳卡號碼。這些號碼的長度從 13 到 16 位數不等，但當只有最後 4 位數時， Amazon Transcribe 也會辨識信用卡或簽帳金融卡號碼。 | 
| EMAIL | 電子郵件位址，例如 *efua.owusu@email.com*。 | 
| NAME | 個人的姓名。此實體類型不包含標題，例如 Mr.、Mrs.、Miss 或 Dr. Amazon Transcribe does，不會將此實體類型套用至屬於組織或地址的名稱。例如， 會將 *John Doe Organization* Amazon Transcribe 識別為組織，並將 *Jane Doe Street* 識別為地址。 | 
| PHONE | 電話號碼。此實體類型還包括傳真和呼叫器號碼。 | 
| PIN | 4 位數的個人識別號碼 (PIN)，允許某人存取其銀行帳戶資訊。 | 
| SSN | 社會安全號碼 (SSN) 是核發給美國公民、永久居民和臨時工作居民的 9 位數號碼。當只有最後 4 位數時， Amazon Transcribe 也會識別社會安全號碼。 | 

您可以使用 AWS 管理主控台 AWS CLI或 AWS SDK 啟動批次轉錄任務。

## AWS 管理主控台
<a name="redaction-console-batch"></a>

1. 登入 [AWS 管理主控台](https://console.aws.amazon.com/transcribe/)。

1. 在導覽窗格中，選擇**轉錄作業**，然後選擇**建立作業**(右上角)。這將開啟**指定作業詳細資訊**頁面。

1. 在**指定作業詳細資訊**頁面中填入想要的欄位後，選擇**下一步**以前往**設定工作 - *選用***頁面。您可以在此處找到具 **PII 修訂**切換的**內容移除**面板。  
![\[Amazon Transcribe 主控台螢幕擷取畫面：「設定任務」頁面上的「內容移除窗格」。\]](http://docs.aws.amazon.com/zh_tw/transcribe/latest/dg/images/content-redact.png)

1. 選 **PII 修訂**後，您可以選擇要修訂的所有 PII 類型。如果您選擇**在工作輸出中包含未修訂的文字記錄**方塊，您也可以選擇有未修訂的文字記錄。  
![\[Amazon Transcribe 主控台螢幕擷取畫面：顯示 PII 選項的「內容移除」窗格。\]](http://docs.aws.amazon.com/zh_tw/transcribe/latest/dg/images/content-redact-select.png)

1. 選擇**建立作業**以執行轉錄作業。

## AWS CLI
<a name="redaction-cli"></a>

此範例使用 [start-transcription-job](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/transcribe/start-transcription-job.html) 指令和 `content-redaction` 參數。如需詳細資訊，請參閱[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_ContentRedaction.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_ContentRedaction.html)。

```
aws transcribe start-transcription-job \
--region us-west-2 \
--transcription-job-name my-first-transcription-job \
--media MediaFileUri=s3://amzn-s3-demo-bucket/my-input-files/my-media-file.flac \
--output-bucket-name amzn-s3-demo-bucket \
--output-key my-output-files/ \
--language-code en-US \
--content-redaction  RedactionType=PII,RedactionOutput=redacted,PiiEntityTypes=NAME,ADDRESS,BANK_ACCOUNT_NUMBER
```

這是使用 [start-transcription-job](https://awscli.amazonaws.com/v2/documentation/api/latest/reference/transcribe/start-transcription-job.html) 方法的另一個範例，且請求主文會針對該工作修訂 PII。

```
aws transcribe start-transcription-job \
--region us-west-2 \
--cli-input-json file://filepath/my-first-redaction-job.json
```

檔案 *my-first-redaction-job.json* 包含以下請求主文。

```
{
  "TranscriptionJobName": "my-first-transcription-job",
  "Media": {
      "MediaFileUri":  "s3://amzn-s3-demo-bucket/my-input-files/my-media-file.flac"
  },
  "OutputBucketName": "amzn-s3-demo-bucket",
  "OutputKey": "my-output-files/", 
  "LanguageCode": "en-US",
  "ContentRedaction": {
      "RedactionOutput":"redacted",
      "RedactionType":"PII",
      "PiiEntityTypes": [
           "NAME",
           "ADDRESS",
           "BANK_ACCOUNT_NUMBER"	
      ]
  }
}
```

## 適用於 Python (Boto3) 的 AWS SDK
<a name="redaction-python-batch"></a>

此範例使用 適用於 Python (Boto3) 的 AWS SDK ，使用 [start\$1transcription\$1job](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/transcribe.html#TranscribeService.Client.start_transcription_job) 方法的 `ContentRedaction` 引數來修訂內容。如需詳細資訊，請參閱[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_ContentRedaction.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_ContentRedaction.html)。

如需使用 AWS SDKs 的其他範例，包括功能特定、案例和跨服務範例，請參閱 [Amazon Transcribe AWS SDKs的程式碼範例](service_code_examples.md)章節。

```
from __future__ import print_function
import time
import boto3
transcribe = boto3.client('transcribe', 'us-west-2')
job_name = "my-first-transcription-job"
job_uri = "s3://amzn-s3-demo-bucket/my-input-files/my-media-file.flac"
transcribe.start_transcription_job(
    TranscriptionJobName = job_name,
    Media = {
        'MediaFileUri': job_uri
    },
    OutputBucketName = 'amzn-s3-demo-bucket',
    OutputKey = 'my-output-files/', 
    LanguageCode = 'en-US', 
    ContentRedaction = { 
        'RedactionOutput':'redacted',
        'RedactionType':'PII', 
        'PiiEntityTypes': [
            'NAME','ADDRESS','BANK_ACCOUNT_NUMBER'
        ]
    }
)

while True:
    status = transcribe.get_transcription_job(TranscriptionJobName = job_name)
    if status['TranscriptionJob']['TranscriptionJobStatus'] in ['COMPLETED', 'FAILED']:
        break
    print("Not ready yet...")
    time.sleep(5)
print(status)
```

**注意**  
僅支援批次任務的 PII 修訂 AWS 區域：亞太區域 （香港）、亞太區域 （孟買）、亞太區域 （首爾）、亞太區域 （新加坡）、亞太區域 （雪梨）、亞太區域 （東京）、 GovCloud （美國西部）、加拿大 （中部）、歐洲 （法蘭克福）、歐洲 （愛爾蘭）、歐洲 （倫敦）、歐洲 （巴黎）、中東 （巴林）、南美洲 （聖保羅）、美國東部 （維吉尼亞北部）、美國東部 （俄亥俄）、美國西部 （奧勒岡） 和美國西部 （加利佛尼亞北部）。

# 在即時串流中修訂或識別 PII
<a name="pii-redaction-stream"></a>

從串流轉錄中修訂個人身分識別資訊 (PII) 時， Amazon Transcribe 會使用 `[PII]` 取代文字記錄中每個已識別的 PII 執行個體。

可用於串流轉錄的其他選項是 *PII 識別*。當您啟用 PII 識別時， 會在 `Entities` 物件下 Amazon Transcribe 標記轉錄結果中的 PII。如需輸出範例，請參閱 [編輯流輸出範例](pii-redaction-output.md#pii-redaction-output-stream) 和 [PII 識別輸出範例](pii-redaction-output.md#pii-redaction-output-id)。

您可以使用這些英文方言來修訂和識別具有串流轉錄的 PII：蘇格蘭 (`en-AB`)、澳洲 (`en-AU`)、加拿大 (`en-CA`)、英國 (`en-GB`)、愛爾蘭 (`en-IE`)、印度 (`en-IN`)、紐西蘭 (`en-NZ`)、美國 (`en-US`)、威爾斯 (`en-WL`) 和南非 (`en-ZA`)；西班牙文方言：美國 (`es-US`)、西班牙 (`es-ES`)；法文方言：法文 (`fr-FR`)、加拿大 (`fr-CA`)；葡萄牙方言：葡萄牙 (`pt-PT`)、巴西 (`pt-BR`)；義大利方言：義大利 (`it-IT`)；德文方言：德國 (`de-DE`)、瑞士 ()`de-CH`。

串流工作的 PII 識別和修訂只有在完成音訊區段的轉錄時才會執行。


**Amazon Transcribe 可以辨識串流轉錄的 PII 類型**  

| PII 類型 | 描述 | 
| --- | --- | 
| ADDRESS | 實體地址，例如 *100 Main Street, Anytown, USA* 或 *Suite \$112, Building 123*。地址可以包括街道、建築物、位置、城市、州、國家、縣、郵遞區號、分區、鄰里等。  | 
| ALL | 修訂或識別此表格中列出的所有 PII 類型。 | 
| BANK\$1ACCOUNT\$1NUMBER | 美國銀行帳戶號碼 這些通常介於 10-12 位數間，但是僅存在最後 4 位數字時， Amazon Transcribe 也可以識別銀行帳戶號碼。 | 
| BANK\$1ROUTING | 美國銀行帳戶的分行代碼。這些通常長 9 位數字，但是只有最後 4 位數字存在時， Amazon Transcribe 也可以識別路由號碼。 | 
| CREDIT\$1DEBIT\$1CVV | VISA、MasterCard 卡和 Discover 信用卡和簽帳卡上存在 3 位數卡驗證碼 (CVV)。在美國運通信用卡或簽帳卡，是一個 4 位數的數字代碼。 | 
| CREDIT\$1DEBIT\$1EXPIRY | 信用卡或簽帳卡到期日 該數字通常為 4 位數，格式為月/年或 MM/YY。例如， Amazon Transcribe 可以辨識過期日期，例如 *01/21*、*01/2021* 和 *2021 年 1 月*。 | 
| CREDIT\$1DEBIT\$1NUMBER | 信用卡或簽帳卡號碼。這些號碼的長度從 13 到 16 位數不等，但當只有最後 4 位數時， Amazon Transcribe 也會辨識信用卡或簽帳金融卡號碼。 | 
| EMAIL | 電子郵件位址，例如 *efua.owusu@email.com*。 | 
| NAME | 個人的姓名。此實體類型不包含標題，例如 Mr.、Mrs.、Miss 或 Dr. Amazon Transcribe does，不會將此實體類型套用至屬於組織或地址的名稱。例如， 會將 *John Doe Organization* Amazon Transcribe 識別為組織，並將 *Jane Doe Street* 識別為地址。 | 
| PHONE | 電話號碼。此實體類型還包括傳真和呼叫器號碼。 | 
| PIN | 4 位數的個人識別號碼 (PIN)，允許某人存取其銀行帳戶資訊。 | 
| SSN | 社會安全號碼 (SSN) 是核發給美國公民、永久居民和臨時工作居民的 9 位數號碼。當只有最後 4 位數時， Amazon Transcribe 也會識別社會安全號碼。 | 
| AGE | 個人的年齡，包括數量和時間單位。例如，在「我 40 歲」一詞中， 將「40 歲」 Amazon Transcribe 視為年齡。 | 
| DATE\$1TIME | 日期可以包含年、月、日、星期幾或一天中的時間。例如， Amazon Transcribe 會將「2020 年 1 月 19 日」或「上午 11 點」視為日期。 Amazon Transcribe 會辨識部分日期、日期範圍和日期間隔。它也會辨識幾十年，例如「1990 年代」。 | 
| LICENSE\$1PLATE | 車輛的車牌是由註冊車輛的州或國家/地區核發。客車的格式通常為 5 到 8 位數，由大寫字母和數字組成。格式會根據發行州或國家/地區的位置而有所不同。 | 
| PASSPORT\$1NUMBER | 指派給個人護照的唯一識別符。格式通常包含字母和數字的組合，並因國家/地區而異。 | 
| PASSWORD | 用作密碼的英數字串，例如 "\$1very20special\$1pass\$1"。 | 
| USERNAME | 識別帳戶的使用者名稱，例如登入名稱、螢幕名稱、別名或控制代碼。 | 
| VEHICLE\$1IDENTIFICATION\$1NUMBER | 車輛識別號碼 (VIN) 可唯一識別車輛。VIN 內容和格式在 ISO 3779 規格中定義。每個國家/地區都有 VIN 的特定代碼和格式。 | 

您可以使用 AWS 管理主控台、WebSocket 或 HTTP/2 啟動串流轉錄。

## AWS 管理主控台
<a name="redaction-console-stream"></a>

1. 登入 [AWS 管理主控台](https://console.aws.amazon.com/transcribe/)。

1. 在導覽窗格中，選擇**即時轉錄**。向下捲動至**內容移除設定**，如果此欄位已最小化，請展開此欄位。  
![\[Amazon Transcribe 主控台螢幕擷取畫面：「即時轉錄」頁面。\]](http://docs.aws.amazon.com/zh_tw/transcribe/latest/dg/images/redaction-stream1.png)

1. 開啟 **PII 識別與編輯**。  
![\[Amazon Transcribe 主控台螢幕擷取畫面：展開的「內容移除設定」面板。\]](http://docs.aws.amazon.com/zh_tw/transcribe/latest/dg/images/redaction-stream2.png)

1. 選擇 **僅限識別** 或 **識別與編輯**，然後選擇您要在文字記錄中識別或編輯的 PII 實體類型。  
![\[Amazon Transcribe 主控台螢幕擷取畫面：可選取的 PII 類型清單。\]](http://docs.aws.amazon.com/zh_tw/transcribe/latest/dg/images/redaction-stream3.png)

1. 您現在已準備好轉錄串流。選擇**開始串流**並開始說話。若要結束聽寫，選擇**停止串流**。

## WebSocket 串流
<a name="redaction-websocket"></a>

此範例會在 WebSocket 串流中建立使用 PII 修訂 (或 PII 識別) 的預先簽署 URL。已加入分行符號以提高可讀性。如需搭配 使用 WebSocket 串流的詳細資訊 Amazon Transcribe，請參閱 [設定 WebSocket 串流](streaming-setting-up.md#streaming-websocket)。如需參數詳細資訊，請參閱 [https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_StartStreamTranscription.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_StartStreamTranscription.html)。

```
GET wss://transcribestreaming.us-west-2.amazonaws.com:8443/stream-transcription-websocket?
&X-Amz-Algorithm=AWS4-HMAC-SHA256
&X-Amz-Credential=AKIAIOSFODNN7EXAMPLE%2F20220208%2Fus-west-2%2Ftranscribe%2Faws4_request
&X-Amz-Date=20220208T235959Z
&X-Amz-Expires=300
&X-Amz-Security-Token=security-token
&X-Amz-Signature=string
&X-Amz-SignedHeaders=content-type%3Bhost%3Bx-amz-date
&language-code=en-US
&media-encoding=flac
&sample-rate=16000    
&pii-entity-types=NAME,ADDRESS
&content-redaction-type=PII (or &content-identification-type=PII)
```

您不能在相同的請求中同時使用 `content-identification-type` 和 `content-redaction-type`。

您可以在 [API 參考](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_Reference.html)中找到參數定義；所有 AWS API 操作常見的參數都列在[通用參數](https://docs.aws.amazon.com/transcribe/latest/APIReference/CommonParameters.html)區段中。

## HTTP/2 串流
<a name="redaction-http2"></a>

此範例會建立啟用 PII 識別或 PII 修訂的 HTTP/2 請求。如需搭配 使用 HTTP/2 串流的詳細資訊 Amazon Transcribe，請參閱 [設定 HTTP/2 串流](streaming-setting-up.md#streaming-http2)。如需特定參數和標頭的詳細資訊 Amazon Transcribe，請參閱 [https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_StartStreamTranscription.html](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_streaming_StartStreamTranscription.html)。

```
POST /stream-transcription HTTP/2
host: transcribestreaming.us-west-2.amazonaws.com
X-Amz-Target: com.amazonaws.transcribe.Transcribe.StartStreamTranscription
Content-Type: application/vnd.amazon.eventstream
X-Amz-Content-Sha256: string
X-Amz-Date: 20220208T235959Z
Authorization: AWS4-HMAC-SHA256 Credential=access-key/20220208/us-west-2/transcribe/aws4_request, SignedHeaders=content-type;host;x-amz-content-sha256;x-amz-date;x-amz-target;x-amz-security-token, Signature=string
x-amzn-transcribe-language-code: en-US
x-amzn-transcribe-media-encoding: flac
x-amzn-transcribe-sample-rate: 16000      
x-amzn-transcribe-content-identification-type: PII (or x-amzn-transcribe-content-redaction-type: PII)
x-amzn-transcribe-pii-entity-types: NAME,ADDRESS
transfer-encoding: chunked
```

您不能在相同的請求中同時使用 `content-identification-type` 和 `content-redaction-type`。

您可以在 [API 參考](https://docs.aws.amazon.com/transcribe/latest/APIReference/API_Reference.html)中找到參數定義；所有 AWS API 操作常見的參數都列在[通用參數](https://docs.aws.amazon.com/transcribe/latest/APIReference/CommonParameters.html)區段中。

**注意**  
串流的 PII 修訂僅支援以下項目 AWS 區域：亞太區域 （首爾）、亞太區域 （雪梨）、亞太區域 （東京）、加拿大 （中部）、歐洲 （法蘭克福）、歐洲 （愛爾蘭）、歐洲 （倫敦）、美國東部 （維吉尼亞北部）、美國東部 （俄亥俄） 和美國西部 （奧勒岡）。

# PII 修訂和識別輸出範例
<a name="pii-redaction-output"></a>

下列範例顯示批次和串流工作的修訂輸出，以及串流工作的 PII 識別。

使用自動內容修訂的轉錄作業會產生兩種類型的 `confidence` 值。自動語音辨識 (ASR) 可信度表示具有 `pronunciation` 的 `type` 或 `punctuation` 為特定表達用語。在下列的轉錄輸出中，單字 `Good` 具有 `1.0` 的 `confidence`。此可信度值表示 Amazon Transcribe 100% 確信此文字記錄中的措辭是「良好」。`[PII]` 標籤的 `confidence` 值是標記為修訂的語音確實是 PII 的可信度。在下列文字記錄輸出中， `confidence`的 `0.9999`表示 Amazon Transcribe 有 99.99% 的確信其在文字記錄中修訂的實體是 PII。

## 編輯輸出的範例 (批次處理)
<a name="pii-redaction-output-batch"></a>

```
{
    "jobName": "my-first-transcription-job",
    "accountId": "111122223333",
    "isRedacted": true,
    "results": {
        "transcripts": [
            {
                "transcript": "Good morning, everybody. My name is [PII], and today I feel like
                sharing a whole lot of personal information with you. Let's start with my Social 
                Security number [PII]. My credit card number is [PII] and my C V V code is [PII].
                I hope that Amazon Transcribe is doing a good job at redacting that personal 
                information away. Let's check."
            }
        ],
        "items": [
            {
                "id": 0,
                "start_time": "2.86",
                "end_time": "3.35",
                "alternatives": [
                    {
                        "confidence": "1.0",
                        "content": "Good"
                    }
                ],
                "type": "pronunciation"
            },
            Items removed for brevity
            {
                "id": 8,
                "start_time": "5.56",
                "end_time": "6.25",
                "alternatives": [
                    {
                        "content": "[PII]",
                        "redactions": [
                            {
                                "confidence": "0.9999",
                                "type": "NAME",
                                "category": "PII"
                            }
                        ]
                    }
                ],
                "type": "pronunciation"
            },
            Items removed for brevity
        ],
    },
    "status": "COMPLETED"
}
```

以下是未編輯的文字記錄以供比較：

```
{
    "jobName": "job id",
    "accountId": "111122223333",
    "isRedacted": false,
    "results": {
        "transcripts": [
            {
                "transcript": "Good morning, everybody. My name is Mike, and today I feel like
                sharing a whole lot of personal information with you. Let's start with my Social 
                Security number 000000000. My credit card number is 5555555555555555 
                and my C V V code is 000. I hope that Amazon Transcribe is doing a good job 
                at redacting that personal information away. Let's check."
            }
        ],
        "items": [
            {
                "id": 0,
                "start_time": "2.86",
                "end_time": "3.35",
                "alternatives": [
                    {
                        "confidence": "1.0",
                        "content": "Good"
                    }
                ],
                "type": "pronunciation"
            },
            Items removed for brevity
            {
                "id": 8,
                "start_time": "5.56",
                "end_time": "6.25",
                "alternatives": [
                    {
                        "confidence": "0.9999",
                        "content": "Mike",
                     {                        
                ],
                "type": "pronunciation"
            },
            Items removed for brevity
        ],
    },
    "status": "COMPLETED"
}
```

## 編輯流輸出範例
<a name="pii-redaction-output-stream"></a>

```
{
    "TranscriptResultStream": {
        "TranscriptEvent": {
            "Transcript": {
                "Results": [
                    {
                        "Alternatives": [
                            {
                                "Transcript": "my name is [NAME]",
                                "Items": [
                                    {
                                        "Content": "my",
                                        "EndTime": 0.3799375,
                                        "StartTime": 0.0299375,
                                        "Type": "pronunciation"
                                    },
                                    {
                                        "Content": "name",
                                        "EndTime": 0.5899375,
                                        "StartTime": 0.3899375,
                                        "Type": "pronunciation"
                                    },
                                    {
                                        "Content": "is",
                                        "EndTime": 0.7899375,
                                        "StartTime": 0.5999375,
                                        "Type": "pronunciation"
                                    },
                                    {
                                        "Content": "[NAME]",
                                        "EndTime": 1.0199375,
                                        "StartTime": 0.7999375,
                                        "Type": "pronunciation"
                                    }
                                ],
                                "Entities": [
                                    {
                                        "Content": "[NAME]",
                                        "Category": "PII",
                                        "Type": "NAME",
                                        "StartTime" : 0.7999375,
                                        "EndTime" : 1.0199375,
                                        "Confidence": 0.9989
                                    }
                                ]
                            }
                        ],
                        "EndTime": 1.02,
                        "IsPartial": false,
                        "ResultId": "12345a67-8bc9-0de1-2f34-a5b678c90d12",
                        "StartTime": 0.0199375
                    }
                ]
            }
        }
    }
}
```

## PII 識別輸出範例
<a name="pii-redaction-output-id"></a>

PII 識別是您可以搭配串流轉錄作業使用的額外功能。識別的 PII 會列在每個區段的 `Entities` 區段中。

```
{
    "TranscriptResultStream": {
        "TranscriptEvent": {
            "Transcript": {
                "Results": [
                    {
                        "Alternatives": [
                            {
                                "Transcript": "my name is mike",
                                "Items": [
                                    {
                                        "Content": "my",
                                        "EndTime": 0.3799375,
                                        "StartTime": 0.0299375,
                                        "Type": "pronunciation"
                                    },
                                    {
                                        "Content": "name",
                                        "EndTime": 0.5899375,
                                        "StartTime": 0.3899375,
                                        "Type": "pronunciation"
                                    },
                                    {
                                        "Content": "is",
                                        "EndTime": 0.7899375,
                                        "StartTime": 0.5999375,
                                        "Type": "pronunciation"
                                    },
                                    {
                                        "Content": "mike",
                                        "EndTime": 0.9199375,
                                        "StartTime": 0.7999375,
                                        "Type": "pronunciation"                                    
                                    }
                                ],
                                "Entities": [
                                    {
                                        "Content": "mike",
                                        "Category": "PII",
                                        "Type": "NAME",
                                        "StartTime" : 0.7999375,
                                        "EndTime" : 1.0199375,
                                        "Confidence": 0.9989
                                    }
                                ]
                            }
                        ],
                        "EndTime": 1.02,
                        "IsPartial": false,
                        "ResultId": "12345a67-8bc9-0de1-2f34-a5b678c90d12",
                        "StartTime": 0.0199375
                    }
                ]
            }
        }
    }
}
```