

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

# 编辑或识别个人身份信息
<a name="pii-redaction"></a>

编辑功能用于屏蔽或删除您的转录中以个人身份信息 (PII) 形式出现的敏感内容。对于批量转录和流式转录，Amazon Transcribe 可以编辑的 PII 类型各不相同。要查看每种转录方法的 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 替换为正文。您还可以查看转录输出 word-for-word部分中已编辑的 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* or *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 位数字，格式为 month/year 或 MM/YY。*例如， Amazon Transcribe 可以识别到期日期，例如 1 *月 21 日、2021 年 1* 月 1 *日和 2021 年 1 月*。* | 
| CREDIT\$1DEBIT\$1NUMBER | 信用卡或借记卡的号码。这些数字的长度可以从 13 到 16 位数字不等，但当只有最后 4 位数字存在时， Amazon Transcribe 也可以识别信用卡或借记卡号。 | 
| EMAIL | 电子邮件地址，例如 *efua.owusu@email.com*。 | 
| NAME | 个人的名字。此实体类型不包括头衔，例如 “先生”、“女士”、“小姐” 或 “博士”， Amazon Transcribe 不将此实体类型应用于属于组织或地址的姓名。例如，将 *John Doe 组织 Amazon Transcribe 识别为组织*，将 *Jane Doe Stre* et 识别为地址。 | 
| PHONE | 电话号码。该实体类型还包括传真号码和寻呼机号码。 | 
| PIN | 一个 4 位数的个人识别码 (PIN)，允许他人访问其银行账户信息。 | 
| SSN | 社会安全号码 (SSN) 是发给美国公民、永久居民和临时在职居民的 9 位数字。 Amazon Transcribe 当只有最后 4 位数字存在时，还可以识别社会安全号码。 | 

您可以使用 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_cn/transcribe/latest/dg/images/content-redact.png)

1. 选择 **PII 编辑**后，您可以选择要编辑的所有 PII 类型。如果选择**在作业输出框中包含未编辑的转录**，则也可以选择使用未经编辑的转录。  
![\[Amazon Transcribe 控制台屏幕截图：显示 PII 选项的 “内容移除” 窗格。\]](http://docs.aws.amazon.com/zh_cn/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>

此示例使用 [start\$1tr 适用于 Python (Boto3) 的 AWS SDK anscription\$1](https://boto3.amazonaws.com/v1/documentation/api/latest/reference/services/transcribe.html#TranscribeService.Client.start_transcription_job) 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 识别后，会将转录结果中的 PII Amazon Transcribe 标记在对象下。`Entities`有关输出示例，请参见[经过编辑的流式转录输出示例](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* or *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 位数字，格式为 month/year 或 MM/YY。*例如， Amazon Transcribe 可以识别到期日期，例如 1 *月 21 日、2021 年 1* 月 1 *日和 2021 年 1 月*。* | 
| CREDIT\$1DEBIT\$1NUMBER | 信用卡或借记卡的号码。这些数字的长度可以从 13 到 16 位数字不等，但当只有最后 4 位数字存在时， Amazon Transcribe 也可以识别信用卡或借记卡号。 | 
| EMAIL | 电子邮件地址，例如 *efua.owusu@email.com*。 | 
| NAME | 个人的名字。此实体类型不包括头衔，例如 “先生”、“女士”、“小姐” 或 “博士”， Amazon Transcribe 不将此实体类型应用于属于组织或地址的姓名。例如，将 *John Doe 组织 Amazon Transcribe 识别为组织*，将 *Jane Doe Stre* et 识别为地址。 | 
| PHONE | 电话号码。该实体类型还包括传真号码和寻呼机号码。 | 
| PIN | 一个 4 位数的个人识别码 (PIN)，允许他人访问其银行账户信息。 | 
| SSN | 社会安全号码 (SSN) 是发给美国公民、永久居民和临时在职居民的 9 位数字。 Amazon Transcribe 当只有最后 4 位数字存在时，还可以识别社会安全号码。 | 
| AGE | 个人的年龄，包括数量和时间单位。例如，在 “我已经 40 岁了” 这句话中， Amazon Transcribe 将 “40 岁” 视为一个年龄。 | 
| DATE\$1TIME | 日期可以包括年、月、日、一周中的某一天或一天中的某个时间。例如，将 “2020 年 1 月 19 日” 或 “上午 11 点” Amazon Transcribe 识别为日期。 Amazon Transcribe 将识别部分日期、日期范围和日期间隔。它还可以识别年代，例如“九十年代”。 | 
| LICENSE\$1PLATE | 车辆牌照由车辆登记的所在州或国家签发。乘用车的格式通常为 5 到 8 位数，由大写字母和数字组成。格式因签发州或国家的不同而异。 | 
| PASSPORT\$1NUMBER | 分配给个人护照的唯一标识符。格式通常是字母和数字的组合，并且因国家/地区而异。 | 
| PASSWORD | 用作密码的字母数字字符串，例如“\$1very20special\$1pass\$1”。 | 
| USERNAME | 用于标识帐户的用户名，例如登录名、屏幕名称、昵称或句柄。 | 
| VEHICLE\$1IDENTIFICATION\$1NUMBER | 车辆识别号码 (VIN) 是车辆的唯一标识。ISO 3779 规范规定了 VIN 内容和格式。每个国家/地区都有特定的代码和格式 VINs. | 

您可以使用 AWS 管理控制台、 WebSocket或 HTTP/2 开始直播转录。

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

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

1. 在导航窗格中，选择 **Real-time transcription (实时转录)**。向下滚动到**内容移除设置**，如果该字段已最小化，则将其展开。  
![\[Amazon Transcribe 控制台屏幕截图：“实时转录” 页面。\]](http://docs.aws.amazon.com/zh_cn/transcribe/latest/dg/images/redaction-stream1.png)

1. 开启 **PII 识别和编辑**。  
![\[Amazon Transcribe 控制台屏幕截图：扩展的 “内容删除设置” 面板。\]](http://docs.aws.amazon.com/zh_cn/transcribe/latest/dg/images/redaction-stream2.png)

1. 选择**仅限识别**或**识别和编辑**，然后在转录中选择要识别或编辑的 PII 实体类型。  
![\[Amazon Transcribe 控制台屏幕截图：可以选择的 PII 类型列表。\]](http://docs.aws.amazon.com/zh_cn/transcribe/latest/dg/images/redaction-stream3.png)

1. 您现在已准备就绪，可以转录音频流了。选择**开始流式转录**并开始讲话。要结束口述，请选择**停止流式转录**。

## WebSocket 直播
<a name="redaction-websocket"></a>

此示例创建了一个在直播中使用 PII 密文（或 PII 识别）的预签名 URL。 WebSocket 为了便于阅读，已增加了换行符。有关将 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)部分中。

**注意**  
仅亚太地区（首尔）、亚太地区（悉尼）、亚太地区（悉尼）、亚太地区（东京）、加拿大（中部）、欧洲（法兰克福）、欧洲（爱尔兰）、欧洲（伦敦）、美国东部（弗吉尼亚北部）、美国东部（俄亥俄州）和美国西部（俄勒冈）支持直播个人身份信息编辑。 AWS 区域

# PII 编辑和识别输出示例
<a name="pii-redaction-output"></a>

以下示例显示了批量转录和流式转录作业中经过编辑的输出，以及流式转录作业中的 PII 识别。

使用内容编辑的转录作业生成两种类型的 `confidence` 值。自动语音识别 (ASR) 置信度表示 `type` 为 `pronunciation` 或 `punctuation` 的项目是特定的发音。在下面的转录输出中，单词 `Good` 的 `confidence` 为 `1.0`。此置信度值表示 Amazon Transcribe 对该转录中所说的单词为“Good”的置信度是 100％。`confidence` 标签的 `[PII]` 值是对于标记为要修订的语音确实是 PII 的置信度。在下面的转录输出中，`confidence` 为 `0.9999` 表示 Amazon Transcribe 对它在转录结果中编辑的实体是 PII 的置信度为 99.99%。

## 经过编辑的输出示例（批量转录）
<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
                    }
                ]
            }
        }
    }
}
```